All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Kevin Tian <kevin.tian@intel.com>, Jun Nakajima <jun.nakajima@intel.com>
Subject: Re: [PATCH] x86: use gcc6'es flags asm() output support
Date: Fri, 1 Jul 2016 16:38:06 +0100	[thread overview]
Message-ID: <fc45e734-771b-a928-953c-b301968d7f23@citrix.com> (raw)
In-Reply-To: <5776A1ED02000078000FA768@prv-mh.provo.novell.com>

On 01/07/16 16:01, Jan Beulich wrote:
> ..., rendering affected code more efficient and smaller.

Ooh - this is a neat feature.

>
> Note that in atomic.h this at once does away with the redundant output
> and input specifications of the memory location touched.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> TBD: Do we want to abstract the pattern
> 	asm ( "...; set<cc> %<out>" : "=<cons>" (var) ... )
> matching
> 	asm ( "..." : "=@cc<cc>" (var) ... )
> via some macro? While this would eliminate many (all?) of the
> conditionals added here, it would result in the : no longer being
> visible in the actual source, making the asm()s look somewhat odd.
> Otherwise, to limit code duplication, it may be preferable to put
> the #ifdef-s inside the asm()s instead of around them.

I would recommend not abstracting them.  asm() statements are already
subtle/hard enough to get right, and hiding the :'s will only make
matters worse.

As for interleaving inside the asm statement itself, we already have
precedent for that with the HAVE_GAS_* predicates.  It would make the
patch rather larger, but might end up looking cleaner.  It is probably
also worth switching to named parameters to reduce the risk of getting
positional parameters out of order.

As for the content of the change itself, Reviewed-by: Andrew Cooper
<andrew.cooper3@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-07-01 15:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01 15:01 [PATCH] x86: use gcc6'es flags asm() output support Jan Beulich
2016-07-01 15:38 ` Andrew Cooper [this message]
2016-07-01 15:54   ` Jan Beulich
2016-07-01 16:10   ` Jan Beulich
2016-07-01 16:51     ` Andrew Cooper
2016-07-04  7:34       ` Jan Beulich
2016-08-01 16:06       ` Jan Beulich
2016-08-01 17:11         ` Andrew Cooper
2016-08-02  6:09           ` Jan Beulich
2016-08-02  9:15             ` Andrew Cooper
2016-08-02 10:39               ` Jan Beulich
2016-07-04  6:24 ` Tian, Kevin

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=fc45e734-771b-a928-953c-b301968d7f23@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.