]> git.ipfire.org Git - thirdparty/gcc.git/commit
i386: Add missing PTA_POPCNT and PTA_LZCNT with PTA_ABM
authorYangyu Chen <cyy@cyyself.name>
Wed, 30 Jul 2025 17:24:06 +0000 (01:24 +0800)
committerUros Bizjak <ubizjak@gmail.com>
Wed, 6 Aug 2025 16:51:29 +0000 (18:51 +0200)
commit7c8f47e17dc508b6c5b6957e40dfd645c5268752
tree0a872abc6620d282670540fdd01f984f927d2deb
parent612194c064c2ca279191712bcc01f8fcef65ade9
i386: Add missing PTA_POPCNT and PTA_LZCNT with PTA_ABM

This patch adds the missing PTA_POPCNT and PTA_LZCNT with the PTA_ABM
bitmask definition for the bdver1, btver1, and lujiazui architectures
in the i386 architecture configuration file.

Although these two features were not present in the original definition,
their absence does not affect the functionality of these architectures
because the POPCNT and LZCNT bits are set when ABM is enabled in the
ix86_option_override_internal function. However, including them in these
definitions improves consistency and clarity. This issue was discovered
while writing a script to extract these bitmasks from the i386.h file
referenced in [1].

Additionally, the PTA_YONGFENG bitmask appears incorrect as it includes
PTA_LZCNT while already inheriting PTA_ABM from PTA_LUJIAZUI. This seems
to be a typo and should be corrected.

[1] https://github.com/cyyself/x86-pta

gcc/ChangeLog:

* config/i386/i386.h (PTA_BDVER1):
Add missing PTA_POPCNT and PTA_LZCNT with PTA_ABM.
(PTA_ZNVER1): Ditto.
(PTA_BTVER1): Ditto.
(PTA_LUJIAZUI): Ditto.
(PTA_YONGFENG): Do not include extra PTA_LZCNT.

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
gcc/config/i386/i386.h