Request for review (L): 6797305: Add LoadUB and LoadUI opcode class

Tom Rodriguez Thomas.Rodriguez at Sun.COM
Tue Mar 3 10:13:21 PST 2009


On Mar 2, 2009, at 2:30 AM, Christian Thalinger wrote:

> On Fri, 2009-02-27 at 14:58 -0800, Tom Rodriguez wrote:
>> I've added some more parsing lookahead to deal with this case  
>> properly
>> and updated the address webrev to include it.  $mem$$base$$Register
>> and $mem$$index$$Register should now emit properly.
>
> Works great, thanks!  Now there are only two small things left:
>
> - Something like $dst$$Register$high or $dst$$HighRegister for x86_32,
> so the long HIGH_FROM_LOW macro can be omitted.  The same for $low  
> would
> also be nice, just to make it more obvious.

The HIGH_FROM_LOW macro is dependent on the register encoding that  
x86_32.ad uses so it would need to be revisited.  $$reg returns the  
encoding for the register and the ordering of the registers pairs in  
alloc_class chunk0 makes it so the encoding of the pairs matches  
this.  So we end up emitting (opnd_array(0)->reg(ra_,this)+2) to  
produce the encoding.  If we made something like $$second it should  
rely on the OptoReg numbering for this instead.  Basically we should  
grab the next optoreg and ask for the encoding of that.  So we would  
emit something like Matcher::_regEncode[_ra->get_reg_second(node)].   
This could be wrapped up in MachOper::reg_second.

> - Similar to the one above for $mem, e.g. $mem$$Address$high, for long
> memory accesses.  Currently I'm using:
>
>  ins_encode %{
>    Address Amemlo = Address::make_raw($mem$$base, $mem$$index, $mem$ 
> $scale, $mem$$disp, false);
>    Address Amemhi = Address::make_raw($mem$$base, $mem$$index, $mem$ 
> $scale, $mem$$disp + 4, false);
>    __ movl($dst$$Register, Amemlo);
>    __ movl(HIGH_FROM_LOW($dst$$Register), Amemhi);
>  %}

I think that would be ok.

tom

>
>
> I can try to add that functionality, but I wanted to ask if there is
> already something like that?
>
> -- Christian
>




More information about the hotspot-compiler-dev mailing list