[lworld] RFR: 8371993: [lworld] Aarch64: save bad values instead of rfp and lr above the extension space [v2]

Marc Chevalier mchevalier at openjdk.org
Fri Nov 28 14:15:04 UTC 2025


On Fri, 28 Nov 2025 12:49:03 GMT, Marc Chevalier <mchevalier at openjdk.org> wrote:

>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp line 192:
>> 
>>> 190: 
>>> 191:   // Frame creation and destruction shared between JITs.
>>> 192:   void build_frame(int framesize DEBUG_ONLY(COMMA bool save_fake_rfp_lr));
>> 
>> Suggestion:
>> 
>>   void build_frame(int framesize DEBUG_ONLY(COMMA bool save_fake_rfp_lr = false));
>> 
>> 
>> So you can leave the C1 code untouched.
>
> I'm not fan of optional arguments, they make maintenance difficult when changing the arity of such a function, with new parameters of compatible types. What about an overload that would just call `build_frame(framesize, false)`?

Here is an overload version of it. I think it looks more complex, but I don't think it actually is and it's less a footgun for future us. Good enough or you strongly prefer an optional argument?

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1764#discussion_r2571804666


More information about the valhalla-dev mailing list