mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 21:38:43 +00:00
[CRT]
setjmp is a macro expanding to _setjmp or _setjmpex. In soviet russia and on ARM builds, the compiler will convert invocation of _setjmp back into a call to setjmp. The compiler handles _setjmp and _setjmpex in the same way, generating code where r0 points to the jump_buf and r1 points to the current functions stack frame (sp on function entry). So make setjmp and _setjmp aliases to _setjmpex and make the latter use r1. svn path=/trunk/; revision=67729
This commit is contained in:
parent
2f20d0b140
commit
febee0a7a2
1 changed files with 7 additions and 5 deletions
|
@ -12,14 +12,13 @@
|
||||||
/* CODE **********************************************************************/
|
/* CODE **********************************************************************/
|
||||||
TEXTAREA
|
TEXTAREA
|
||||||
|
|
||||||
LEAF_ENTRY _setjmp
|
LEAF_ENTRY _setjmpex
|
||||||
|
|
||||||
mov r1, sp
|
|
||||||
|
|
||||||
/* Store r1 (->Frame) and r4 - r11 */
|
/* Store r1 (->Frame) and r4 - r11 */
|
||||||
stmia r0!, {r1,r4-r11}
|
stmia r0!, {r1,r4-r11}
|
||||||
|
|
||||||
/* Store r1 (->Sp), lr (->Pc), fp (->Fpscr) */
|
/* Store sp (->Sp), lr (->Pc), fp (->Fpscr) */
|
||||||
|
mov r1, sp
|
||||||
stmia r0!, {r1,lr,fp}
|
stmia r0!, {r1,lr,fp}
|
||||||
|
|
||||||
/* Store NEON registers */
|
/* Store NEON registers */
|
||||||
|
@ -35,7 +34,10 @@
|
||||||
/* Return 0 */
|
/* Return 0 */
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
bx lr
|
bx lr
|
||||||
LEAF_END _setjmp
|
LEAF_END _setjmpex
|
||||||
|
|
||||||
|
IMPORT _setjmp, WEAK _setjmpex
|
||||||
|
IMPORT setjmp, WEAK _setjmpex
|
||||||
|
|
||||||
LEAF_ENTRY longjmp
|
LEAF_ENTRY longjmp
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue