diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-11-22 18:12:04 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-11-22 18:12:04 +0000 |
| commit | eb56dca4fd5a0d08dbb869478f4d78dd2e2c1979 (patch) | |
| tree | 9b8fd8127ec14fc207515c8798ec1467da9a1d2e /clang/lib/Basic/FileManager.cpp | |
| parent | abc0204bf65f5d9cd7b6ffb943b08c83182af51d (diff) | |
| download | llvm-eb56dca4fd5a0d08dbb869478f4d78dd2e2c1979.zip llvm-eb56dca4fd5a0d08dbb869478f4d78dd2e2c1979.tar.gz llvm-eb56dca4fd5a0d08dbb869478f4d78dd2e2c1979.tar.bz2 | |
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
llvm-svn: 119977
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
0 files changed, 0 insertions, 0 deletions
