Skip to content

Commit 558d063

Browse files
committed
8361536: [s390x] Saving return_pc at wrong offset
Reviewed-by: lucy, mdoerr
1 parent 584137c commit 558d063

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

src/hotspot/cpu/s390/stubGenerator_s390.cpp

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,16 @@ class StubGenerator: public StubCodeGenerator {
164164

165165
// Save non-volatile registers to ABI of caller frame.
166166
BLOCK_COMMENT("save registers, push frame {");
167-
__ z_stmg(Z_R6, Z_R14, 16, Z_SP);
168-
__ z_std(Z_F8, 96, Z_SP);
169-
__ z_std(Z_F9, 104, Z_SP);
170-
__ z_std(Z_F10, 112, Z_SP);
171-
__ z_std(Z_F11, 120, Z_SP);
172-
__ z_std(Z_F12, 128, Z_SP);
173-
__ z_std(Z_F13, 136, Z_SP);
174-
__ z_std(Z_F14, 144, Z_SP);
175-
__ z_std(Z_F15, 152, Z_SP);
167+
__ save_return_pc();
168+
__ z_stmg(Z_R6, Z_R13, 16, Z_SP);
169+
__ z_std(Z_F8, 80, Z_SP);
170+
__ z_std(Z_F9, 88, Z_SP);
171+
__ z_std(Z_F10, 96, Z_SP);
172+
__ z_std(Z_F11, 104, Z_SP);
173+
__ z_std(Z_F12, 112, Z_SP);
174+
__ z_std(Z_F13, 120, Z_SP);
175+
__ z_std(Z_F14, 128, Z_SP);
176+
__ z_std(Z_F15, 136, Z_SP);
176177

177178
//
178179
// Push ENTRY_FRAME including arguments:
@@ -337,15 +338,16 @@ class StubGenerator: public StubCodeGenerator {
337338
__ z_lg(r_arg_result_type, result_type_offset, r_entryframe_fp);
338339

339340
// Restore non-volatiles.
340-
__ z_lmg(Z_R6, Z_R14, 16, Z_SP);
341-
__ z_ld(Z_F8, 96, Z_SP);
342-
__ z_ld(Z_F9, 104, Z_SP);
343-
__ z_ld(Z_F10, 112, Z_SP);
344-
__ z_ld(Z_F11, 120, Z_SP);
345-
__ z_ld(Z_F12, 128, Z_SP);
346-
__ z_ld(Z_F13, 136, Z_SP);
347-
__ z_ld(Z_F14, 144, Z_SP);
348-
__ z_ld(Z_F15, 152, Z_SP);
341+
__ restore_return_pc();
342+
__ z_lmg(Z_R6, Z_R13, 16, Z_SP);
343+
__ z_ld(Z_F8, 80, Z_SP);
344+
__ z_ld(Z_F9, 88, Z_SP);
345+
__ z_ld(Z_F10, 96, Z_SP);
346+
__ z_ld(Z_F11, 104, Z_SP);
347+
__ z_ld(Z_F12, 112, Z_SP);
348+
__ z_ld(Z_F13, 120, Z_SP);
349+
__ z_ld(Z_F14, 128, Z_SP);
350+
__ z_ld(Z_F15, 136, Z_SP);
349351
BLOCK_COMMENT("} restore");
350352

351353
//

0 commit comments

Comments
 (0)