RFR: 8241502: C2: Migrate x86_64.ad to MacroAssembler [v8]

John Tortugo github.com+2249648+johntortugo at openjdk.java.net
Thu Apr 22 22:34:26 UTC 2021

On Thu, 22 Apr 2021 22:29:49 GMT, John Tortugo <github.com+2249648+JohnTortugo at openjdk.org> wrote:

>> src/hotspot/cpu/x86/assembler_x86.cpp line 9413:
>>> 9411: 
>>> 9412: void Assembler::set_byte_if_not_zero(Register dst) {
>>> 9413:   emit_int24(0x0F, (unsigned char)0x95, (0xC0 | dst->encoding()));
>> Can you explain this change?
>> I see it is used only in c1_LIRAssembler_x86.cpp
> The operand encoding of SETNE r/m8 is just 0b11.000.000 AFAIU, and not 0b11.100.000 as in the previous code. I found this difference while comparing the bytes emitted by instructions encoded using "opcode(...)" with instructions emitted by MacroAssembler.

I.e., I basically patched the MacroAssembler routine to emit an instruction that matched this: https://github.com/openjdk/jdk/blob/b84f6901275aedfeb59438898846b6e69ced316d/src/hotspot/cpu/x86/x86_64.ad#L2750


PR: https://git.openjdk.java.net/jdk/pull/2420

More information about the hotspot-compiler-dev mailing list