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: convert 'cpu' (and a few other) varia

To: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] linux/x86: convert 'cpu' (and a few other) variables to unsigned
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Fri, 18 Jan 2008 16:16:57 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 18 Jan 2008 08:19:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4790DC8F.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>
Newsgroups: chiark.mail.xen.devel
References: <4790DC8F.76E4.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Jan Beulich writes ("[Xen-devel] [PATCH] linux/x86: convert 'cpu' (and a few 
other) variables to unsigned"):
> .. producing better code for x86-64.
> 
> As usual, written and tested on 2.6.24-rc7 and made apply to the 2.6.18
> tree without further testing.

In what way does this produce better code for x86-64 ?

Normally it's IMO best practice to avoid `unsigned' other than for
bitfields, clock arithmetic, and the like, because the behaviour of
unsigned in the presence of subtraction and comparision is often
surprising.

Ian.

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