From 14c3c4bb85e9a2fb8178a09981a0310c997e9ffc Mon Sep 17 00:00:00 2001 From: Renato Golin Date: Thu, 6 Aug 2015 18:15:17 +0000 Subject: [PATCH] [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. llvm-svn: 244237 --- libunwind/src/UnwindRegistersSave.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libunwind/src/UnwindRegistersSave.S b/libunwind/src/UnwindRegistersSave.S index d26908c..fed295a 100644 --- a/libunwind/src/UnwindRegistersSave.S +++ b/libunwind/src/UnwindRegistersSave.S @@ -301,7 +301,7 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext) .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] -- 2.7.4