Dont compile in SSE fxsave/fxrstor instructions if CPU_ENABLE_SSE isn't

active.
This commit is contained in:
Peter Wemm 2001-08-23 01:03:56 +00:00
parent 84031c85e5
commit 3b703181e3
4 changed files with 60 additions and 24 deletions

View File

@ -100,8 +100,10 @@
#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=m" (*(addr)))
#define fp_divide_by_0() __asm("fldz; fld1; fdiv %st,%st(1); fnop")
#define frstor(addr) __asm("frstor %0" : : "m" (*(addr)))
#ifdef CPU_ENABLE_SSE
#define fxrstor(addr) __asm("fxrstor %0" : : "m" (*(addr)))
#define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr)))
#endif
#define start_emulating() __asm("smsw %%ax; orb %0,%%al; lmsw %%ax" \
: : "n" (CR0_TS) : "ax")
#define stop_emulating() __asm("clts")
@ -116,8 +118,10 @@ void fnstcw __P((caddr_t addr));
void fnstsw __P((caddr_t addr));
void fp_divide_by_0 __P((void));
void frstor __P((caddr_t addr));
#ifdef CPU_ENABLE_SSE
void fxsave __P((caddr_t addr));
void fxrstor __P((caddr_t addr));
#endif
void start_emulating __P((void));
void stop_emulating __P((void));
@ -921,20 +925,25 @@ fpusave(addr)
union savefpu *addr;
{
if (!cpu_fxsr)
fnsave(addr);
else
#ifdef CPU_ENABLE_SSE
if (cpu_fxsr)
fxsave(addr);
else
#endif
fnsave(addr);
}
static void
fpurstor(addr)
union savefpu *addr;
{
if (!cpu_fxsr)
frstor(addr);
else
#ifdef CPU_ENABLE_SSE
if (cpu_fxsr)
fxrstor(addr);
else
#endif
frstor(addr);
}
#ifdef I586_CPU_XXX

View File

@ -100,8 +100,10 @@
#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=m" (*(addr)))
#define fp_divide_by_0() __asm("fldz; fld1; fdiv %st,%st(1); fnop")
#define frstor(addr) __asm("frstor %0" : : "m" (*(addr)))
#ifdef CPU_ENABLE_SSE
#define fxrstor(addr) __asm("fxrstor %0" : : "m" (*(addr)))
#define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr)))
#endif
#define start_emulating() __asm("smsw %%ax; orb %0,%%al; lmsw %%ax" \
: : "n" (CR0_TS) : "ax")
#define stop_emulating() __asm("clts")
@ -116,8 +118,10 @@ void fnstcw __P((caddr_t addr));
void fnstsw __P((caddr_t addr));
void fp_divide_by_0 __P((void));
void frstor __P((caddr_t addr));
#ifdef CPU_ENABLE_SSE
void fxsave __P((caddr_t addr));
void fxrstor __P((caddr_t addr));
#endif
void start_emulating __P((void));
void stop_emulating __P((void));
@ -921,20 +925,25 @@ fpusave(addr)
union savefpu *addr;
{
if (!cpu_fxsr)
fnsave(addr);
else
#ifdef CPU_ENABLE_SSE
if (cpu_fxsr)
fxsave(addr);
else
#endif
fnsave(addr);
}
static void
fpurstor(addr)
union savefpu *addr;
{
if (!cpu_fxsr)
frstor(addr);
else
#ifdef CPU_ENABLE_SSE
if (cpu_fxsr)
fxrstor(addr);
else
#endif
frstor(addr);
}
#ifdef I586_CPU_XXX

View File

@ -100,8 +100,10 @@
#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=m" (*(addr)))
#define fp_divide_by_0() __asm("fldz; fld1; fdiv %st,%st(1); fnop")
#define frstor(addr) __asm("frstor %0" : : "m" (*(addr)))
#ifdef CPU_ENABLE_SSE
#define fxrstor(addr) __asm("fxrstor %0" : : "m" (*(addr)))
#define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr)))
#endif
#define start_emulating() __asm("smsw %%ax; orb %0,%%al; lmsw %%ax" \
: : "n" (CR0_TS) : "ax")
#define stop_emulating() __asm("clts")
@ -116,8 +118,10 @@ void fnstcw __P((caddr_t addr));
void fnstsw __P((caddr_t addr));
void fp_divide_by_0 __P((void));
void frstor __P((caddr_t addr));
#ifdef CPU_ENABLE_SSE
void fxsave __P((caddr_t addr));
void fxrstor __P((caddr_t addr));
#endif
void start_emulating __P((void));
void stop_emulating __P((void));
@ -921,20 +925,25 @@ fpusave(addr)
union savefpu *addr;
{
if (!cpu_fxsr)
fnsave(addr);
else
#ifdef CPU_ENABLE_SSE
if (cpu_fxsr)
fxsave(addr);
else
#endif
fnsave(addr);
}
static void
fpurstor(addr)
union savefpu *addr;
{
if (!cpu_fxsr)
frstor(addr);
else
#ifdef CPU_ENABLE_SSE
if (cpu_fxsr)
fxrstor(addr);
else
#endif
frstor(addr);
}
#ifdef I586_CPU_XXX

View File

@ -105,8 +105,10 @@
#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=m" (*(addr)))
#define fp_divide_by_0() __asm("fldz; fld1; fdiv %st,%st(1); fnop")
#define frstor(addr) __asm("frstor %0" : : "m" (*(addr)))
#ifdef CPU_ENABLE_SSE
#define fxrstor(addr) __asm("fxrstor %0" : : "m" (*(addr)))
#define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr)))
#endif
#define start_emulating() __asm("smsw %%ax; orb %0,%%al; lmsw %%ax" \
: : "n" (CR0_TS) : "ax")
#define stop_emulating() __asm("clts")
@ -121,8 +123,10 @@ void fnstcw __P((caddr_t addr));
void fnstsw __P((caddr_t addr));
void fp_divide_by_0 __P((void));
void frstor __P((caddr_t addr));
#ifdef CPU_ENABLE_SSE
void fxsave __P((caddr_t addr));
void fxrstor __P((caddr_t addr));
#endif
void start_emulating __P((void));
void stop_emulating __P((void));
@ -974,20 +978,25 @@ fpusave(addr)
union savefpu *addr;
{
if (!cpu_fxsr)
fnsave(addr);
else
#ifdef CPU_ENABLE_SSE
if (cpu_fxsr)
fxsave(addr);
else
#endif
fnsave(addr);
}
static void
fpurstor(addr)
union savefpu *addr;
{
if (!cpu_fxsr)
frstor(addr);
else
#ifdef CPU_ENABLE_SSE
if (cpu_fxsr)
fxrstor(addr);
else
#endif
frstor(addr);
}
#ifdef I586_CPU_XXX