31 |
|
#include "sysdeps.h" |
32 |
|
#include "fpu/types.h" |
33 |
|
|
34 |
+ |
/* Always use x87 FPU stack on IA-32. */ |
35 |
+ |
#if defined(X86_ASSEMBLY) |
36 |
+ |
#define USE_X87_ASSEMBLY 1 |
37 |
+ |
#endif |
38 |
+ |
|
39 |
+ |
/* Only use x87 FPU on x86-64 if long double precision is requested. */ |
40 |
+ |
#if defined(X86_64_ASSEMBLY) && USE_LONG_DOUBLE |
41 |
+ |
#define USE_X87_ASSEMBLY 1 |
42 |
+ |
#endif |
43 |
+ |
|
44 |
|
/* ========================================================================== */ |
45 |
|
/* ========================= FPU CONTEXT DEFINITION ========================= */ |
46 |
|
/* ========================================================================== */ |
160 |
|
/* ---------------------------------------------------------------------- */ |
161 |
|
|
162 |
|
#if defined(FPU_X86) \ |
163 |
< |
|| (defined(FPU_UAE) && defined(X86_ASSEMBLY)) \ |
164 |
< |
|| (defined(FPU_IEEE) && defined(X86_ASSEMBLY)) |
163 |
> |
|| (defined(FPU_UAE) && defined(USE_X87_ASSEMBLY)) \ |
164 |
> |
|| (defined(FPU_IEEE) && defined(USE_X87_ASSEMBLY)) |
165 |
|
|
166 |
|
#define CW_RESET 0x0040 // initial CW value after RESET |
167 |
|
#define CW_FINIT 0x037F // initial CW value after FINIT |