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/i386/linux/linux_ptrace.c | |
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/i386/linux/linux_ptrace.c')
-rw-r--r-- | sys/i386/linux/linux_ptrace.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/i386/linux/linux_ptrace.c b/sys/i386/linux/linux_ptrace.c index f5e47f9..a4dc91a 100644 --- a/sys/i386/linux/linux_ptrace.c +++ b/sys/i386/linux/linux_ptrace.c @@ -28,6 +28,8 @@ * $FreeBSD$ */ +#include "opt_cpu.h" + #include <sys/param.h> #include <sys/systm.h> #include <sys/lock.h> @@ -46,6 +48,13 @@ #include <i386/linux/linux_proto.h> #include <compat/linux/linux_util.h> +#if !defined(CPU_ENABLE_SSE) && defined(I686_CPU) +#define CPU_ENABLE_SSE +#endif +#if defined(CPU_DISABLE_SSE) +#undef CPU_ENABLE_SSE +#endif + /* * Linux ptrace requests numbers. Mostly identical to FreeBSD, * except for MD ones and PT_ATTACH/PT_DETACH. @@ -334,7 +343,7 @@ linux_ptrace(struct thread *td, struct linux_ptrace_args *uap) } break; case PTRACE_SETFPXREGS: -#ifdef CPU_ENABLE_SSA +#ifdef CPU_ENABLE_SSE error = copyin((caddr_t)uap->data, &r.fpxreg, sizeof(r.fpxreg)); if (error) |