Changeset View
Changeset View
Standalone View
Standalone View
head/sys/amd64/amd64/fpu.c
Show First 20 Lines • Show All 210 Lines • ▼ Show 20 Lines | init_xsave(void) | ||||
if (use_xsave) | if (use_xsave) | ||||
return; | return; | ||||
if ((cpu_feature2 & CPUID2_XSAVE) == 0) | if ((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, (void *), static) | DEFINE_IFUNC(, void, fpusave, (void *)) | ||||
{ | { | ||||
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); | ||||
return (fpusave_fxsave); | return (fpusave_fxsave); | ||||
} | } | ||||
DEFINE_IFUNC(, void, fpurestore, (void *), static) | DEFINE_IFUNC(, void, fpurestore, (void *)) | ||||
{ | { | ||||
init_xsave(); | init_xsave(); | ||||
return (use_xsave ? fpurestore_xrstor : fpurestore_fxrstor); | return (use_xsave ? fpurestore_xrstor : fpurestore_fxrstor); | ||||
} | } | ||||
void | void | ||||
fpususpend(void *addr) | fpususpend(void *addr) | ||||
▲ Show 20 Lines • Show All 978 Lines • Show Last 20 Lines |