aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/memcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lib/memcpy.c')
-rw-r--r--com32/lib/memcpy.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/com32/lib/memcpy.c b/com32/lib/memcpy.c
deleted file mode 100644
index 5ce206d0..00000000
--- a/com32/lib/memcpy.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * memcpy.c
- */
-
-#include <string.h>
-#include <stdint.h>
-
-void *memcpy(void *dst, const void *src, size_t n)
-{
- const char *p = src;
- char *q = dst;
-#if defined(__i386__)
- size_t nl = n >> 2;
- asm volatile ("cld ; rep ; movsl ; movl %3,%0 ; rep ; movsb":"+c" (nl),
- "+S"(p), "+D"(q)
- :"r"(n & 3));
-#elif defined(__x86_64__)
- size_t nq = n >> 3;
- asm volatile ("cld ; rep ; movsq ; movl %3,%%ecx ; rep ; movsb":"+c"
- (nq), "+S"(p), "+D"(q)
- :"r"((uint32_t) (n & 7)));
-#else
- while (n--) {
- *q++ = *p++;
- }
-#endif
-
- return dst;
-}