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 2/*] Optimize generic strchrnul and strchr


On Wed, 27 May 2015, Wilco Dijkstra wrote:

> Finally first_nonzero_byte should just use __builtin_ffsl (yet another
> function that should be inlined by default in the generic string.h...).

Will GCC always inline __builtin_ffsl (or call a libgcc function) rather 
than generating a call to ffsl (user namespace) on some architectures?  If 
it can ever call ffsl you need to do something similar to how we handle 
__mempcpy calling __builtin_mempcpy (include/string.h redeclares mempcpy 
with __asm__ ("__mempcpy"), so that libc-internal calls to __mempcpy 
really do call that function at the assembler level if not inlined, rather 
than calling mempcpy and having namespace issues).

-- 
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]