[Bug target/68491] libgcc calls __get_cpuid with 0 level breaks on early 486

christos at zoulas dot com gcc-bugzilla@gcc.gnu.org
Tue Jun 27 17:02:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68491

--- Comment #10 from Christos Zoulas <christos at zoulas dot com> ---
On Jun 27,  4:26pm, gcc-bugzilla@gcc.gnu.org ("luto at kernel dot org") wrote:
-- Subject: [Bug target/68491] libgcc calls __get_cpuid with 0 level breaks o

| I'm a bit late to the party, but this patch seems dubious to me.=20
| __get_cpuid_max() fails to distinguish between CPUs that have max level 0
| (although I doubt that any such CPUs exist) and CPUs that don't have CPUID =
| at
| all.
| 
| Shouldn't __get_cpuid_max return -1 if CPUID isn't there or, alternatively,=
| 
| just generally return the last level + 1 (and 0 if CPUID isn't there)?
| 

Yes, it should. That would be cleaner, but my goal was minimal change
not refactoring :-)

christos


More information about the Gcc-bugs mailing list