revert between 56095 -> 55830 in arch
[AROS.git] / arch / armeb-all / posixc / siglongjmp.s
blob9306e211aca578e94213610ae9ff4c227bcfb765
1 /*
2 Copyright © 2015, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: ANSI C function siglongjmp()
6 Lang: english
7 */
9 #include "aros/armeb/asm.h"
11 .text
12 .align 2
13 .global AROS_CDEFNAME(siglongjmp)
14 .type AROS_CDEFNAME(siglongjmp),%function
16 AROS_CDEFNAME(siglongjmp):
17 mov ip, r0 /* env into ip register */
18 ldr lr, [ip], #4 /* restore return address */
19 movs r0, r1 /* return value from siglongjmp into r0 and generate condition code */
20 moveq r0, #1 /* if retval = 0, then retval = 1 */
21 ldmia ip!, {r4, r5, r6, r7, r8, r9, sl, fp, sp} /* restore non-scratch regs */
22 #ifdef __SOFTFP__
23 ldr r1, 1f
24 ldr r1, [r1]
25 mov r2, AttnFlags
26 ldrh r1, [r1, r2]
27 tst r1, AFF_FPU
28 bxeq lr
29 #endif
30 fldmiax ip!, {d8-d15} /* Restore VFP registers - we assume they are available! */
31 ldr r1, [ip], #4 /* restore VFP status reg */
32 fmxr fpscr, r1
33 bx lr /* Done! */
34 #ifdef __SOFTFP__
35 1: .word SysBase
36 #endif