Patch configure so that we dont need a seperate spec file for x86_64. Pass info about...
[AROS.git] / arch / m68k-all / kernel / fpurestorecontext.S
blob75ceeaf7e6e384a14d4d6fdcd50dcbf03de2092e
1 /*****************************************************************************
3     NAME
4 #include <proto/kernel.h>
6 AROS_UFH2(void, FpuRestoreContext,
7         AROS_UFHA(struct FpuContext *, fpu, A0)
8         AROS_UFHA(UWORD, nulloffset, D0))
10     SYNOPSIS
12     LOCATION
14     FUNCTION
15         Restore FPU Context
17     INPUTS
18         None
20     RESULT
21         None
23     NOTES
24         Must be called in supervisor mode.
26     EXAMPLE
28     BUGS
30     SEE ALSO
32     INTERNALS
34 ******************************************************************************/
35         #include "aros/m68k/asm.h"
37         .text
38         .balign 4
39         .globl  FpuRestoreContext
41 FpuRestoreContext:
42         tst.b           3*4 + 8*12(%a0,%d0.w)
43         beq.s           0f
44         fmovem.l        %a0@,%fpcr/%fpsr/%fpiar
45         fmovem.x        %a0@(3*4),%fp0-%fp7
46 0:      frestore        %a0@(3*4 + 8*12)
47         rts