1
0
Fork 0
forked from len0rd/rockbox

Add mempcpy implementation

A GNU extension that returns dst + size instead of dst. It's a nice
shortcut when copying strings with a known size or back-to-back blocks
and you have to do it often.

May of course be called directly or alternately through
__builtin_mempcpy in some compiler versions.

For ASM on native targets, it is implemented as an alternate entrypoint
to memcpy which adds minimal code and overhead.

Change-Id: I4cbb3483f6df3c1007247fe0a95fd7078737462b
This commit is contained in:
Michael Sevakis 2014-08-06 04:26:52 -04:00
parent 7d1a47cf13
commit 77b3625763
8 changed files with 99 additions and 4 deletions

View file

@ -7,6 +7,10 @@ memset.c
strlen.c
#endif
#if defined(WIN32) || defined(APPLICATION)
mempcpy.c
#endif
#if (defined(SANSA_E200) || defined(GIGABEAT_F) || defined(GIGABEAT_S) || \
defined(CREATIVE_ZVx) || defined(SANSA_CONNECT) || defined(SANSA_FUZEPLUS) || \
defined(COWON_D2) || defined(MINI2440) || defined(SAMSUNG_YPR0) || \