https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78487
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- What is the error message which you are getting? Here is how GCC's cpuid.h header look like for cpuid: #define __cpuid(level, a, b, c, d) \ __asm__ ("cpuid\n\t" \ : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ : "0" (level)) #define __cpuid_count(level, count, a, b, c, d) \ __asm__ ("cpuid\n\t" \ : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \ : "0" (level), "2" (count)) It does not use r but rather b directly.