[9] RFR(S): 8068945: Use RBP register as proper frame pointer in JIT compiled code on x86

Zoltán Majó zoltan.majo at oracle.com
Mon Mar 30 15:30:20 UTC 2015


Hi Roland,


thank you for your feedback!

On 03/30/2015 10:51 AM, Roland Westrelin wrote:
>
>> Webrev: http://cr.openjdk.java.net/~zmajo/8068945/webrev.00/
> macroAssembler_x86.cpp
>
> Don’t you need:
>
> mov(rbp, rsp);
>
> in the else branch of:
>
> 6118   if (stack_bang_size > 0) {
>
> (and then update MachPrologNode::format())

Yes, saving the rsp into rbp is needed in the else branch as well.

> x86_32.ad
>
> typo:
> 126 // Class for no reigsters (empty set).

Corrected.

> Rather than defining, for instance, dyn_ptr_reg in terms of ptr_reg and ptr_no_rbp_reg and then changing all references to ptr_reg into dyn_ptr_reg, I would have defined ptr_reg as either ptr_reg_with_rbp or ptr_reg_no_rbp and left the rest of the code unchanged.

I changed the naming of the register classes according to your 
suggestions for both x86_32 and x86_64.

> x86_64.ad
>
> 3211   match(rbp_RegP);
> 3227   match(rbp_RegP);
>
> I think it’s safe to keep rbp here.

I agree with you, thank you for spotting that!

Here is the updated version of the webrev (webrev.01):

http://cr.openjdk.java.net/~zmajo/8068945/webrev.01/

I tested the updated version with JPRT and also with all 
java/lang/invoke tests. All tests pass.

Thank you and best regards,


Zoltan


>
> Roland.



More information about the hotspot-compiler-dev mailing list