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] Definition of eax and rax

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Xin B Li" <xin.b.li@xxxxxxxxx>
Subject: RE: [Xen-devel] Definition of eax and rax
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Wed, 13 Dec 2006 12:35:55 +0000
Cc: Xen Development Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 13 Dec 2006 04:34:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <B30DA1341B0CFA4893EF8A36B40B5C5D873935@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <B30DA1341B0CFA4893EF8A36B40B5C5D873935@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> "Li, Xin B" <xin.b.li@xxxxxxxxx> 13.12.06 13:15 >>>
>And I don't think it can work for none GCC compiler, since we use eax from 
>time to time :-(
>#ifdef __GNUC__
>/* Anonymous union includes both 32- and 64-bit names (e.g., eax/rax). */
>#define __DECL_REG(name) union { uint64_t r ## name, e ## name; }
>#else
>/* Non-gcc sources must always use the proper 64-bit name (e.g., rax). */
>#define __DECL_REG(name) uint64_t r ## name
>#endif

This is meant to help non-Xen sources including Xen headers. Xen itself is 
always
assumed to be compiled with gcc as I understand it.

Jan

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