asm for memmove on i386 and x86_64
[musl] / src / string / x86_64 / memmove.s
1 .global memmove
2 .type memmove,@function
3 memmove:
4         mov %rdi,%rax
5         sub %rsi,%rax
6         cmp %rdx,%rax
7         jae memcpy
8         mov %rdx,%rcx
9         lea -1(%rdi,%rdx),%rdi
10         lea -1(%rsi,%rdx),%rsi
11         std
12         rep movsb
13         cld
14         lea 1(%rdi),%rax
15         ret