From b6f5c96f00d4194ada2590c11677832b1aea3e4e Mon Sep 17 00:00:00 2001 From: Jonghyun Park Date: Thu, 27 Apr 2017 23:50:39 +0900 Subject: [PATCH] [x86/Linux] Disable USE_CALLER_SP_IN_FUNCLET in EH (dotnet/coreclr#11247) Commit migrated from https://github.com/dotnet/coreclr/commit/5c8a5a3d53f75b05fee15925e7a99843008765c9 --- src/coreclr/src/vm/exceptionhandling.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/coreclr/src/vm/exceptionhandling.cpp b/src/coreclr/src/vm/exceptionhandling.cpp index 7030ef5..abea194 100644 --- a/src/coreclr/src/vm/exceptionhandling.cpp +++ b/src/coreclr/src/vm/exceptionhandling.cpp @@ -25,11 +25,15 @@ #define VSD_STUB_CAN_THROW_AV #endif // _TARGET_ARM_ || _TARGET_X86_ +#if defined(_TARGET_ARM_) || defined(_TARGET_ARM64_) +// ARM/ARM64 uses Caller-SP to locate PSPSym in the funclet frame. +#define USE_CALLER_SP_IN_FUNCLET +#endif // _TARGET_ARM_ || _TARGET_ARM64_ + #if defined(_TARGET_ARM_) || defined(_TARGET_ARM64_) || defined(_TARGET_X86_) #define ADJUST_PC_UNWOUND_TO_CALL #define STACK_RANGE_BOUNDS_ARE_CALLER_SP #define USE_FUNCLET_CALL_HELPER -#define USE_CALLER_SP_IN_FUNCLET // For ARM/ARM64, EstablisherFrame is Caller-SP (SP just before executing call instruction). // This has been confirmed by AaronGi from the kernel team for Windows. // -- 2.7.4