From 77b3625763ae4d5aa6aaa9d44fbc1bfec6b29335 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Wed, 6 Aug 2014 04:26:52 -0400 Subject: 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 --- firmware/asm/SOURCES | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'firmware/asm/SOURCES') diff --git a/firmware/asm/SOURCES b/firmware/asm/SOURCES index a9293b4297..ebb6951071 100644 --- a/firmware/asm/SOURCES +++ b/firmware/asm/SOURCES @@ -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) || \ -- cgit v1.2.3