mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-23 19:51:46 +00:00
Add memcpy
This commit is contained in:
parent
ef05a27f25
commit
dc0aa58fb2
@ -18,6 +18,19 @@
|
||||
* consider these trivial functions to be PD.
|
||||
*/
|
||||
|
||||
#define __HAVE_ARCH_MEMCPY
|
||||
static inline void * memcpy(void *dest, const void *src, size_t n)
|
||||
{
|
||||
int d0, d1, d2;
|
||||
__asm__ __volatile__ (
|
||||
"cld\n\t"
|
||||
"rep\n\t"
|
||||
"movsb"
|
||||
: "=&c" (d0), "=&S" (d1), "=&D" (d2)
|
||||
:"0" (n), "1" (src), "2" (dest)
|
||||
: "memory");
|
||||
return dest;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_MEMMOVE
|
||||
static inline void * memmove(void * dest,const void * src, size_t n)
|
||||
|
Loading…
Reference in New Issue
Block a user