Jean-Philippe Bernardy: C versions of memset() and memcpy() for archs with
no asm optimized versions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5550 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
87923f2459
commit
39fb8f0705
2 changed files with 22 additions and 0 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
#ifdef ARCHOS_GMINI120
|
||||||
|
common/string.c
|
||||||
|
#endif
|
||||||
#ifdef IRIVER_H100
|
#ifdef IRIVER_H100
|
||||||
crt0.S
|
crt0.S
|
||||||
backlight.c
|
backlight.c
|
||||||
|
|
19
firmware/common/string.c
Normal file
19
firmware/common/string.c
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
/* For archs that lack assembly optimized versions of those */
|
||||||
|
|
||||||
|
#include "string.h"
|
||||||
|
|
||||||
|
_PTR _EXFUN(memset,(_PTR, int, size_t));
|
||||||
|
|
||||||
|
_PTR memset(_PTR data, int val, size_t count)
|
||||||
|
{
|
||||||
|
for (int i=0; i < count; i++)
|
||||||
|
((char*)data)[i] = val;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
_PTR memcpy(_PTR dst, const _PTR src, size_t count)
|
||||||
|
{
|
||||||
|
for (int i=0; i < count; i++)
|
||||||
|
((char*)dst)[i] = ((char*)src)[i];
|
||||||
|
return dst;
|
||||||
|
}
|
Loading…
Reference in a new issue