]>
Commit | Line | Data |
---|---|---|
d02b48c6 RE |
1 | .file "bn_mulw.c" |
2 | .version "01.01" | |
3 | gcc2_compiled.: | |
4 | .text | |
5 | .align 16 | |
6 | .globl bn_mul_add_word | |
7 | .type bn_mul_add_word,@function | |
8 | bn_mul_add_word: | |
9 | pushl %ebp | |
10 | pushl %edi | |
11 | pushl %esi | |
12 | pushl %ebx | |
13 | ||
14 | / ax L(t) | |
15 | / dx H(t) | |
16 | / bx a | |
17 | / cx w | |
18 | / di r | |
19 | / si c | |
20 | / bp num | |
21 | xorl %esi,%esi / c=0 | |
22 | movl 20(%esp),%edi / r => edi | |
23 | movl 24(%esp),%ebx / a => exb | |
24 | movl 28(%esp),%ebp / num => ebp | |
25 | movl 32(%esp),%ecx / w => ecx | |
26 | ||
27 | .align 4 | |
28 | .L110: | |
29 | movl %ecx,%eax / w => eax | |
30 | mull (%ebx) / w * *a | |
31 | addl (%edi),%eax / L(t)+= *r | |
32 | adcl $0,%edx / H(t)+= carry | |
33 | addl %esi,%eax / L(t)+=c | |
34 | adcl $0,%edx / H(t)+=carry | |
35 | movl %eax,(%edi) / *r=L(t) | |
36 | movl %edx,%esi / c=H(t) | |
37 | decl %ebp / --num | |
38 | je .L111 | |
39 | ||
40 | movl %ecx,%eax / w => eax | |
41 | mull 4(%ebx) / w * *a | |
42 | addl 4(%edi),%eax / L(t)+= *r | |
43 | adcl $0,%edx / H(t)+= carry | |
44 | addl %esi,%eax / L(t)+=c | |
45 | adcl $0,%edx / H(t)+=carry | |
46 | movl %eax,4(%edi) / *r=L(t) | |
47 | movl %edx,%esi / c=H(t) | |
48 | decl %ebp / --num | |
49 | je .L111 | |
50 | ||
51 | movl %ecx,%eax / w => eax | |
52 | mull 8(%ebx) / w * *a | |
53 | addl 8(%edi),%eax / L(t)+= *r | |
54 | adcl $0,%edx / H(t)+= carry | |
55 | addl %esi,%eax / L(t)+=c | |
56 | adcl $0,%edx / H(t)+=carry | |
57 | movl %eax,8(%edi) / *r=L(t) | |
58 | movl %edx,%esi / c=H(t) | |
59 | decl %ebp / --num | |
60 | je .L111 | |
61 | ||
62 | movl %ecx,%eax / w => eax | |
63 | mull 12(%ebx) / w * *a | |
64 | addl 12(%edi),%eax / L(t)+= *r | |
65 | adcl $0,%edx / H(t)+= carry | |
66 | addl %esi,%eax / L(t)+=c | |
67 | adcl $0,%edx / H(t)+=carry | |
68 | movl %eax,12(%edi) / *r=L(t) | |
69 | movl %edx,%esi / c=H(t) | |
70 | decl %ebp / --num | |
71 | je .L111 | |
72 | ||
73 | addl $16,%ebx / a+=4 (4 words) | |
74 | addl $16,%edi / r+=4 (4 words) | |
75 | ||
76 | jmp .L110 | |
77 | .align 16 | |
78 | .L111: | |
79 | movl %esi,%eax / return(c) | |
80 | popl %ebx | |
81 | popl %esi | |
82 | popl %edi | |
83 | popl %ebp | |
84 | ret | |
85 | .Lfe1: | |
86 | .size bn_mul_add_word,.Lfe1-bn_mul_add_word | |
87 | .align 16 | |
88 | .globl bn_mul_word | |
89 | .type bn_mul_word,@function | |
90 | bn_mul_word: | |
91 | pushl %ebp | |
92 | pushl %edi | |
93 | pushl %esi | |
94 | pushl %ebx | |
95 | ||
96 | / ax L(t) | |
97 | / dx H(t) | |
98 | / bx a | |
99 | / cx w | |
100 | / di r | |
101 | / num bp | |
102 | / si c | |
103 | xorl %esi,%esi / c=0 | |
104 | movl 20(%esp),%edi / r => edi | |
105 | movl 24(%esp),%ebx / a => exb | |
106 | movl 28(%esp),%ebp / num => ebp | |
107 | movl 32(%esp),%ecx / w => ecx | |
108 | ||
109 | .align 4 | |
110 | .L210: | |
111 | movl %ecx,%eax / w => eax | |
112 | mull (%ebx) / w * *a | |
113 | addl %esi,%eax / L(t)+=c | |
114 | adcl $0,%edx / H(t)+=carry | |
115 | movl %eax,(%edi) / *r=L(t) | |
116 | movl %edx,%esi / c=H(t) | |
117 | decl %ebp / --num | |
118 | je .L211 | |
119 | ||
120 | movl %ecx,%eax / w => eax | |
121 | mull 4(%ebx) / w * *a | |
122 | addl %esi,%eax / L(t)+=c | |
123 | adcl $0,%edx / H(t)+=carry | |
124 | movl %eax,4(%edi) / *r=L(t) | |
125 | movl %edx,%esi / c=H(t) | |
126 | decl %ebp / --num | |
127 | je .L211 | |
128 | ||
129 | movl %ecx,%eax / w => eax | |
130 | mull 8(%ebx) / w * *a | |
131 | addl %esi,%eax / L(t)+=c | |
132 | adcl $0,%edx / H(t)+=carry | |
133 | movl %eax,8(%edi) / *r=L(t) | |
134 | movl %edx,%esi / c=H(t) | |
135 | decl %ebp / --num | |
136 | je .L211 | |
137 | ||
138 | movl %ecx,%eax / w => eax | |
139 | mull 12(%ebx) / w * *a | |
140 | addl %esi,%eax / L(t)+=c | |
141 | adcl $0,%edx / H(t)+=carry | |
142 | movl %eax,12(%edi) / *r=L(t) | |
143 | movl %edx,%esi / c=H(t) | |
144 | decl %ebp / --num | |
145 | je .L211 | |
146 | ||
147 | addl $16,%ebx / a+=4 (4 words) | |
148 | addl $16,%edi / r+=4 (4 words) | |
149 | ||
150 | jmp .L210 | |
151 | .align 16 | |
152 | .L211: | |
153 | movl %esi,%eax / return(c) | |
154 | popl %ebx | |
155 | popl %esi | |
156 | popl %edi | |
157 | popl %ebp | |
158 | ret | |
159 | .Lfe2: | |
160 | .size bn_mul_word,.Lfe2-bn_mul_word | |
161 | ||
162 | .align 16 | |
163 | .globl bn_sqr_words | |
164 | .type bn_sqr_words,@function | |
165 | bn_sqr_words: | |
166 | pushl %edi | |
167 | pushl %esi | |
168 | pushl %ebx | |
169 | movl 16(%esp),%esi / r | |
170 | movl 20(%esp),%edi / a | |
171 | movl 24(%esp),%ebx / n | |
172 | .align 4 | |
173 | .L28: | |
174 | movl (%edi),%eax / get a | |
175 | mull %eax / a*a | |
176 | movl %eax,(%esi) / put low into return addr | |
177 | movl %edx,4(%esi) / put high into return addr | |
178 | decl %ebx / n--; | |
179 | je .L29 | |
180 | ||
181 | movl 4(%edi),%eax / get a | |
182 | mull %eax / a*a | |
183 | movl %eax,8(%esi) / put low into return addr | |
184 | movl %edx,12(%esi) / put high into return addr | |
185 | decl %ebx / n--; | |
186 | je .L29 | |
187 | ||
188 | movl 8(%edi),%eax / get a | |
189 | mull %eax / a*a | |
190 | movl %eax,16(%esi) / put low into return addr | |
191 | movl %edx,20(%esi) / put high into return addr | |
192 | decl %ebx / n--; | |
193 | je .L29 | |
194 | ||
195 | movl 12(%edi),%eax / get a | |
196 | mull %eax / a*a | |
197 | movl %eax,24(%esi) / put low into return addr | |
198 | movl %edx,28(%esi) / put high into return addr | |
199 | decl %ebx / n--; | |
200 | je .L29 | |
201 | ||
202 | addl $16,%edi | |
203 | addl $32,%esi | |
204 | jmp .L28 | |
205 | .align 16 | |
206 | .L29: | |
207 | popl %ebx | |
208 | popl %esi | |
209 | popl %edi | |
210 | ret | |
211 | .Lfe3: | |
212 | .size bn_sqr_words,.Lfe3-bn_sqr_words | |
213 | ||
214 | .align 16 | |
215 | .globl bn_div64 | |
216 | .type bn_div64,@function | |
217 | bn_div64: | |
218 | movl 4(%esp),%edx / a | |
219 | movl 8(%esp),%eax / b | |
220 | divl 12(%esp) / ab/c | |
221 | ret | |
222 | .Lfe4: | |
223 | .size bn_div64,.Lfe4-bn_div64 | |
224 | .ident "GCC: (GNU) 2.6.3" |