Bug 95212 - enum processor_features is out of sync
Summary: enum processor_features is out of sync
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 10.1.1
: P3 normal
Target Milestone: 10.2
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 95259
  Show dependency treegraph
 
Reported: 2020-05-19 14:57 UTC by H.J. Lu
Modified: 2020-05-21 13:07 UTC (History)
2 users (show)

See Also:
Host:
Target: i386, x86-64
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2020-05-19 14:57:14 UTC
libgcc has

enum processor_features
{
  FEATURE_CMOV = 0,
...
  FEATURE_AVX512BITALG,
  FEATURE_AVX512BF16
};

i386-builtins.c has

/* This is the order of bit-fields in __processor_features in cpuinfo.c */
enum processor_features
{
...
  F_AVX512BITALG,
  F_AVX512VP2INTERSECT,  <<< Missing from libgcc.
  F_AVX512BF16,
  F_MAX
};
Comment 1 GCC Commits 2020-05-19 21:52:08 UTC
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:453954451be68d22462442268a29f54809182d2b

commit r11-505-g453954451be68d22462442268a29f54809182d2b
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 19 14:42:12 2020 -0700

    x86: Add FEATURE_AVX512VP2INTERSECT and update GFNI check
    
    Add FEATURE_AVX512VP2INTERSECT to libgcc so that enum processor_features
    in libgcc matches enum processor_features in i386-builtins.c.  Update
    GFNI check to support processors with SSE and AVX versions of GFNI.
    
            PR target/95212
            PR target/95220
            * config/i386/cpuinfo.c (get_available_features): Fix
            FEATURE_GFNI check.  Also check FEATURE_AVX512VP2INTERSECT.
            * config/i386/cpuinfo.h (processor_features): Add
            FEATURE_AVX512VP2INTERSECT.
Comment 2 GCC Commits 2020-05-19 22:52:53 UTC
The releases/gcc-10 branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:e54fa81e16eb5633ed09c816311135ecc434f105

commit r10-8158-ge54fa81e16eb5633ed09c816311135ecc434f105
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 19 14:42:12 2020 -0700

    x86: Add FEATURE_AVX512VP2INTERSECT and update GFNI check
    
    Add FEATURE_AVX512VP2INTERSECT to libgcc so that enum processor_features
    in libgcc matches enum processor_features in i386-builtins.c.  Update
    GFNI check to support processors with SSE and AVX versions of GFNI.
    
            Backport from master
            PR target/95212
            PR target/95220
            * config/i386/cpuinfo.c (get_available_features): Fix
            FEATURE_GFNI check.  Also check FEATURE_AVX512VP2INTERSECT.
            * config/i386/cpuinfo.h (processor_features): Add
            FEATURE_AVX512VP2INTERSECT.
Comment 3 H.J. Lu 2020-05-19 23:03:50 UTC
Fixed for GCC 11 and 10.2.
Comment 4 GCC Commits 2020-05-21 12:35:08 UTC
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:5855bdfa06fb25c0880af89cb2bfdcdf342beac2

commit r11-549-g5855bdfa06fb25c0880af89cb2bfdcdf342beac2
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu May 21 05:32:53 2020 -0700

    libgcc: Move FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16
    
    Move FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16 to avoid
    changing libgcc ABI.
    
    gcc/
    
            PR target/95212
            * config/i386/i386-builtins.c (processor_features): Move
            F_AVX512VP2INTERSECT after F_AVX512BF16.
            (isa_names_table): Likewise.
    
    libgcc/
    
            PR target/95212
            * config/i386/cpuinfo.h (processor_features): Move
            FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16.
Comment 5 GCC Commits 2020-05-21 13:07:13 UTC
The releases/gcc-10 branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:9b7d71fdedcc360ad4fe8322ecb522cb7bf8a0f7

commit r10-8165-g9b7d71fdedcc360ad4fe8322ecb522cb7bf8a0f7
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu May 21 05:32:53 2020 -0700

    libgcc: Move FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16
    
    Move FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16 to avoid
    changing libgcc ABI.
    
    gcc/
    
            PR target/95212
            * config/i386/i386-builtins.c (processor_features): Move
            F_AVX512VP2INTERSECT after F_AVX512BF16.
            (isa_names_table): Likewise.
    
    libgcc/
    
            PR target/95212
            * config/i386/cpuinfo.h (processor_features): Move
            FEATURE_AVX512VP2INTERSECT after FEATURE_AVX512BF16.
    
    (cherry picked from commit 5855bdfa06fb25c0880af89cb2bfdcdf342beac2)