Page MenuHomeFreeBSD

amd64: make memmove and memcpy less slow with mov
ClosedPublic

Authored by mjg on Oct 5 2018, 8:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 28, 6:55 PM
Unknown Object (File)
Oct 2 2024, 10:26 PM
Unknown Object (File)
Oct 2 2024, 2:38 AM
Unknown Object (File)
Sep 27 2024, 1:31 PM
Unknown Object (File)
Sep 24 2024, 12:27 PM
Unknown Object (File)
Sep 24 2024, 1:54 AM
Unknown Object (File)
Sep 19 2024, 2:06 AM
Unknown Object (File)
Sep 5 2024, 5:11 PM
Subscribers

Details

Summary

The macro is in the current form in order to accomodate switching copyin/copyout to use it. Note the resulting code is not big for the other routines as they don't have to handle overlap. It provides a win of similar nature to the one seen with memset.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Can you show me one other use of the macro ? In particular, I am curious about other begin/end definitions.

I did not finish copyin/copyout yet. The macro has 2 exit points for non-overlapping case. The idea is to use it inside existing COPYIN/COPYOUT macros with something of this sort:

.macro COPYOUT_BEGIN
.endm
.macro COPYOUT_END
        SMAP_ENABLE \smap
        xorl %eax,%eax
        movq    %rax,PCB_ONFAULT(%r11)
        POP_FRAME_POINTER
.endm

For initial commit I can drop the two args. Will make it easier to import to libc.

They can be added later.

I do not care much about these two single-use arguments. I am more worried that to understand the flow it is easier to read disassembly than source code.

This revision is now accepted and ready to land.Oct 6 2018, 11:04 PM
This revision was automatically updated to reflect the committed changes.