On Mon, 7 Feb 2022 11:11:02 GMT, Andrew Haley <a...@openjdk.org> wrote:

>> Alan Hayward has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Documentation updates
>
> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 5328:
> 
>> 5326: // Uses the FP from the start of the function as the modifier - which 
>> is stored at the address of
>> 5327: // the current FP.
>> 5328: //
> 
> Is it? C2 uses FP as a scratch register. I guess we know that this is never 
> used in C2-generated code? I'm tempted to put an assertion here, just in 
> case. Or does it not matter?

Allocating FP is disabled for rop protection:

aarch64.md has:
// r29 is not allocatable when PreserveFramePointer or ROP protection is on
if (PreserveFramePointer || VM_Version::use_rop_protection()) {

I think that covers it.
What assertion would you want to check?

-------------

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

Reply via email to