This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH, i386]: Use %r15 for REAL_PIC_OFFSET_TABLE_REGNUM on x86_64


* Uros Bizjak:

> +#elif defined(__x86_64__)
> +#define __cpuid(level, a, b, c, d)			\
> +  __asm__ ("xchg{q}\t{%%}rbx, %q1\n\t"			\
> +	   "cpuid\n\t"					\
> +	   "xchg{q}\t{%%}rbx, %q1\n\t"			\
> +	   : "=a" (a), "=r" (b), "=c" (c), "=d" (d)	\
> +	   : "0" (level))
> +
> +#define __cpuid_count(level, count, a, b, c, d)		\
> +  __asm__ ("xchg{q}\t{%%}rbx, %q1\n\t"			\
> +	   "cpuid\n\t"					\
> +	   "xchg{q}\t{%%}rbx, %q1\n\t"			\
> +	   : "=a" (a), "=r" (b), "=c" (c), "=d" (d)	\
> +	   : "0" (level), "2" (count))
> +#endif

Shouldn't the constraint for b be "=&r"?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]