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] x86 string/memory inline functions

To: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] x86 string/memory inline functions
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 24 May 2006 11:47:51 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 24 May 2006 03:48:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <44743B9A.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>
References: <44743B9A.76E4.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 24 May 2006, at 09:55, Jan Beulich wrote:

1) Why were the (questionable) inline versions from i386 Linux chosen over just using the gcc intrinsics (as x86-64
Linux does, except for a special case of memcpy())?

Intrinsics are a total pain. Sometimes the compiler inlines, sometimes it doesn't. Sometimes it emits the __builtin_foo symbol, sometime it emits foo. Sometime when the function __builtin_foo is defined in string.c it gets the name __builtin_foo, but sometimes it gets the name foo. Getting this to work for a range of compiler versions on i386 (that's where I see the wide range of behaviours) would be hassle.

The best solution is just to remove the arch-specific definitions. None of the uses in Xen are performance critical.

2) Why were the memory clobbers removed without at least replacing them with appropriate input constraints?

Maybe I was having a bad day. :-)

 -- Keir


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