xref: /aosp_15_r20/external/musl/src/string/x86_64/memmove.s (revision c9945492fdd68bbe62686c5b452b4dc1be3f8453)
1*c9945492SAndroid Build Coastguard Worker.global memmove
2*c9945492SAndroid Build Coastguard Worker.type memmove,@function
3*c9945492SAndroid Build Coastguard Workermemmove:
4*c9945492SAndroid Build Coastguard Worker	mov %rdi,%rax
5*c9945492SAndroid Build Coastguard Worker	sub %rsi,%rax
6*c9945492SAndroid Build Coastguard Worker	cmp %rdx,%rax
7*c9945492SAndroid Build Coastguard Worker.hidden __memcpy_fwd
8*c9945492SAndroid Build Coastguard Worker	jae __memcpy_fwd
9*c9945492SAndroid Build Coastguard Worker	mov %rdx,%rcx
10*c9945492SAndroid Build Coastguard Worker	lea -1(%rdi,%rdx),%rdi
11*c9945492SAndroid Build Coastguard Worker	lea -1(%rsi,%rdx),%rsi
12*c9945492SAndroid Build Coastguard Worker	std
13*c9945492SAndroid Build Coastguard Worker	rep movsb
14*c9945492SAndroid Build Coastguard Worker	cld
15*c9945492SAndroid Build Coastguard Worker	lea 1(%rdi),%rax
16*c9945492SAndroid Build Coastguard Worker	ret
17