From 093dc0e035d1e15ed4a82d4e6afea3184ea211a5 Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Tue, 7 Aug 2018 17:47:43 -0700 Subject: Fix non-Windows assembly code to match Windows calldescr/arg reg changes. --- src/vm/arm64/asmhelpers.S | 4 ++-- src/vm/arm64/calldescrworkerarm64.S | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/vm') diff --git a/src/vm/arm64/asmhelpers.S b/src/vm/arm64/asmhelpers.S index 23f591fccc..ac6f96552a 100644 --- a/src/vm/arm64/asmhelpers.S +++ b/src/vm/arm64/asmhelpers.S @@ -562,7 +562,7 @@ LEAF_END SinglecastDelegateInvokeStub, _TEXT #ifdef FEATURE_COMINTEROP #define ComCallPreStub_FrameSize (SIZEOF__GSCookie + SIZEOF__ComMethodFrame) -#define ComCallPreStub_FirstStackAdjust (SIZEOF__ArgumentRegisters + 2 * 8) // reg args , fp & lr already pushed +#define ComCallPreStub_FirstStackAdjust (8 + SIZEOF__ArgumentRegisters + 2 * 8) // x8, reg args , fp & lr already pushed #define ComCallPreStub_StackAlloc0 (ComCallPreStub_FrameSize - ComCallPreStub_FirstStackAdjust) #define ComCallPreStub_StackAlloc1 (ComCallPreStub_StackAlloc0 + SIZEOF__FloatArgumentRegisters + 8)// 8 for ErrorReturn #define ComCallPreStub_StackAlloc (ComCallPreStub_StackAlloc1 + (ComCallPreStub_StackAlloc1 & 8)) @@ -692,7 +692,7 @@ COMToCLRDispatchHelper_RegSetup ldp x2, x3, [x1, #(SIZEOF__ComMethodFrame - SIZEOF__ArgumentRegisters + 16)] ldp x4, x5, [x1, #(SIZEOF__ComMethodFrame - SIZEOF__ArgumentRegisters + 32)] ldp x6, x7, [x1, #(SIZEOF__ComMethodFrame - SIZEOF__ArgumentRegisters + 48)] - ldr x8, [x1, #(SIZEOF__ComMethodFrame - SIZEOF__ArgumentRegisters + 64)] + ldr x8, [x1, #(SIZEOF__ComMethodFrame - SIZEOF__ArgumentRegisters - 8)] ldr x1, [x1, #(SIZEOF__ComMethodFrame - SIZEOF__ArgumentRegisters + 8)] diff --git a/src/vm/arm64/calldescrworkerarm64.S b/src/vm/arm64/calldescrworkerarm64.S index 5bcad2f9c0..c3ce06aa72 100644 --- a/src/vm/arm64/calldescrworkerarm64.S +++ b/src/vm/arm64/calldescrworkerarm64.S @@ -62,7 +62,10 @@ LOCAL_LABEL(NoFloatingPoint): ldp x2, x3, [x9, #16] ldp x4, x5, [x9, #32] ldp x6, x7, [x9, #48] - ldr x8, [x9, #64] + + // Copy pRetBuffArg into x8 + ldr x9, [x19,#CallDescrData__pRetBuffArg] + ldr x8, [x9] // call pTarget ldr x9, [x19,#CallDescrData__pTarget] -- cgit v1.2.3