revert between 56095 -> 55830 in arch
[AROS.git] / arch / arm-all / stdc / setjmp.s
blobe020c8dcb80f0d6b6bcbada3fdbac6ebdc43364d
1 /*
2 * setjmp.s
4 * Created on: Aug 5, 2009
5 * Author: misc
6 * $Id$
7 */
9 #include "aros/arm/asm.h"
11 .text
12 .align 2
13 .global AROS_CDEFNAME(setjmp)
14 .type AROS_CDEFNAME(setjmp),%function
16 AROS_CDEFNAME(setjmp):
17 mov ip, r0 /* Get the env address */
18 str lr, [ip], #4 /* store return address explicitly */
19 stmia ip!, {r4, r5, r6, r7, r8, r9, sl, fp, sp} /* store non-scratch regs */
20 mov r0, #0 /* return zero */
21 #ifdef __SOFTFP__
22 ldr r1, 1f
23 ldr r1, [r1]
24 mov r2, AttnFlags
25 ldrh r1, [r1, r2]
26 tst r1, AFF_FPU
27 bxeq lr
28 #endif
29 fstmiax ip!, {d8-d15} /* Store VFP registers - we assume they are available! */
30 fmrx r2, fpscr /* VFP condition codes */
31 str r2, [ip], #4
32 bx lr
33 #ifdef __SOFTFP__
34 1: .word SysBase
35 #endif