This source file includes following definitions.
- memset
1
2
3
4
5
6
7
8 #include <machine/asm.h>
9
10 ENTRY(memset)
11 pushl %edi
12 pushl %ebx
13 movl 12(%esp),%edi
14 movzbl 16(%esp),%eax
15 movl 20(%esp),%ecx
16 pushl %edi
17
18 cld
19
20
21
22
23
24
25 cmpl $0x0f,%ecx
26 jle L1
27
28 movb %al,%ah
29 movl %eax,%edx
30 sall $16,%eax
31 orl %edx,%eax
32
33 movl %edi,%edx
34 negl %edx
35 andl $3,%edx
36 movl %ecx,%ebx
37 subl %edx,%ebx
38
39 movl %edx,%ecx
40 rep
41 stosb
42
43 movl %ebx,%ecx
44 shrl $2,%ecx
45 rep
46 stosl
47
48 movl %ebx,%ecx
49 andl $3,%ecx
50 L1: rep
51 stosb
52
53 popl %eax
54 popl %ebx
55 popl %edi
56 ret