[PATCH] x86: include OSXSAVE in x86-64-v3 level
Noah Goldstein
goldstein.w.n@gmail.com
Fri Dec 9 17:14:54 GMT 2022
On Fri, Dec 9, 2022 at 2:36 AM Fabian Vogt via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> For some reason the initial x86-64-v3 detection code was missing checks for
> BMI, BMI2 and OSXSAVE, which are all required for that level to be met.
> BMI and BMI2 got added recently, but OSXSAVE was still missing. Add it.
>
> Signed-off-by: Fabian Vogt <fvogt@suse.de>
> ---
> sysdeps/x86/get-isa-level.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sysdeps/x86/get-isa-level.h b/sysdeps/x86/get-isa-level.h
> index 5b4dd5f062..d62bf92cde 100644
> --- a/sysdeps/x86/get-isa-level.h
> +++ b/sysdeps/x86/get-isa-level.h
> @@ -52,7 +52,8 @@ get_isa_level (const struct cpu_features *cpu_features)
> && CPU_FEATURE_USABLE_P (cpu_features, F16C)
> && CPU_FEATURE_USABLE_P (cpu_features, FMA)
> && CPU_FEATURE_USABLE_P (cpu_features, LZCNT)
> - && CPU_FEATURE_USABLE_P (cpu_features, MOVBE))
> + && CPU_FEATURE_USABLE_P (cpu_features, MOVBE)
> + && CPU_FEATURE_USABLE_P (cpu_features, OSXSAVE))
> {
> isa_level |= GNU_PROPERTY_X86_ISA_1_V3;
> if (CPU_FEATURE_USABLE_P (cpu_features, AVX512F)
> --
> 2.38.1
>
>
We should also update isa-level.h
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86/isa-level.h;h=06f6c9663e76d4a48efb8fbfdb707cc5045f47dc;hb=HEAD
I think the compiler flag for it is `__XSAVE__`
More information about the Libc-alpha
mailing list