From 8737b292d81a753fc78ba600f574edaddfc37834 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 22 Apr 2016 06:49:35 -0700 Subject: ARM64: Fix Frame with VarArg Fixes https://github.com/dotnet/coreclr/issues/4424 JIT homes incoming vararg (8) registers to the top of the stack. When stack location is computed for local vars, JIT didn't take it into consideration causing the overlapped stack offsets for local vars and varargs. The stack offsets of local vars corresponding to varargs should point to this home area instead of the newly alloacted slot. --- src/jit/codegencommon.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/jit/codegencommon.cpp') diff --git a/src/jit/codegencommon.cpp b/src/jit/codegencommon.cpp index ab65d576c4..7daaff4826 100644 --- a/src/jit/codegencommon.cpp +++ b/src/jit/codegencommon.cpp @@ -3099,7 +3099,10 @@ void CodeGen::genGenerateCode(void * * codePtr, trackedStackPtrsContig = false; #elif defined(_TARGET_ARM_) // On arm due to prespilling of arguments, tracked stk-ptrs may not be contiguous - trackedStackPtrsContig = !compiler->opts.compDbgEnC && !compiler->compIsProfilerHookNeeded(); + trackedStackPtrsContig = !compiler->opts.compDbgEnC && !compiler->compIsProfilerHookNeeded(); +#elif defined(_TARGET_ARM64_) + // Incoming vararg registers are homed on the top of the stack. Tracked var may not be contiguous. + trackedStackPtrsContig = !compiler->opts.compDbgEnC && !compiler->info.compIsVarArgs; #else trackedStackPtrsContig = !compiler->opts.compDbgEnC; #endif -- cgit v1.2.3