xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86: fix wait code asm() constraints
Date: Fri, 03 Aug 2012 13:08:43 +0100	[thread overview]
Message-ID: <CC417DDB.3A680%keir.xen@gmail.com> (raw)
In-Reply-To: <501BD3ED02000078000927F6@nat28.tlf.novell.com>

On 03/08/2012 12:36, "Jan Beulich" <JBeulich@suse.com> 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.

 Thanks,
 -- Keir

  reply	other threads:[~2012-08-03 12:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03  8:40 [PATCH] x86: fix wait code asm() constraints Jan Beulich
2012-08-03 10:04 ` Keir Fraser
2012-08-03 10:34   ` Jan Beulich
2012-08-03 11:00     ` Keir Fraser
2012-08-03 11:36       ` Jan Beulich
2012-08-03 12:08         ` Keir Fraser [this message]
2012-08-03 12:15           ` Jan Beulich
2012-08-03 12:54             ` Keir Fraser
2012-08-03 12:05 ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CC417DDB.3A680%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).