|
@@ -18,6 +18,19 @@
|
18
|
18
|
* consider these trivial functions to be PD.
|
19
|
19
|
*/
|
20
|
20
|
|
|
21
|
+#define __HAVE_ARCH_MEMCPY
|
|
22
|
+static inline void * memcpy(void *dest, const void *src, size_t n)
|
|
23
|
+{
|
|
24
|
+int d0, d1, d2;
|
|
25
|
+__asm__ __volatile__ (
|
|
26
|
+ "cld\n\t"
|
|
27
|
+ "rep\n\t"
|
|
28
|
+ "movsb"
|
|
29
|
+ : "=&c" (d0), "=&S" (d1), "=&D" (d2)
|
|
30
|
+ :"0" (n), "1" (src), "2" (dest)
|
|
31
|
+ : "memory");
|
|
32
|
+return dest;
|
|
33
|
+}
|
21
|
34
|
|
22
|
35
|
#define __HAVE_ARCH_MEMMOVE
|
23
|
36
|
static inline void * memmove(void * dest,const void * src, size_t n)
|