From: Keir Fraser Subject: Re: x86 string/memory inline functions Date: Wed, 24 May 2006 11:47:51 +0100 Message-ID: References: <44743B9A.76E4.0078.0@novell.com> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <44743B9A.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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