From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
Kevin Tian <kevin.tian@intel.com>,
Jun Nakajima <jun.nakajima@intel.com>
Subject: Re: [PATCH] x86: use gcc6'es flags asm() output support
Date: Mon, 1 Aug 2016 18:11:24 +0100 [thread overview]
Message-ID: <f70b245c-3fd0-40a5-40e3-90f67e37b2e2@citrix.com> (raw)
In-Reply-To: <579F8FBB020000780010172B@prv-mh.provo.novell.com>
On 01/08/16 17:06, Jan Beulich wrote:
>>>> On 01.07.16 at 18:51, <andrew.cooper3@citrix.com> wrote:
>> How about a different example, from the second hunk
>>
>> --- a/xen/arch/x86/x86_emulate/x86_emulate.c
>> +++ b/xen/arch/x86/x86_emulate/x86_emulate.c
>> @@ -832,8 +832,19 @@ static int read_ulong(
>> static bool_t mul_dbl(unsigned long m[2])
>> {
>> bool_t rc;
>> - asm ( "mul %1; seto %2"
>> - : "+a" (m[0]), "+d" (m[1]), "=qm" (rc) );
>> +
>> + asm ( "mul %1;"
>> +#ifndef __GCC_ASM_FLAG_OUTPUTS__
>> + "seto %[rc];"
>> +#endif
>> + : "+a" (m[0]), "+d" (m[1]),
>> +#ifdef __GCC_ASM_FLAG_OUTPUTS__
>> + [rc] "=@cco" (rc)
>> +#else
>> + [rc] "=qm" (rc)
>> +#endif
>> + );
>> +
>> return rc;
>> }
> Looking at this again I think I really like the original, submitted version
> better. Are you strongly biased towards the above form?
I am not overly fussed between this version and the original submission.
However, I definitely think that we shouldn't hide semantic bits of the
ASM statement behind macros.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-08-01 17:11 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
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 [this message]
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=f70b245c-3fd0-40a5-40e3-90f67e37b2e2@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 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).