diff options
author | peter <peter@FreeBSD.org> | 2002-09-07 07:02:12 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-09-07 07:02:12 +0000 |
commit | fa099d15482059c0921ce482fbb415f934e4e6e6 (patch) | |
tree | 6ab1b3fd13e6c8648b360795136c4804401d0fb6 /sys/pc98 | |
parent | 8a9b28b5fbae4dd4a937d50df8923454f2c46e16 (diff) | |
download | FreeBSD-src-fa099d15482059c0921ce482fbb415f934e4e6e6.zip FreeBSD-src-fa099d15482059c0921ce482fbb415f934e4e6e6.tar.gz |
Automatically enable CPU_ENABLE_SSE (detect and enable SSE instructions)
if compiling with I686_CPU as a target. CPU_DISABLE_SSE will prevent
this from happening and will guarantee the code is not compiled in.
I am still not happy with this, but gcc is now generating code that uses
these instructions if you set CPUTYPE to p3/p4 or athlon-4/mp/xp or higher.
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/i386/machdep.c | 7 | ||||
-rw-r--r-- | sys/pc98/pc98/machdep.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 8e8f5c7..a45c57f 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -135,6 +135,13 @@ extern void initializecpu(void); #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) +#if !defined(CPU_ENABLE_SSE) && defined(I686_CPU) +#define CPU_ENABLE_SSE +#endif +#if defined(CPU_DISABLE_SSE) +#undef CPU_ENABLE_SSE +#endif + static void cpu_startup(void *); #ifdef CPU_ENABLE_SSE static void set_fpregs_xmm(struct save87 *, struct savexmm *); diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 8e8f5c7..a45c57f 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -135,6 +135,13 @@ extern void initializecpu(void); #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) +#if !defined(CPU_ENABLE_SSE) && defined(I686_CPU) +#define CPU_ENABLE_SSE +#endif +#if defined(CPU_DISABLE_SSE) +#undef CPU_ENABLE_SSE +#endif + static void cpu_startup(void *); #ifdef CPU_ENABLE_SSE static void set_fpregs_xmm(struct save87 *, struct savexmm *); |