revert between 56095 -> 55830 in arch
[AROS.git] / arch / armeb-all / posixc / vfork_longjmp.s
blobdc55e5fec02359ed07a8fe486e3521ddc60ee17f
1 /*
2 * vfork_longjmp.s
4 * Created on: Aug 5, 2009
5 * Author: misc
7 * $Id$
8 */
10 #include "aros/armeb/asm.h"
12 .text
13 .align 2
14 .global AROS_CDEFNAME(vfork_longjmp)
15 .type AROS_CDEFNAME(vfork_longjmp),%function
17 AROS_CDEFNAME(vfork_longjmp):
18 mov ip, r0 /* env into ip register */
19 ldr lr, [ip], #4 /* restore return address */
20 mov r0, r1 /* return value from longjmp into r0 and generate condition code */
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