emit_rm in MacroAssembler

Tom Rodriguez Thomas.Rodriguez at Sun.COM
Mon Feb 23 11:26:58 PST 2009


They aren't structured the same at all.  I think you want something  
like this for the 64 bit reg/reg:

   emit_byte(0xF3);
   int encode = prefixq_and_encode(dst->encoding(), src->encoding());
   emit_byte(0x0f);
   emit_byte(0xb8);
   emit_byte(0xc0 | encode);

The prefix* family of functions take care of emitting the proper REXs  
and masking the registers down to 3 bits.  Use the regular  
prefix_and_encode for popcntl.

tom

On Feb 22, 2009, at 10:22 AM, Christian Thalinger wrote:

> On Sun, 2009-02-22 at 13:02 -0500, Paul Hohensee wrote:
>> Take a look at emit_operand() in assembler_x86.cpp.  It handles all  
>> rm
>> variations,
>> not just RegReg.
>
> Hmm, I have already looked at them but I couldn't find a:
>
>  emit_operand(Register, Register);
>
> Am I missing something here?
>
> -- Christian
>




More information about the hotspot-compiler-dev mailing list