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: bzero/bcopy/bcmp/mempcpy (was: Improve strncpy performance further)


On Wed, 4 Feb 2015, Wilco Dijkstra wrote:

> That is certainly a good idea - I added _memclr to armcc a long time ago 
> as 99% of uses of memset set it to zero and don't use the return value 
> (and the cost of save/restore the return value inside memcpy/memset is 
> higher than just recomputing it on most targets).

On ARM there's __aeabi_memclr (and __aeabi_memclr4 and __aeabi_memclr8), 
but the __aeabi_mem* functions are mostly currently implemented as 
wrappers (__aeabi_memcpy* as aliases for __memcpy_arm in the 
armv7/multiarch case, to avoid clobbering NEON registers) and there's no 
GCC support for generating calls to those functions (which would only be 
useful with glibc if they were actually more efficient rather than 
wrappers).

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