AMD General

Hi HJ,

> -----Original Message-----
> From: H.J. Lu <[email protected]>
> Sent: Friday, August 21, 2026 1:47 AM
> To: Sharma, Dipesh <[email protected]>
> Cc: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; Kumar, Venkataramanan
> <[email protected]>
> Subject: Re: [PATCH] [X86]: Fix zen6 AVX512BMM cpuid check.
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> On Fri, Aug 21, 2026 at 2:34 AM Dipesh Sharma <[email protected]>
> wrote:
> >
> > Hi,
> >
> > This patch fixes the AVX512BMM cpuid check for zen6. The AVX512BMM is
> > present in the extended features instead of the standard leaf.
>
> Where is AVX512BMM spec?  It should also be supported by glibc.

AMD64 Bit Matrix Multiply and Bit Reversal Instructions (PUB) (69192)
--snip--
CPUID Function 80000021_EAX[AVX512_BMM] (bit 23) = 1 indicates support for AMD 
Bit Matrix
Multiply and Bit Reversal instructions.
--snip--

You can find it here.
https://docs.amd.com/v/u/en-US/69192-PUB

regards,
Venkat.

>
> > bootstraped and regtested on x86_64-linux-gnu. Ok for trunk ?
> >
> > gcc/ChangeLog:
> >
> >         * common/config/i386/cpuinfo.h (get_available_features): Detect
> AVXBMM from extended features instead of standard leaf.
> > ---
> >  gcc/common/config/i386/cpuinfo.h | 12 ++----------
> >  1 file changed, 2 insertions(+), 10 deletions(-)
> >
> > diff --git a/gcc/common/config/i386/cpuinfo.h
> > b/gcc/common/config/i386/cpuinfo.h
> > index fef8f90f94c..153ab194864 100644
> > --- a/gcc/common/config/i386/cpuinfo.h
> > +++ b/gcc/common/config/i386/cpuinfo.h
> > @@ -1110,16 +1110,6 @@ get_available_features (struct
> __processor_model *cpu_model,
> >         }
> >      }
> >
> > -  /* Get Advanced Features at level 0x21 (eax = 0x21).  */
> > -  if (max_cpuid_level >= 0x21)
> > -    {
> > -      __cpuid (0x21, eax, ebx, ecx, edx);
> > -      if (eax & bit_AVX512BMM)
> > -       {
> > -         set_feature (FEATURE_AVX512BMM);
> > -       }
> > -    }
> > -
> >    /* Get Advanced Features at level 0x24 (eax = 0x24, ecx = 0).  */
> >    if (avx10_set && max_cpuid_level >= 0x24)
> >      {
> > @@ -1205,6 +1195,8 @@ get_available_features (struct
> __processor_model *cpu_model,
> >         {
> >           set_feature (FEATURE_PREFETCHI);
> >         }
> > +      if (eax & bit_AVX512BMM)
> > +       set_feature (FEATURE_AVX512BMM);
> >      }
> >
> >  #undef set_feature
> > --
> > 2.34.1
> >
>
>
> --
> H.J.

Reply via email to