Go to the source code of this file.
|
void * | memcpy (void *dst0, const void *src0, size_t length) |
|
◆ TLOOP
#define TLOOP |
( |
|
s | ) |
if (t) TLOOP1(s) |
◆ TLOOP1
#define TLOOP1 |
( |
|
s | ) |
do { s; } while (--t) |
◆ wmask
#define wmask (wsize - 1) |
◆ wsize
#define wsize sizeof(word) |
◆ word
◆ memcpy()
void* memcpy |
( |
void * |
dst0, |
|
|
const void * |
src0, |
|
|
size_t |
length |
|
) |
| |
Definition at line 49 of file memcpy.c.
52 const char* src = src0;
55 if(length == 0 || dst == src)
66 #define TLOOP(s) if (t) TLOOP1(s) 67 #define TLOOP1(s) do { s; } while (--t) 70 if((uintptr_t)dst < (uintptr_t)src)
76 if((t | (uintptr_t)dst) &
wmask)
82 if((t ^ (uintptr_t)dst) &
wmask || length <
wsize)
104 TLOOP(*dst++ = *src++);
116 if((t | (uintptr_t)dst) &
wmask)
118 if((t ^ (uintptr_t)dst) &
wmask || length <=
wsize)
137 TLOOP(*--dst = *--src);
References TLOOP, TLOOP1, wmask, and wsize.