RFR: 8344526: RISC-V: implement -XX:+VerifyActivationFrameSize [v3]
SendaoYan
syan at openjdk.org
Wed Nov 20 12:52:39 UTC 2024
On Wed, 20 Nov 2024 10:46:33 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> src/hotspot/cpu/riscv/interp_masm_riscv.cpp line 447:
>>
>>> 445: sub(t1, fp, esp);
>>> 446: sub(t1, t1, frame::metadata_words * wordSize); // Exclude 2 frame metadata words
>>> 447: int min_frame_size = (frame::link_offset - frame::interpreter_frame_initial_sp_offset) * wordSize;
>>
>> Could we also remove the above `sub`, and add `frame::metadata_words * wordSize` in this statement? it's not necessary to calculate the value in the generated code and seems to me the code will be more straight.
>
> Yeah, I agree that will be cleaner.
>
> int min_frame_size = (frame::link_offset - frame::interpreter_frame_initial_sp_offset + frame::metadata_words) * wordSize;
Thanks, the second `sub` calculation has been merged to `min_frame_size ` statement.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22264#discussion_r1850260693
More information about the hotspot-compiler-dev
mailing list