RFR: 8344356: Aarch64: implement -XX:+VerifyActivationFrameSize [v2]

SendaoYan syan at openjdk.org
Tue Nov 19 12:37:47 UTC 2024


On Tue, 19 Nov 2024 10:47:17 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> SendaoYan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   use cmp instead cmpw
>
> src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp line 399:
> 
>> 397:     sub(rscratch2, rfp, esp);
>> 398:     unsigned char min_frame_size = (frame::link_offset - frame::interpreter_frame_mirror_offset) * wordSize;
>> 399:     cmp(rscratch2, min_frame_size);
> 
> Suggestion:
> 
>     int min_frame_size = (frame::link_offset - frame::interpreter_frame_mirror_offset) * wordSize;
>     subs(rscratch2, rscratch2, min_frame_size);
> 
> The use of `subs` here is a bit odd, but it's less odd than defining `min_frame_size` as unsigned char.

Thanks your patient review and advice. The `cmp` has been replaced as `subs`.
The subs was translate to 3 instructions as expected:

sub    x9, x29, x20
subs   x9, x9, #0x50
b.ge    L

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22181#discussion_r1848280473


More information about the hotspot-compiler-dev mailing list