Changeset View
Changeset View
Standalone View
Standalone View
head/sys/i386/i386/npx.c
Show First 20 Lines • Show All 346 Lines • ▼ Show 20 Lines | init_xsave(void) | ||||
if (use_xsave) | if (use_xsave) | ||||
return; | return; | ||||
if (!cpu_fxsr || (cpu_feature2 & CPUID2_XSAVE) == 0) | if (!cpu_fxsr || (cpu_feature2 & CPUID2_XSAVE) == 0) | ||||
return; | return; | ||||
use_xsave = 1; | use_xsave = 1; | ||||
TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); | TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); | ||||
} | } | ||||
DEFINE_IFUNC(, void, fpusave, (union savefpu *), static) | DEFINE_IFUNC(, void, fpusave, (union savefpu *)) | ||||
{ | { | ||||
init_xsave(); | init_xsave(); | ||||
if (use_xsave) | if (use_xsave) | ||||
return ((cpu_stdext_feature & CPUID_EXTSTATE_XSAVEOPT) != 0 ? | return ((cpu_stdext_feature & CPUID_EXTSTATE_XSAVEOPT) != 0 ? | ||||
fpusave_xsaveopt : fpusave_xsave); | fpusave_xsaveopt : fpusave_xsave); | ||||
if (cpu_fxsr) | if (cpu_fxsr) | ||||
return (fpusave_fxsave); | return (fpusave_fxsave); | ||||
▲ Show 20 Lines • Show All 1,128 Lines • Show Last 20 Lines |