clarify the purpose of this project
[nyanglibc.git] / stdlib / submul_1.shared.s
blob04ba0a130052994505130bf593bea58235f6b8e3
1 .text
2 .globl __mpn_submul_1
3 .type __mpn_submul_1,@function
4 .align 1<<4
5 __mpn_submul_1:
6 push %rbx
7 push %rbp
8 lea (%rdx), %rbx
9 neg %rbx
10 mov (%rsi), %rax
11 mov (%rdi), %r10
12 lea -16(%rdi,%rdx,8), %rdi
13 lea (%rsi,%rdx,8), %rsi
14 mul %rcx
15 bt $0, %ebx
16 jc .Lodd
17 lea (%rax), %r11
18 mov 8(%rsi,%rbx,8), %rax
19 lea (%rdx), %rbp
20 mul %rcx
21 add $2, %rbx
22 jns .Ln2
23 lea (%rax), %r8
24 mov (%rsi,%rbx,8), %rax
25 lea (%rdx), %r9
26 jmp .Lmid
27 .Lodd: add $1, %rbx
28 jns .Ln1
29 lea (%rax), %r8
30 mov (%rsi,%rbx,8), %rax
31 lea (%rdx), %r9
32 mul %rcx
33 lea (%rax), %r11
34 mov 8(%rsi,%rbx,8), %rax
35 lea (%rdx), %rbp
36 jmp .Le
37 .p2align 4
38 .Ltop: mul %rcx
39 sub %r8, %r10
40 lea (%rax), %r8
41 mov (%rsi,%rbx,8), %rax
42 adc %r9, %r11
43 mov %r10, -8(%rdi,%rbx,8)
44 mov (%rdi,%rbx,8), %r10
45 lea (%rdx), %r9
46 adc $0, %rbp
47 .Lmid: mul %rcx
48 sub %r11, %r10
49 lea (%rax), %r11
50 mov 8(%rsi,%rbx,8), %rax
51 adc %rbp, %r8
52 mov %r10, (%rdi,%rbx,8)
53 mov 8(%rdi,%rbx,8), %r10
54 lea (%rdx), %rbp
55 adc $0, %r9
56 .Le: add $2, %rbx
57 js .Ltop
58 mul %rcx
59 sub %r8, %r10
60 adc %r9, %r11
61 mov %r10, -8(%rdi)
62 adc $0, %rbp
63 .Ln2: mov (%rdi), %r10
64 sub %r11, %r10
65 adc %rbp, %rax
66 mov %r10, (%rdi)
67 adc $0, %rdx
68 .Ln1: mov 8(%rdi), %r10
69 sub %rax, %r10
70 mov %r10, 8(%rdi)
71 mov %ebx, %eax
72 adc %rdx, %rax
73 pop %rbp
74 pop %rbx
75 ret
76 .size __mpn_submul_1,.-__mpn_submul_1