1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-31 16:57:10 +00:00

Don't call the SSE routines when they aren't enabled (or even compiled

into the kernel).
This commit is contained in:
Warner Losh 2015-01-08 00:39:40 +00:00
parent 2f4b03fce1
commit 0061cd79c9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276801

View File

@ -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_ANY,
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, void *dst, size_t *off)
len += elf32_populate_note(NT_X86_XSTATE, NULL, NULL,
cpu_max_ext_state_size, NULL);
}
#endif
*off = len;
}