From be67aaabe63a4440c64bf79b9fa0d1394ac87ddf Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Tue, 2 Mar 2021 09:56:05 +0000 Subject: [PATCH] 8262726: AArch64: C1 StubAssembler::call_RT can corrupt stack Reviewed-by: aph --- src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp b/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp index d4d74ac1f4fbc..7acc1bf19f2e1 100644 --- a/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp @@ -147,7 +147,7 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result, addre if (arg1 == c_rarg2 || arg1 == c_rarg3 || arg2 == c_rarg1 || arg2 == c_rarg3 || arg3 == c_rarg1 || arg3 == c_rarg2) { - stp(arg3, arg2, Address(pre(sp, 2 * wordSize))); + stp(arg3, arg2, Address(pre(sp, -2 * wordSize))); stp(arg1, zr, Address(pre(sp, -2 * wordSize))); ldp(c_rarg1, zr, Address(post(sp, 2 * wordSize))); ldp(c_rarg3, c_rarg2, Address(post(sp, 2 * wordSize)));