memset.s\i386\string\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/string/i386/memset.s
blob: d00422c4ac15d90f133fabdc79d231702c228f6f (plain) (blame)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.global memset
.type memset,@function
memset:
	mov 12(%esp),%ecx
	cmp 62,ドル%ecx
	ja 2f
	mov 8(%esp),%dl
	mov 4(%esp),%eax
	test %ecx,%ecx
	jz 1f
	mov %dl,%dh
	mov %dl,(%eax)
	mov %dl,-1(%eax,%ecx)
	cmp 2,ドル%ecx
	jbe 1f
	mov %dx,1(%eax)
	mov %dx,(-1-2)(%eax,%ecx)
	cmp 6,ドル%ecx
	jbe 1f
	shl 16,ドル%edx
	mov 8(%esp),%dl
	mov 8(%esp),%dh
	mov %edx,(1+2)(%eax)
	mov %edx,(-1-2-4)(%eax,%ecx)
	cmp 14,ドル%ecx
	jbe 1f
	mov %edx,(1+2+4)(%eax)
	mov %edx,(1+2+4+4)(%eax)
	mov %edx,(-1-2-4-8)(%eax,%ecx)
	mov %edx,(-1-2-4-4)(%eax,%ecx)
	cmp 30,ドル%ecx
	jbe 1f
	mov %edx,(1+2+4+8)(%eax)
	mov %edx,(1+2+4+8+4)(%eax)
	mov %edx,(1+2+4+8+8)(%eax)
	mov %edx,(1+2+4+8+12)(%eax)
	mov %edx,(-1-2-4-8-16)(%eax,%ecx)
	mov %edx,(-1-2-4-8-12)(%eax,%ecx)
	mov %edx,(-1-2-4-8-8)(%eax,%ecx)
	mov %edx,(-1-2-4-8-4)(%eax,%ecx)
1:	ret 	
2:	movzbl 8(%esp),%eax
	mov %edi,12(%esp)
	imul 0ドルx1010101,%eax
	mov 4(%esp),%edi
	test 15,ドル%edi
	mov %eax,-4(%edi,%ecx)
	jnz 2f
1:	shr 2,ドル %ecx
	rep
	stosl
	mov 4(%esp),%eax
	mov 12(%esp),%edi
	ret
	
2:	xor %edx,%edx
	sub %edi,%edx
	and 15,ドル%edx
	mov %eax,(%edi)
	mov %eax,4(%edi)
	mov %eax,8(%edi)
	mov %eax,12(%edi)
	sub %edx,%ecx
	add %edx,%edi
	jmp 1b
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月06日 09:25:50 +0000

AltStyle によって変換されたページ (->オリジナル) /