From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 00:39:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EB1239F; Thu, 8 Jan 2015 00:39:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AA9C972; Thu, 8 Jan 2015 00:39:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t080df9E011579; Thu, 8 Jan 2015 00:39:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t080df3O011578; Thu, 8 Jan 2015 00:39:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501080039.t080df3O011578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 8 Jan 2015 00:39:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276801 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2015 00:39:41 -0000 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 #include +#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; }