aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/ELFObjectWriter.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-11-22 18:12:04 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-11-22 18:12:04 +0000
commitab5c703fdb0b07c6d89271519fd1cca7105b3eae (patch)
tree52b8ff64598ea781f1e347405867c74989a11920 /lib/MC/ELFObjectWriter.cpp
parent4d5a29979000e1d5afc6c31239fe12d888027f4c (diff)
Fix epilogue codegen to avoid leaving the stack pointer in an invalid
state. Previously Thumb2 would restore sp from fp like this: mov sp, r7 sub, sp, #4 If an interrupt is taken after the 'mov' but before the 'sub', callee-saved registers might be clobbered by the interrupt handler. Instead, try restoring directly from sp: add sp, #4 Or, if necessary (with VLA, etc.) use a scratch register to compute sp and then restore it: sub.w r4, r7, #8 mov sp, r7 rdar://8465407 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/ELFObjectWriter.cpp')
0 files changed, 0 insertions, 0 deletions