[Bug inline-asm/78487] asm cpuid code and -fgcse crashes
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 23 00:10:00 GMT 2016
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.
More information about the Gcc-bugs
mailing list