Skip to content

Commit

Permalink
Add instruction testl(Address, imm32_t)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoeLin committed Dec 21, 2023
1 parent f01bdfb commit 7c71330
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/hotspot/cpu/x86/assembler_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5603,6 +5603,14 @@ void Assembler::testb(Address dst, int imm8) {
emit_int8(imm8);
}

void Assembler::testl(Address dst, int32_t imm32) {
InstructionMark im(this);
prefix(dst);
emit_int8((unsigned char)0xF7);
emit_operand(as_Register(0), dst, 4);
emit_int32(imm32);
}

void Assembler::testl(Register dst, int32_t imm32) {
// not using emit_arith because test
// doesn't support sign-extension of
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/cpu/x86/assembler_x86.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2063,6 +2063,7 @@ class Assembler : public AbstractAssembler {
void testb(Register dst, int imm8);
void testb(Address dst, int imm8);

void testl(Address dst, int32_t imm32);
void testl(Register dst, int32_t imm32);
void testl(Register dst, Register src);
void testl(Register dst, Address src);
Expand Down

0 comments on commit 7c71330

Please sign in to comment.