From fa099d15482059c0921ce482fbb415f934e4e6e6 Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 7 Sep 2002 07:02:12 +0000 Subject: 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. --- sys/pc98/i386/machdep.c | 7 +++++++ sys/pc98/pc98/machdep.c | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'sys/pc98') 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 *); -- cgit v1.1