From: MyungJoo Ham Date: Wed, 1 Jun 2016 10:22:10 +0000 (+0900) Subject: ARM/Linux: Fix Exception Handler PAL Test Fail (dotnet/coreclr#5360) X-Git-Tag: submit/tizen/20210909.063632~11030^2~10305 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=278f641cc2937ecf07db2f5f0e52bc5fd6eb7b4b;p=platform%2Fupstream%2Fdotnet%2Fruntime.git ARM/Linux: Fix Exception Handler PAL Test Fail (dotnet/coreclr#5360) The return address should be kept intact, not recovered just yet. It is going to be recovered by libgcc's rescore_core_regs much later, few instructions before heading back to "catch". Fixes dotnet/coreclr#5358 Commit migrated from https://github.com/dotnet/coreclr/commit/594b424e1328135049cf0515bc5fc58b91f07e2a --- diff --git a/src/coreclr/src/pal/src/arch/arm/exceptionhelper.S b/src/coreclr/src/pal/src/arch/arm/exceptionhelper.S index b7140e8..d7f85e7 100644 --- a/src/coreclr/src/pal/src/arch/arm/exceptionhelper.S +++ b/src/coreclr/src/pal/src/arch/arm/exceptionhelper.S @@ -22,12 +22,12 @@ LEAF_ENTRY ThrowExceptionFromContextInternal, _TEXT ldr r10, [r0, #(CONTEXT_R10)] ldr r11, [r0, #(CONTEXT_R11)] ldr sp, [r0, #(CONTEXT_Sp)] - ldr lr, [r0, #(CONTEXT_Lr)] ldr r2, [r0, #(CONTEXT_Pc)] // Store return address to the stack - push {r2} + // Added r7 as a dummy to keep the stack aligned by 8 bytes. + push {r2, r7} // The PAL_SEHException pointer mov r0, r1