Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Au <andrewau@microsoft.com>2018-04-12 18:31:30 +0300
committerAndrew Au <andrewau@microsoft.com>2018-04-12 18:31:30 +0300
commit4f0bf6e2390a082ddb133adbbe2ca9a31211211e (patch)
tree6e0de6df71d70f05dd2970f2583374ac1697f4da /src/Native
parent5a711701017a632d454151168b9b8957af019ac4 (diff)
UnwindRhpThrowHwEx - Fix the stack unwinding issue during hardware exception dispatch
[tfs-changeset: 1696204]
Diffstat (limited to 'src/Native')
-rw-r--r--src/Native/Runtime/arm64/ExceptionHandling.asm7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Native/Runtime/arm64/ExceptionHandling.asm b/src/Native/Runtime/arm64/ExceptionHandling.asm
index 1ea8520ef..c71194da9 100644
--- a/src/Native/Runtime/arm64/ExceptionHandling.asm
+++ b/src/Native/Runtime/arm64/ExceptionHandling.asm
@@ -15,15 +15,16 @@
;; Macro used to create frame of exception throwing helpers (RhpThrowEx, RhpThrowHwEx)
MACRO
ALLOC_THROW_FRAME $exceptionType
-
- PROLOG_NOP mov x3, sp
+ PROLOG_NOP mov x3, sp
+
;; Setup a PAL_LIMITED_CONTEXT on the stack {
- PROLOG_STACK_ALLOC 0x50
IF $exceptionType == HARDWARE_EXCEPTION
+ PROLOG_NOP sub sp,sp,#0x50
PROLOG_NOP stp x3, x1, [sp] ; x3 is the SP and x1 is the IP of the fault site
PROLOG_PUSH_MACHINE_FRAME
ELSE
+ PROLOG_STACK_ALLOC 0x50
PROLOG_NOP stp x3, lr, [sp] ; x3 is the SP and lr is the IP of the fault site
ENDIF
PROLOG_NOP stp d8, d9, [sp, #0x10]