This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] remove x86 strspn,strcspn,strpbrk optimizations


On Wed, 16 Jan 2013, OndÅ~Yej Bílka wrote:

> Third part of cleanup are architecture specific optimizations. 
> Only arch that does that is x86 where most of relevant code 
> git-blame shows it is from 1997.
> 
> As it is probable that noninline version for recent processors 
> is already faster I propose to remove them.

Does this really pass the testsuite (specifically, the ABI tests) for 
32-bit x86?  For sysdeps/i386/i486/string-inlines.c to continue exporting 
the copies of these inline functions from the shared library (via defining 
__STRING_INLINE to empty, etc.) I'd expect the functions would still need 
to be defined somewhere.

It may be that the approach of sysdeps/i386/string-inlines.c (where it 
defines various functions in a simple way to call the underlying function 
such as strcspn, because i386 never had these inlines) is right after your 
patch for these functions in the i486 version as well.  Also make sure 
that no new compilation warnings are introduced in string-inlines.c.

(i386 and i486 libc are meant to have the same ABI.  That's not possible 
to test for Linux - NPTL requires i486 or later; I don't know whether Hurd 
still supports building glibc for plain i386 or not.)

> 	* sysdeps/x86/bits/string.h(strspn,strcspn,strpbrk): Remove platform
> 	specific optimizations.

You should name specifically each function or macro being removed (with 
the conditions on it being appropriately indicated inside []).

-- 
Joseph S. Myers
joseph@codesourcery.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]