This source file includes following definitions.
- memcmp
1
2
3
4
5
6
7
8 #include <machine/asm.h>
9
10 ENTRY(memcmp)
11 pushl %edi
12 pushl %esi
13 movl 12(%esp),%edi
14 movl 16(%esp),%esi
15 cld
16
17 movl 20(%esp),%ecx
18 shrl $2,%ecx
19 repe
20 cmpsl
21 jne L5
22
23 movl 20(%esp),%ecx
24 andl $3,%ecx
25 repe
26 cmpsb
27 jne L6
28
29 xorl %eax,%eax
30 popl %esi
31 popl %edi
32 ret
33
34 L5: movl $4,%ecx
35 subl %ecx,%edi
36 subl %ecx,%esi
37 repe
38 cmpsb
39 L6: movzbl -1(%edi),%eax
40 movzbl -1(%esi),%edx
41 subl %edx,%eax
42 popl %esi
43 popl %edi
44 ret