RFR: 8350482: [s390x] Relativize esp in interpreter frames

Amit Kumar amitkumar at openjdk.org
Mon May 12 10:03:52 UTC 2025


On Mon, 12 May 2025 09:18:09 GMT, Lutz Schmidt <lucy at openjdk.org> wrote:

>> Relativize esp in interpreter frames.
>> 
>> This PR depends on https://github.com/openjdk/jdk/pull/23660 and couple of merge conflicts I expect from https://github.com/openjdk/jdk/pull/23690 and https://github.com/openjdk/jdk/pull/23708.
>
> src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp line 1186:
> 
>> 1184:   __ z_sgrk(Z_R0, Z_esp, fp);
>> 1185:   __ z_srag(Z_R0, Z_R0, Interpreter::logStackElementSize);
>> 1186:   __ z_stg(Z_R0, _z_ijava_state_neg(esp), fp);
> 
> Please use `save_esp()` here to avoid code duplication.

`save_esp()` uses `Z_fp` which is `Z_R9`. But here `fp` refers to `Z_R11` or `Z_tmp_2`. 

One possibility is to modify `save_esp` and make sure that it takes `fp` as an argument. Other way it leave it as-it-is. Which one do you prefer.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23724#discussion_r2084318362


More information about the hotspot-dev mailing list