Do NOT overwrite the stack frame pointer (dotnet/coreclr#4857)
authorJonghyun Park <parjong@gmail.com>
Mon, 9 May 2016 09:46:10 +0000 (18:46 +0900)
committerJan Vorlicek <janvorli@microsoft.com>
Mon, 9 May 2016 09:46:10 +0000 (11:46 +0200)
CallEHFunclet currently overwrite the stack frame pointer (R7) while
recovering the registers.

This commit revises CallEHFunclet not to overwrite R7 when recoverint
the registers.

Commit migrated from https://github.com/dotnet/coreclr/commit/c55a8bd0b5949d5ed70c54a41aaab7d7b95fd8e5

src/coreclr/src/vm/arm/ehhelpers.S

index 75957fb..88afc43 100644 (file)
@@ -114,7 +114,9 @@ OFFSET_OF_FRAME=(4 + SIZEOF__GSCookie)
         // Save the SP of this function
         str sp, [r3]
         // apply the non-volatiles corresponding to the CrawlFrame
-        ldm r2, {r4-r11}
+        ldm r2!, {r4-r6}
+        add r2, r2, #4
+        ldm r2!, {r8-r11}
         // Invoke the funclet
         blx r1