https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207422

            Bug ID: 207422
           Summary: sys/amd64/amd64/support.S mempcy does not return dest
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
                CC: [email protected]

I've checked the i386 and arm paths, and they appear to return dest in memcpy.
This is consistent with libc version of memcpy. For some reason, the amd64
version does not. Shouldn't we do something like:

ENTRY(memcpy)
        PUSH_FRAME_POINTER
        movq    %rdi,%rax                       /* return dst pointer */
        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
        POP_FRAME_POINTER
        ret
END(memcpy)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to