]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/x86_64/bcopy.s
xnu-4903.270.47.tar.gz
[apple/xnu.git] / osfmk / x86_64 / bcopy.s
index 3ed02246fcf16090ceaf64882a5fc51d334ca210..78c45d2e94b1c222301010e4e9a9903ab5242fa1 100644 (file)
 /*                     rdi,                 rsi,             rdx   */
 /*
  * Note: memcpy does not support overlapping copies
-       */
-
+ */
 ENTRY(memcpy)
        movq    %rdi, %rax                      /* return destination */
        movq    %rdx,%rcx
-       shrq    $3,%rcx                         /* copy by 64-bit words */
        cld                                     /* copy forwards */
        rep
-       movsq
-       movq    %rdx,%rcx
-       andq    $7,%rcx                         /* any bytes left? */
-       rep
        movsb
        ret
 
@@ -98,13 +92,8 @@ ENTRY(bcopy)
        cmpq    %rcx,%rax                       /* overlapping && src < dst? */
        jb      1f
 
-       shrq    $3,%rcx                         /* copy by 64-bit words */
        cld                                     /* nope, copy forwards */
        rep
-       movsq
-       movq    %rdx,%rcx
-       andq    $7,%rcx                         /* any bytes left? */
-       rep
        movsb
        ret