add big-endian support to ARM assembler memcpy
[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 .hidden __memcpy_fwd
8         jae __memcpy_fwd
9         mov %rdx,%rcx
10         lea -1(%rdi,%rdx),%rdi
11         lea -1(%rsi,%rdx),%rsi
12         std
13         rep movsb
14         cld
15         lea 1(%rdi),%rax
16         ret