47 #pragma GCC diagnostic ignored "-Wcast-align" 51 #include <clib/exec_protos.h> 70 #define TLOOP1(s) do { s; } while (--t) 75 void MemCopy(
void* destination,
const void* source,
unsigned int length)
77 char* dst = (
char*) destination;
78 const char* src = (
const char*) source;
81 if (length == 0 || dst == src)
88 CopyMem((
void*)source, destination, length);
108 TLOOP(*dst++ = *src++);
134 TLOOP(*--dst = *--src);
#define TLOOP1(s)
loop-t-times, t>0
uint32_t word
sizeof(word) MUST BE A POWER OF TWO SO THAT wmask BELOW IS ALL ONES
void MemCopy(void *destination, const void *source, unsigned int length)
Copy a block of memory, handling overlap.
#define TLOOP(s)
loop-t-times