https://gcc.gnu.org/g:74c15cb93b3830fee79f75805329d4299ff4a2f0
commit r14-10397-g74c15cb93b3830fee79f75805329d4299ff4a2f0 Author: Haochen Jiang <haochen.ji...@intel.com> Date: Tue Jul 9 16:31:02 2024 +0800 i386: Correct AVX10 CPUID emulation AVX10 Documentaion has specified ecx value as 0 for AVX10 version and vector size under 0x24 subleaf. Although for ecx=1, the bits are all reserved for now, we still need to specify ecx as 0 to avoid dirty value in ecx. gcc/ChangeLog: * common/config/i386/cpuinfo.h (get_available_features): Correct AVX10 CPUID emulation to specify ecx value. Diff: --- gcc/common/config/i386/cpuinfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h index 017a952a5db0..56427474b7be 100644 --- a/gcc/common/config/i386/cpuinfo.h +++ b/gcc/common/config/i386/cpuinfo.h @@ -1014,10 +1014,10 @@ get_available_features (struct __processor_model *cpu_model, } } - /* Get Advanced Features at level 0x24 (eax = 0x24). */ + /* Get Advanced Features at level 0x24 (eax = 0x24, ecx = 0). */ if (avx10_set && max_cpuid_level >= 0x24) { - __cpuid (0x24, eax, ebx, ecx, edx); + __cpuid_count (0x24, 0, eax, ebx, ecx, edx); version = ebx & 0xff; if (ebx & bit_AVX10_256) switch (version)