mirror of git://sourceware.org/git/glibc.git
x86: Skip XSAVE state size reset if ISA level requires XSAVE
If we have to use XSAVE or XSAVEC trampolines, do not adjust the size information they need. Technically, it is an operator error to try to run with -XSAVE,-XSAVEC on such builds, but this change here disables some unnecessary code with higher ISA levels and simplifies testing. Related to commitbefe2d3c4d
("x86-64: Don't use SSE resolvers for ISA level 3 or above"). Reviewed-by: H.J. Lu <hjl.tools@gmail.com> (cherry picked from commit59585ddaa2
)
This commit is contained in:
parent
4cf3f9df54
commit
60cd7123a6
sysdeps/x86
|
@ -24,6 +24,7 @@
|
|||
#include <dl-cacheinfo.h>
|
||||
#include <dl-minsigstacksize.h>
|
||||
#include <dl-hwcap2.h>
|
||||
#include <gcc-macros.h>
|
||||
|
||||
extern void TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *)
|
||||
attribute_hidden;
|
||||
|
@ -1092,6 +1093,9 @@ no_cpuid:
|
|||
TUNABLE_CALLBACK (set_prefer_map_32bit_exec));
|
||||
#endif
|
||||
|
||||
/* Do not add the logic to disable XSAVE/XSAVEC if this glibc build
|
||||
requires AVX and therefore XSAVE or XSAVEC support. */
|
||||
#ifndef GCCMACRO__AVX__
|
||||
bool disable_xsave_features = false;
|
||||
|
||||
if (!CPU_FEATURE_USABLE_P (cpu_features, OSXSAVE))
|
||||
|
@ -1145,6 +1149,7 @@ no_cpuid:
|
|||
|
||||
CPU_FEATURE_UNSET (cpu_features, FMA4);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __x86_64__
|
||||
GLRO(dl_hwcap) = HWCAP_X86_64;
|
||||
|
|
Loading…
Reference in New Issue