[Bug driver/50740] New: CPUID leaf 7 for BMI/BMI2/AVX2 feature detection not qualified with max_level and doesn't use subleaf
craig.topper at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Oct 16 00:06:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50740
Bug #: 50740
Summary: CPUID leaf 7 for BMI/BMI2/AVX2 feature detection not
qualified with max_level and doesn't use subleaf
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: craig.topper@gmail.com
The cpuid code for detecting BMI, BMI2, and AVX2 support needs to be qualified
with max_level >= 7. Additionally, it should use __cpuid_count instead of
__cpuid because leaf 7 uses subleafs just like leaf 4.
Relevant code from i386-driver.c
__cpuid (0x7, eax, ebx, ecx, edx);
has_bmi = ebx & bit_BMI;
has_avx2 = ebx & bit_AVX2;
has_bmi2 = ebx & bit_BMI2;
More information about the Gcc-bugs
mailing list