clarify the purpose of this project
[nyanglibc.git] / stdlib / cmp.s
bloba58e26768b3203019be25269783b9929e3e1902c
1 .text
2 .p2align 4,,15
3 .globl __mpn_cmp
4 .hidden __mpn_cmp
5 .type __mpn_cmp, @function
6 __mpn_cmp:
7 subq $1, %rdx
8 jns .L5
9 jmp .L6
10 .p2align 4,,10
11 .p2align 3
12 .L9:
13 subq $1, %rdx
14 cmpq $-1, %rdx
15 je .L6
16 .L5:
17 movq (%rdi,%rdx,8), %rax
18 movq (%rsi,%rdx,8), %rcx
19 cmpq %rcx, %rax
20 je .L9
21 .L3:
22 cmpq %rax, %rcx
23 sbbl %eax, %eax
24 andl $2, %eax
25 subl $1, %eax
26 ret
27 .p2align 4,,10
28 .p2align 3
29 .L6:
30 xorl %eax, %eax
31 ret
32 .size __mpn_cmp, .-__mpn_cmp