[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libx86: Work around GCC bug with ebx output constrants
>>> On 19.11.18 at 15:33, <andrew.cooper3@xxxxxxxxxx> wrote: > On 19/11/2018 13:51, Jan Beulich wrote: >>> static inline void cpuid_leaf(uint32_t leaf, struct cpuid_leaf *l) >>> { >>> - asm ( "cpuid" >>> - : "=a" (l->a), "=b" (l->b), "=c" (l->c), "=d" (l->d) >>> + asm ( XCHG_BX >>> + "cpuid;" >>> + XCHG_BX >>> + : "=a" (l->a), BX_CON (l->b), "=c" (l->c), "=d" (l->d) >> Strictly speaking all other outputs also need to use =& in the >> 32-bit case. But I wouldn't insist on such an adjustment. With >> the others done >> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> > > Using =& for the constraints which also have inputs results "operand has > impossible constraints" Yes, I had (silently) assumed this would be the case. > It should only matter for the output-only operands, to prevent GCC > allocating %[er]dx for the bx constraint, but that shouldn't matter > anyway because =&r can't be allocated to conflict with =d Hence me having said "strictly speaking". Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |