mailing list of musl libc
 help / color / mirror / code / Atom feed
3cc8fcf6b718295f4c977da2d7957d7d53d9c421 blob 563 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
.global memset
.type memset,@function
memset:
	movzbl %sil,%esi
	mov $0x101010101010101,%rax
	# 64-bit imul has 3-7 cycles latency, launch early
	imul %rsi,%rax

	cmp $16,%rdx
	jb 1f

	lea -1(%rdx),%rcx
	mov %rdi,%r8
	shr $3,%rcx
	mov %rax,-8(%rdi,%rdx)
	rep
	stosq
	mov %r8,%rax
	ret

1:	test %edx,%edx
	jz 1f

	mov %al,(%rdi)
	mov %al,-1(%rdi,%rdx)
	cmp $2,%edx
	jbe 1f

	mov %al,1(%rdi)
	mov %al,-2(%rdi,%rdx)
	cmp $4,%edx
	jbe 1f

	mov %eax,(%rdi)
	mov %eax,-4(%rdi,%rdx)
	cmp $8,%edx
	jbe 1f

	mov %eax,4(%rdi)
	mov %eax,-8(%rdi,%rdx)

1:	mov %rdi,%rax
	ret
debug log:

solving 3cc8fcf ...
found 3cc8fcf in https://git.vuxu.org/mirror/musl/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).