This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/*] Optimize generic strchrnul and strchr
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Wilco Dijkstra <wdijkstr at arm dot com>
- Cc: 'Ondřej Bílka' <neleai at seznam dot cz>, <libc-alpha at sourceware dot org>
- Date: Thu, 28 May 2015 17:36:04 +0000
- Subject: Re: [PATCH 2/*] Optimize generic strchrnul and strchr
- Authentication-results: sourceware.org; auth=none
- References: <000d01d09879$ae9c2d80$0bd48880$ at com>
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