This patch adds the missing PTA_POPCNT and PTA_LZCNT to the PTA_BDVER1 bitmask in the i386 architecture configuration file. This ensures that the POPCNT and LZCNT features are correctly represented in the BDVER1 architecture definition.
Although these 2 features were not present in the original PTA_BDVER1 definition, it does not affect the functionality of the BDVER1 architecture since we have set the POPCNT and LZCNT bits when ABM is enabled in ix86_option_override_internal function. However, it is important to include them in the PTA_BDVER1 definition for consistency and clarity. I came across this issue when I was writing a script to extract the PTA_BDVER1 bitmask from the i386.h file used in [1]. [1] https://github.com/cyyself/x86-pta gcc/ChangeLog: * config/i386/i386.h: Add PTA_POPCNT, PTA_LZCNT to PTA_BDVER1. Signed-off-by: Yangyu Chen <c...@cyyself.name> --- Changes in v2: - Added PTA_LZCNT to the patch as well. v1: https://patchwork.sourceware.org/project/gcc/patch/tencent_f08f827bda658e18b8e0319021b88d6d7...@qq.com/ --- gcc/config/i386/i386.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 791f3b9e133..761921e8da7 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2479,7 +2479,8 @@ constexpr wide_int_bitmask PTA_DIAMONDRAPIDS = PTA_GRANITERAPIDS_D constexpr wide_int_bitmask PTA_BDVER1 = PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_SSE4A | PTA_CX16 | PTA_ABM | PTA_SSSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_AES | PTA_PCLMUL | PTA_AVX | PTA_FMA4 - | PTA_XOP | PTA_LWP | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE; + | PTA_XOP | PTA_LWP | PTA_PRFCHW | PTA_FXSR | PTA_XSAVE | PTA_LZCNT + | PTA_POPCNT; constexpr wide_int_bitmask PTA_BDVER2 = PTA_BDVER1 | PTA_BMI | PTA_TBM | PTA_F16C | PTA_FMA; constexpr wide_int_bitmask PTA_BDVER3 = PTA_BDVER2 | PTA_XSAVEOPT -- 2.49.0