Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jan 2015 00:39:41 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r276801 - head/sys/i386/i386
Message-ID:  <201501080039.t080df3O011578@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Thu Jan  8 00:39:40 2015
New Revision: 276801
URL: https://svnweb.freebsd.org/changeset/base/276801

Log:
  Don't call the SSE routines when they aren't enabled (or even compiled
  into the kernel).

Modified:
  head/sys/i386/i386/elf_machdep.c

Modified: head/sys/i386/i386/elf_machdep.c
==============================================================================
--- head/sys/i386/i386/elf_machdep.c	Thu Jan  8 00:39:30 2015	(r276800)
+++ head/sys/i386/i386/elf_machdep.c	Thu Jan  8 00:39:40 2015	(r276801)
@@ -47,6 +47,10 @@ __FBSDID("$FreeBSD$");
 #include <machine/md_var.h>
 #include <machine/npx.h>
 
+#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU)
+#define CPU_ENABLE_SSE
+#endif
+
 struct sysentvec elf32_freebsd_sysvec = {
 	.sv_size	= SYS_MAXSYSCALL,
 	.sv_table	= sysent,
@@ -137,10 +141,13 @@ SYSINIT(kelf32, SI_SUB_EXEC, SI_ORDER_AN
 void
 elf32_dump_thread(struct thread *td, void *dst, size_t *off)
 {
+#ifdef CPU_ENABLE_SSE
 	void *buf;
+#endif
 	size_t len;
 
 	len = 0;
+#ifdef CPU_ENABLE_SSE
 	if (use_xsave) {
 		if (dst != NULL) {
 			npxgetregs(td);
@@ -153,6 +160,7 @@ elf32_dump_thread(struct thread *td, voi
 			len += elf32_populate_note(NT_X86_XSTATE, NULL, NULL,
 			    cpu_max_ext_state_size, NULL);
 	}
+#endif
 	*off = len;
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501080039.t080df3O011578>