2009-05-13 Paul Brook <paul@codesourcery.com>
* libc/machine/arm/setjmp.S: Don't bother saving IP. Copy SP to IP before saving. Likewise when restoring.
This commit is contained in:
parent
eba36c51fa
commit
5900080d7d
|
@ -1,3 +1,8 @@
|
||||||
|
2009-05-13 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
|
* libc/machine/arm/setjmp.S: Don't bother saving IP. Copy SP to
|
||||||
|
IP before saving. Likewise when restoring.
|
||||||
|
|
||||||
2009-05-13 Paul Brook <paul@codesourcery.com>
|
2009-05-13 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
* libc/machine/arm/setjmp.S: Add ARMv6-M implementation.
|
* libc/machine/arm/setjmp.S: Add ARMv6-M implementation.
|
||||||
|
|
|
@ -170,8 +170,8 @@ SYM (\name):
|
||||||
|
|
||||||
/* Save all the callee-preserved registers into the jump buffer. */
|
/* Save all the callee-preserved registers into the jump buffer. */
|
||||||
#ifdef __thumb2__
|
#ifdef __thumb2__
|
||||||
|
mov ip, sp
|
||||||
stmea a1!, { v1-v7, fp, ip, lr }
|
stmea a1!, { v1-v7, fp, ip, lr }
|
||||||
str sp, [a1],#+4
|
|
||||||
#else
|
#else
|
||||||
stmea a1!, { v1-v7, fp, ip, sp, lr }
|
stmea a1!, { v1-v7, fp, ip, sp, lr }
|
||||||
#endif
|
#endif
|
||||||
|
@ -198,7 +198,7 @@ SYM (\name):
|
||||||
/* Restore the registers, retrieving the state when setjmp() was called. */
|
/* Restore the registers, retrieving the state when setjmp() was called. */
|
||||||
#ifdef __thumb2__
|
#ifdef __thumb2__
|
||||||
ldmfd a1!, { v1-v7, fp, ip, lr }
|
ldmfd a1!, { v1-v7, fp, ip, lr }
|
||||||
ldr sp, [a1],#+4
|
mov sp, ip
|
||||||
#else
|
#else
|
||||||
ldmfd a1!, { v1-v7, fp, ip, sp, lr }
|
ldmfd a1!, { v1-v7, fp, ip, sp, lr }
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue