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

Lutz Schmidt lucy at openjdk.org
Mon May 12 09:24:53 UTC 2025


On Fri, 21 Feb 2025 06:47:49 GMT, Amit Kumar <amitkumar 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.

Looks good overall.
Please consider my suggestion.

src/hotspot/cpu/s390/interp_masm_s390.cpp line 671:

> 669:   z_sgrk(Z_R1, Z_esp, Z_fp);
> 670:   z_srag(Z_R1, Z_R1, Interpreter::logStackElementSize);
> 671:   z_stg(Z_R1, Address(Z_fp, _z_ijava_state_neg(esp)));

Use `Z_R0` as scratch. `Z_R1` is "more valuable".

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.

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

Changes requested by lucy (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23724#pullrequestreview-2832490845
PR Review Comment: https://git.openjdk.org/jdk/pull/23724#discussion_r2084228831
PR Review Comment: https://git.openjdk.org/jdk/pull/23724#discussion_r2084225352


More information about the hotspot-dev mailing list