ARM/Linux Regression Fix of Exception Handling (dotnet/coreclr#5596)
authorMyungJoo Ham <myungjoo.ham@gmail.com>
Thu, 9 Jun 2016 08:40:18 +0000 (17:40 +0900)
committerJan Vorlicek <janvorli@microsoft.com>
Thu, 9 Jun 2016 08:40:18 +0000 (10:40 +0200)
This fixes the regression caused by
dotnet/coreclr@594b424e1328135049cf0515bc5fc58b91f07e2a, which
intended to fix dotnet/coreclr#5358 while breaking many of
exception handling unit test cases.

The commit fixing dotnet/coreclr#5358 was an incorrect translation
of x86 assembly code.

Fix dotnet/coreclr#5595, dotnet/coreclr#5358.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/6287c789b95e5a32100e09d97c568363f4d2d791

src/coreclr/src/pal/src/arch/arm/exceptionhelper.S

index d7f85e7..ed1c9c3 100644 (file)
@@ -22,12 +22,7 @@ LEAF_ENTRY ThrowExceptionFromContextInternal, _TEXT
     ldr        r10,    [r0, #(CONTEXT_R10)]
     ldr        r11,    [r0, #(CONTEXT_R11)]
     ldr        sp,     [r0, #(CONTEXT_Sp)]
-
-    ldr        r2,     [r0, #(CONTEXT_Pc)]
-
-    // Store return address to the stack
-    // Added r7 as a dummy to keep the stack aligned by 8 bytes.
-    push    {r2, r7}
+    ldr        lr,     [r0, #(CONTEXT_Pc)]
 
     // The PAL_SEHException pointer
     mov        r0,     r1