Move the FPU save/restore stuff from os.h to arch.h
[projects/cmucl/cmucl.git] / src / lisp / x86-arch.h
1 /*
2
3  This code was written as part of the CMU Common Lisp project and has
4  been placed in the public domain.
5
6 */
7 #ifndef __X86_ARCH_H
8
9 extern int arch_support_sse2(void);
10 extern boolean os_support_sse2(void);
11
12 /*
13  * Define macro to allocate a local array of the appropriate size
14  * where the fpu state can be stored.
15  */
16
17 #define FPU_STATE_SIZE 27
18
19 /* 
20  * Need 512 byte area, aligned on a 16-byte boundary.  So allocate
21  * 512+16 bytes of space and let the routine adjust the appropriate
22  * alignment.
23  */
24 #define SSE_STATE_SIZE ((512+16)/4)
25
26 /*
27  * Just use the SSE size for both x87 and sse2 since the SSE size is
28  * enough for either.
29  */
30 #define FPU_STATE(name)    int name[SSE_STATE_SIZE];
31
32 #endif