|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86: use gcc6'es flags asm() output support
>>> On 01.08.16 at 19:11, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 01/08/16 17:06, Jan Beulich wrote:
>>>>> On 01.07.16 at 18:51, <andrew.cooper3@xxxxxxxxxx> 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.
Well, the originally submitted variant doesn't do anything like that,
so may I translate the above to an ack?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |