summaryrefslogblamecommitdiff
path: root/src/string/x86_64/memcpy.s
blob: 3d960efa8936441dc468b243e75885880435df46 (plain) (tree)
1
2
3
4
5
6
              

                    

                      
             


















                     
.global memcpy
.global __memcpy_fwd
.hidden __memcpy_fwd
.type memcpy,@function
memcpy:
__memcpy_fwd:
	mov %rdi,%rax
	cmp $8,%rdx
	jc 1f
	test $7,%edi
	jz 1f
2:	movsb
	dec %rdx
	test $7,%edi
	jnz 2b
1:	mov %rdx,%rcx
	shr $3,%rcx
	rep
	movsq
	and $7,%edx
	jz 1f
2:	movsb
	dec %edx
	jnz 2b
1:	ret