https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100758
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Mayshao-oc at zhaoxin dot com --- Comment #12 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to ValdikSS from comment #11) > Well, the function is called __builtin_cpu_supports, for which one might > expect that it just checks CPUID and returns reliable results, while in > reality it operates using the build-in CPU support list. The function does > not return an error if it's unable to detect the feature, resulting in > incorrect results, which makes the function unreliable. The fact that it may > not always detect features which are present in the CPU is not documented, > which brings the confusion among developers such as this bug. Sure, it's not perfect, I can confirm that. I'm going to introduce a documentation entry for this limitation. > > VIA processors have progressed into Zhaoxin CPU family which is fairly > recent (2014-2019, with plans to release new processors soon). Yep, and we support these (vendor == signature_SHANGHAI_ebx) correctly since r13-713-ga239aff82c3771. Maybe the author of the commit will be interested in old VIA CPUs?