[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86: fix wait code asm() constraints
>>> On 03.08.12 at 14:08, Keir Fraser <keir.xen@xxxxxxxxx> wrote: > On 03/08/2012 12:36, "Jan Beulich" <JBeulich@xxxxxxxx> wrote: > >>> I'm confused. The registers have the same values at the start and the end of >>> the asm statement. How can it possibly matter, even in theory, whether they >>> temporarily change in the middle? Is this fairly strong assumption written >>> down in the gcc documentation anywhere? >> >> It's in the specification of the & modifier: >> >> "Å&Â Means (in a particular alternative) that this operand is an >> earlyclobber operand, which is modified before the instruction >> is finished using the input operands. Therefore, this operand >> may not lie in a register that is used as an input operand or as >> part of any memory address." >> >> Of course, here we're not having any other operands, which >> is why at least at present getting this wrong does no harm. > > Yep, okay, that makes sense. Especially the use of an input operand to form > a memory address, although of course that cannot happen in our specific case > here. I have acked your patch, although I'd like an update to the patch > comment. How about this as an added initial paragraph? This fixes theoretical issues with those constraints - operands that get clobbered before consuming all input operands must be marked so according the the gcc documentation. Beyond that, the change is merely code improvement, not a bug fix. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |