WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] linux/x86: avoid casting hypercall arguments to

To: Jan Beulich <jbeulich@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] linux/x86: avoid casting hypercall arguments to long
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Mon, 21 Jan 2008 16:27:39 +0000
Delivery-date: Mon, 21 Jan 2008 08:29:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4794C5DE.76E4.0078.0@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AchcSonXyEO4hMg9Edy3sQAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH] linux/x86: avoid casting hypercall arguments to long
User-agent: Microsoft-Entourage/11.3.6.070618
On 21/1/08 15:18, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:

> -  : "1" ((long)(a1))    \
> +  : "1" ((a1)?:0)     \

Most of the patch seems to be placing this construct all over the place.
What's it for? How is x?:0 different from x?

> + register typeof((a4)?:0) __arg4 asm("r10") = (a4); \
> + register typeof((a5)?:0) __arg5 asm("r8") = (a5); \
> +    "=d" (__ign3), "+r" (__arg4), "+r" (__arg5) \

Is it guaranteed that gcc will keep the register variables in their assigned
registers across the inline asm?

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel