summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2015-08-06 18:15:17 +0000
committerRenato Golin <renato.golin@linaro.org>2015-08-06 18:15:17 +0000
commit14c3c4bb85e9a2fb8178a09981a0310c997e9ffc (patch)
tree939f1370b58ab8b6f9c2241e574c1ee43ca1563a
parent45c20b474e8057b8dae813b799136ca4d36bdcb7 (diff)
downloadbcm5719-llvm-14c3c4bb85e9a2fb8178a09981a0310c997e9ffc.tar.gz
bcm5719-llvm-14c3c4bb85e9a2fb8178a09981a0310c997e9ffc.zip
[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
-rw-r--r--libunwind/src/UnwindRegistersSave.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/libunwind/src/UnwindRegistersSave.S b/libunwind/src/UnwindRegistersSave.S
index d26908c7648..fed295af040 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]
OpenPOWER on IntegriCloud