Merging r244237:
------------------------------------------------------------------------
r244237 | rengolin | 2015-08-06 11:15:17 -0700 (Thu, 06 Aug 2015) | 10 lines

[ARM/Unwind] Fix wrong usage of write-back on register save

The register save routine in libunwind was using write-back addressing
mode to r0 for thumb, when that was not only different from the ARM
version and more importantly the register restore, but also saving the
wrong address.

Patch by Manuel Freiberger.

Fixes PR24331.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/libunwind/branches/release_37@244242 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/src/UnwindRegistersSave.S b/src/UnwindRegistersSave.S
index d26908c..fed295a 100644
--- a/src/UnwindRegistersSave.S
+++ b/src/UnwindRegistersSave.S
@@ -301,7 +301,7 @@
   .p2align 2
 DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
 #if !defined(__ARM_ARCH_ISA_ARM)
-  stm r0!, {r0-r7}
+  stm r0, {r0-r7}
   mov r2, sp
   mov r3, lr
   str r2, [r0, #52]