This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] [x86_64] Detection of availability of AVX512F and AVX512DQ ISAs
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Wed, 29 Apr 2015 08:17:31 -0700
- Subject: Re: [PATCH] [x86_64] Detection of availability of AVX512F and AVX512DQ ISAs
- Authentication-results: sourceware.org; auth=none
- References: <CAMXFM3tt+9NG7vdZowDdMrmWWKtKGWhBW2Q3NL2mddXO+pkjGg at mail dot gmail dot com>
On Wed, Apr 29, 2015 at 8:10 AM, Andrew Senkevich
<andrew.n.senkevich@gmail.com> wrote:
> Hi,
>
> this patch adds detection of availability of AVX512F and AVX512DQ ISAs.
>
> 2015-04-29 Andrew Senkevich <andrew.senkevich@intel.com>
>
> * sysdeps/x86_64/multiarch/init-arch.h (bit_AVX512F_Usable,
> bit_AVX512DQ_Usable): New macro.
> * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
> Check and set bit_AVX512F_Usable, bit_AVX512DQ_Usable.
>
> diff --git a/sysdeps/x86_64/multiarch/init-arch.c
> b/sysdeps/x86_64/multiarch/init-arch.c
> index 7dec218..6a81d48 100644
> --- a/sysdeps/x86_64/multiarch/init-arch.c
> +++ b/sysdeps/x86_64/multiarch/init-arch.c
> @@ -179,6 +179,19 @@ __init_cpu_features (void)
> if (CPUID_AVX2)
> __cpu_features.feature[index_AVX2_Usable]
> |= bit_AVX2_Usable | bit_AVX_Fast_Unaligned_Load;
> + /* Check if OPMASK state, upper 256-bit of ZMM0-ZMM15 and
> + ZMM16-ZMM31 state are enabled. */
> + if ((xcrlow & 0xe0) == 0xe0 )
Please add/use bit_ZMM0_15_state and bit_ZMM16_31_state.
This file is used by both 32-bit and 64-bit. Does it work for both
32-bit and 64-bit?
--
H.J.