summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2005-06-04 15:36:48 +0000
committerdfr <dfr@FreeBSD.org>2005-06-04 15:36:48 +0000
commitdcdb8b95deb781edc457bdcc91155bb07dfcc66b (patch)
tree845632b437ed48575649f3f9fd31007a4d17e1bd
parentc1ecf2fe863047db7f0d058a994b7b14368569d2 (diff)
downloadFreeBSD-src-dcdb8b95deb781edc457bdcc91155bb07dfcc66b.zip
FreeBSD-src-dcdb8b95deb781edc457bdcc91155bb07dfcc66b.tar.gz
Add the proper logic so that we don't try to do SSE stuff unless its
enabled.
-rw-r--r--sys/i386/i386/ptrace_machdep.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/i386/i386/ptrace_machdep.c b/sys/i386/i386/ptrace_machdep.c
index 545bb20..3c877df 100644
--- a/sys/i386/i386/ptrace_machdep.c
+++ b/sys/i386/i386/ptrace_machdep.c
@@ -35,9 +35,17 @@ __FBSDID("$FreeBSD$");
#include <machine/md_var.h>
#include <machine/pcb.h>
+#if !defined(CPU_ENABLE_SSE) && defined(I686_CPU)
+#define CPU_ENABLE_SSE
+#endif
+#if defined(CPU_DISABLE_SSE)
+#undef CPU_ENABLE_SSE
+#endif
+
int
cpu_ptrace(struct thread *td, int req, void *addr, int data)
{
+#ifdef CPU_ENABLE_SSE
int error;
if (!cpu_fxsr)
@@ -59,4 +67,7 @@ cpu_ptrace(struct thread *td, int req, void *addr, int data)
}
return (error);
+#else
+ return (EINVAL);
+#endif
}
OpenPOWER on IntegriCloud