Remove deprecated use of ldm/stm in ARM setjmp.

ARM deprecates using the SP register in the register lists for ldm
and stm, which LLVM emits a warning for.

Bug: http://b/25017080
Change-Id: Ib427e3dfd5740e251f1ad91ebb66534e0d7b72a9
This commit is contained in:
Josh Gao 2015-10-19 12:56:50 -07:00
parent d29ba55513
commit b24d743f62
1 changed files with 8 additions and 2 deletions

View File

@ -151,7 +151,10 @@ ENTRY(sigsetjmp)
// Save core registers.
add r1, r0, #(_JB_CORE_BASE * 4)
m_mangle_registers r2
stmia r1, {r4-r14}
// ARM deprecates using sp in the register list for stmia.
stmia r1, {r4-r12, lr}
str sp, [r1, #(10 * 4)]
m_unmangle_registers r2
// Save floating-point registers.
@ -204,7 +207,10 @@ ENTRY(siglongjmp)
ldr r3, [r0, #(_JB_SIGFLAG * 4)]
bic r3, r3, #1
add r2, r0, #(_JB_CORE_BASE * 4)
ldmia r2, {r4-r14}
// ARM deprecates using sp in the register list for ldmia.
ldmia r2, {r4-r12, lr}
ldr sp, [r2, #(10 * 4)]
m_unmangle_registers r3
// Save the return value/address and check the setjmp cookie.