Evan Cheng
ab5c703fdb
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
2010-11-22 18:12:04 +00:00
..
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-15 19:04:29 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-11-22 18:12:04 +00:00
2010-06-17 15:18:27 +00:00
2010-06-15 19:04:29 +00:00
2010-06-17 15:18:27 +00:00
2010-09-17 20:34:09 +00:00
2010-09-17 20:34:09 +00:00
2010-06-17 15:18:27 +00:00
2010-09-02 18:14:29 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-09-03 18:37:12 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-11-03 00:45:17 +00:00
2010-06-20 00:54:38 +00:00
2010-11-18 19:40:05 +00:00
2010-11-22 18:12:04 +00:00
2010-11-22 18:12:04 +00:00
2010-07-17 03:30:54 +00:00
2010-10-20 22:03:37 +00:00
2010-10-08 06:15:13 +00:00
2010-08-27 17:13:24 +00:00
2010-06-17 15:18:27 +00:00
2010-10-29 18:09:28 +00:00
2010-11-17 21:57:32 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-06-17 15:18:27 +00:00
2010-09-17 22:36:38 +00:00
2010-09-02 18:14:29 +00:00
2010-09-02 18:14:29 +00:00
2010-11-17 20:13:28 +00:00
2010-06-17 15:18:27 +00:00
2010-07-20 16:16:48 +00:00
2010-10-30 00:54:37 +00:00
2010-05-03 14:35:47 +00:00
2010-08-13 22:43:33 +00:00
2010-06-03 21:57:48 +00:00
2010-06-18 23:09:54 +00:00
2010-08-25 16:58:05 +00:00
2010-06-24 16:50:20 +00:00
2010-08-13 22:43:33 +00:00
2010-06-04 00:03:37 +00:00
2010-06-18 23:09:54 +00:00
2010-06-29 00:55:23 +00:00
2010-06-03 21:53:01 +00:00
2010-11-17 20:13:28 +00:00
2010-08-17 17:23:19 +00:00
2010-05-05 23:44:43 +00:00
2010-07-14 17:45:16 +00:00
2010-11-17 20:13:28 +00:00
2010-05-05 23:44:43 +00:00
2010-05-05 23:44:43 +00:00
2010-05-05 23:44:43 +00:00
2010-10-08 06:15:13 +00:00
2010-07-14 17:45:16 +00:00
2010-05-05 23:44:43 +00:00
2010-06-17 15:18:27 +00:00
2010-05-05 23:44:43 +00:00
2010-07-20 16:16:48 +00:00