about summary refs log tree commit diff
path: root/sysdeps/generic/memcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/memcpy.c')
-rw-r--r--sysdeps/generic/memcpy.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/generic/memcpy.c b/sysdeps/generic/memcpy.c
index 222d358224..e1a1ade057 100644
--- a/sysdeps/generic/memcpy.c
+++ b/sysdeps/generic/memcpy.c
@@ -21,6 +21,7 @@ Cambridge, MA 02139, USA.  */
 #include <ansidecl.h>
 #include <string.h>
 #include <memcopy.h>
+#include <pagecopy.h>
 
 PTR
 DEFUN(memcpy, (dstpp, srcpp, len),
@@ -38,10 +39,14 @@ DEFUN(memcpy, (dstpp, srcpp, len),
       len -= (-dstp) % OPSIZ;
       BYTE_COPY_FWD (dstp, srcp, (-dstp) % OPSIZ);
 
-      /* Copy from SRCP to DSTP taking advantage of the known
-	 alignment of DSTP.  Number of bytes remaining is put
-	 in the third argumnet, i.e. in LEN.  This number may
-	 vary from machine to machine.  */
+      /* Copy whole pages from SRCP to DSTP by virtual address manipulation,
+	 as much as possible.  */
+
+      PAGE_COPY_FWD_MAYBE (dstp, srcp, len, len);
+
+      /* Copy from SRCP to DSTP taking advantage of the known alignment of
+	 DSTP.  Number of bytes remaining is put in the third argument,
+	 i.e. in LEN.  This number may vary from machine to machine.  */
 
       WORD_COPY_FWD (dstp, srcp, len, len);