1 | .text
|
---|
2 | .globl _bn_mul_comba8
|
---|
3 | .align 4
|
---|
4 | _bn_mul_comba8:
|
---|
5 | L_bn_mul_comba8_begin:
|
---|
6 | .byte 243,15,30,251
|
---|
7 | pushl %esi
|
---|
8 | movl 12(%esp),%esi
|
---|
9 | pushl %edi
|
---|
10 | movl 20(%esp),%edi
|
---|
11 | pushl %ebp
|
---|
12 | pushl %ebx
|
---|
13 | xorl %ebx,%ebx
|
---|
14 | movl (%esi),%eax
|
---|
15 | xorl %ecx,%ecx
|
---|
16 | movl (%edi),%edx
|
---|
17 | # ################## Calculate word 0
|
---|
18 | xorl %ebp,%ebp
|
---|
19 | # mul a[0]*b[0]
|
---|
20 | mull %edx
|
---|
21 | addl %eax,%ebx
|
---|
22 | movl 20(%esp),%eax
|
---|
23 | adcl %edx,%ecx
|
---|
24 | movl (%edi),%edx
|
---|
25 | adcl $0,%ebp
|
---|
26 | movl %ebx,(%eax)
|
---|
27 | movl 4(%esi),%eax
|
---|
28 | # saved r[0]
|
---|
29 | # ################## Calculate word 1
|
---|
30 | xorl %ebx,%ebx
|
---|
31 | # mul a[1]*b[0]
|
---|
32 | mull %edx
|
---|
33 | addl %eax,%ecx
|
---|
34 | movl (%esi),%eax
|
---|
35 | adcl %edx,%ebp
|
---|
36 | movl 4(%edi),%edx
|
---|
37 | adcl $0,%ebx
|
---|
38 | # mul a[0]*b[1]
|
---|
39 | mull %edx
|
---|
40 | addl %eax,%ecx
|
---|
41 | movl 20(%esp),%eax
|
---|
42 | adcl %edx,%ebp
|
---|
43 | movl (%edi),%edx
|
---|
44 | adcl $0,%ebx
|
---|
45 | movl %ecx,4(%eax)
|
---|
46 | movl 8(%esi),%eax
|
---|
47 | # saved r[1]
|
---|
48 | # ################## Calculate word 2
|
---|
49 | xorl %ecx,%ecx
|
---|
50 | # mul a[2]*b[0]
|
---|
51 | mull %edx
|
---|
52 | addl %eax,%ebp
|
---|
53 | movl 4(%esi),%eax
|
---|
54 | adcl %edx,%ebx
|
---|
55 | movl 4(%edi),%edx
|
---|
56 | adcl $0,%ecx
|
---|
57 | # mul a[1]*b[1]
|
---|
58 | mull %edx
|
---|
59 | addl %eax,%ebp
|
---|
60 | movl (%esi),%eax
|
---|
61 | adcl %edx,%ebx
|
---|
62 | movl 8(%edi),%edx
|
---|
63 | adcl $0,%ecx
|
---|
64 | # mul a[0]*b[2]
|
---|
65 | mull %edx
|
---|
66 | addl %eax,%ebp
|
---|
67 | movl 20(%esp),%eax
|
---|
68 | adcl %edx,%ebx
|
---|
69 | movl (%edi),%edx
|
---|
70 | adcl $0,%ecx
|
---|
71 | movl %ebp,8(%eax)
|
---|
72 | movl 12(%esi),%eax
|
---|
73 | # saved r[2]
|
---|
74 | # ################## Calculate word 3
|
---|
75 | xorl %ebp,%ebp
|
---|
76 | # mul a[3]*b[0]
|
---|
77 | mull %edx
|
---|
78 | addl %eax,%ebx
|
---|
79 | movl 8(%esi),%eax
|
---|
80 | adcl %edx,%ecx
|
---|
81 | movl 4(%edi),%edx
|
---|
82 | adcl $0,%ebp
|
---|
83 | # mul a[2]*b[1]
|
---|
84 | mull %edx
|
---|
85 | addl %eax,%ebx
|
---|
86 | movl 4(%esi),%eax
|
---|
87 | adcl %edx,%ecx
|
---|
88 | movl 8(%edi),%edx
|
---|
89 | adcl $0,%ebp
|
---|
90 | # mul a[1]*b[2]
|
---|
91 | mull %edx
|
---|
92 | addl %eax,%ebx
|
---|
93 | movl (%esi),%eax
|
---|
94 | adcl %edx,%ecx
|
---|
95 | movl 12(%edi),%edx
|
---|
96 | adcl $0,%ebp
|
---|
97 | # mul a[0]*b[3]
|
---|
98 | mull %edx
|
---|
99 | addl %eax,%ebx
|
---|
100 | movl 20(%esp),%eax
|
---|
101 | adcl %edx,%ecx
|
---|
102 | movl (%edi),%edx
|
---|
103 | adcl $0,%ebp
|
---|
104 | movl %ebx,12(%eax)
|
---|
105 | movl 16(%esi),%eax
|
---|
106 | # saved r[3]
|
---|
107 | # ################## Calculate word 4
|
---|
108 | xorl %ebx,%ebx
|
---|
109 | # mul a[4]*b[0]
|
---|
110 | mull %edx
|
---|
111 | addl %eax,%ecx
|
---|
112 | movl 12(%esi),%eax
|
---|
113 | adcl %edx,%ebp
|
---|
114 | movl 4(%edi),%edx
|
---|
115 | adcl $0,%ebx
|
---|
116 | # mul a[3]*b[1]
|
---|
117 | mull %edx
|
---|
118 | addl %eax,%ecx
|
---|
119 | movl 8(%esi),%eax
|
---|
120 | adcl %edx,%ebp
|
---|
121 | movl 8(%edi),%edx
|
---|
122 | adcl $0,%ebx
|
---|
123 | # mul a[2]*b[2]
|
---|
124 | mull %edx
|
---|
125 | addl %eax,%ecx
|
---|
126 | movl 4(%esi),%eax
|
---|
127 | adcl %edx,%ebp
|
---|
128 | movl 12(%edi),%edx
|
---|
129 | adcl $0,%ebx
|
---|
130 | # mul a[1]*b[3]
|
---|
131 | mull %edx
|
---|
132 | addl %eax,%ecx
|
---|
133 | movl (%esi),%eax
|
---|
134 | adcl %edx,%ebp
|
---|
135 | movl 16(%edi),%edx
|
---|
136 | adcl $0,%ebx
|
---|
137 | # mul a[0]*b[4]
|
---|
138 | mull %edx
|
---|
139 | addl %eax,%ecx
|
---|
140 | movl 20(%esp),%eax
|
---|
141 | adcl %edx,%ebp
|
---|
142 | movl (%edi),%edx
|
---|
143 | adcl $0,%ebx
|
---|
144 | movl %ecx,16(%eax)
|
---|
145 | movl 20(%esi),%eax
|
---|
146 | # saved r[4]
|
---|
147 | # ################## Calculate word 5
|
---|
148 | xorl %ecx,%ecx
|
---|
149 | # mul a[5]*b[0]
|
---|
150 | mull %edx
|
---|
151 | addl %eax,%ebp
|
---|
152 | movl 16(%esi),%eax
|
---|
153 | adcl %edx,%ebx
|
---|
154 | movl 4(%edi),%edx
|
---|
155 | adcl $0,%ecx
|
---|
156 | # mul a[4]*b[1]
|
---|
157 | mull %edx
|
---|
158 | addl %eax,%ebp
|
---|
159 | movl 12(%esi),%eax
|
---|
160 | adcl %edx,%ebx
|
---|
161 | movl 8(%edi),%edx
|
---|
162 | adcl $0,%ecx
|
---|
163 | # mul a[3]*b[2]
|
---|
164 | mull %edx
|
---|
165 | addl %eax,%ebp
|
---|
166 | movl 8(%esi),%eax
|
---|
167 | adcl %edx,%ebx
|
---|
168 | movl 12(%edi),%edx
|
---|
169 | adcl $0,%ecx
|
---|
170 | # mul a[2]*b[3]
|
---|
171 | mull %edx
|
---|
172 | addl %eax,%ebp
|
---|
173 | movl 4(%esi),%eax
|
---|
174 | adcl %edx,%ebx
|
---|
175 | movl 16(%edi),%edx
|
---|
176 | adcl $0,%ecx
|
---|
177 | # mul a[1]*b[4]
|
---|
178 | mull %edx
|
---|
179 | addl %eax,%ebp
|
---|
180 | movl (%esi),%eax
|
---|
181 | adcl %edx,%ebx
|
---|
182 | movl 20(%edi),%edx
|
---|
183 | adcl $0,%ecx
|
---|
184 | # mul a[0]*b[5]
|
---|
185 | mull %edx
|
---|
186 | addl %eax,%ebp
|
---|
187 | movl 20(%esp),%eax
|
---|
188 | adcl %edx,%ebx
|
---|
189 | movl (%edi),%edx
|
---|
190 | adcl $0,%ecx
|
---|
191 | movl %ebp,20(%eax)
|
---|
192 | movl 24(%esi),%eax
|
---|
193 | # saved r[5]
|
---|
194 | # ################## Calculate word 6
|
---|
195 | xorl %ebp,%ebp
|
---|
196 | # mul a[6]*b[0]
|
---|
197 | mull %edx
|
---|
198 | addl %eax,%ebx
|
---|
199 | movl 20(%esi),%eax
|
---|
200 | adcl %edx,%ecx
|
---|
201 | movl 4(%edi),%edx
|
---|
202 | adcl $0,%ebp
|
---|
203 | # mul a[5]*b[1]
|
---|
204 | mull %edx
|
---|
205 | addl %eax,%ebx
|
---|
206 | movl 16(%esi),%eax
|
---|
207 | adcl %edx,%ecx
|
---|
208 | movl 8(%edi),%edx
|
---|
209 | adcl $0,%ebp
|
---|
210 | # mul a[4]*b[2]
|
---|
211 | mull %edx
|
---|
212 | addl %eax,%ebx
|
---|
213 | movl 12(%esi),%eax
|
---|
214 | adcl %edx,%ecx
|
---|
215 | movl 12(%edi),%edx
|
---|
216 | adcl $0,%ebp
|
---|
217 | # mul a[3]*b[3]
|
---|
218 | mull %edx
|
---|
219 | addl %eax,%ebx
|
---|
220 | movl 8(%esi),%eax
|
---|
221 | adcl %edx,%ecx
|
---|
222 | movl 16(%edi),%edx
|
---|
223 | adcl $0,%ebp
|
---|
224 | # mul a[2]*b[4]
|
---|
225 | mull %edx
|
---|
226 | addl %eax,%ebx
|
---|
227 | movl 4(%esi),%eax
|
---|
228 | adcl %edx,%ecx
|
---|
229 | movl 20(%edi),%edx
|
---|
230 | adcl $0,%ebp
|
---|
231 | # mul a[1]*b[5]
|
---|
232 | mull %edx
|
---|
233 | addl %eax,%ebx
|
---|
234 | movl (%esi),%eax
|
---|
235 | adcl %edx,%ecx
|
---|
236 | movl 24(%edi),%edx
|
---|
237 | adcl $0,%ebp
|
---|
238 | # mul a[0]*b[6]
|
---|
239 | mull %edx
|
---|
240 | addl %eax,%ebx
|
---|
241 | movl 20(%esp),%eax
|
---|
242 | adcl %edx,%ecx
|
---|
243 | movl (%edi),%edx
|
---|
244 | adcl $0,%ebp
|
---|
245 | movl %ebx,24(%eax)
|
---|
246 | movl 28(%esi),%eax
|
---|
247 | # saved r[6]
|
---|
248 | # ################## Calculate word 7
|
---|
249 | xorl %ebx,%ebx
|
---|
250 | # mul a[7]*b[0]
|
---|
251 | mull %edx
|
---|
252 | addl %eax,%ecx
|
---|
253 | movl 24(%esi),%eax
|
---|
254 | adcl %edx,%ebp
|
---|
255 | movl 4(%edi),%edx
|
---|
256 | adcl $0,%ebx
|
---|
257 | # mul a[6]*b[1]
|
---|
258 | mull %edx
|
---|
259 | addl %eax,%ecx
|
---|
260 | movl 20(%esi),%eax
|
---|
261 | adcl %edx,%ebp
|
---|
262 | movl 8(%edi),%edx
|
---|
263 | adcl $0,%ebx
|
---|
264 | # mul a[5]*b[2]
|
---|
265 | mull %edx
|
---|
266 | addl %eax,%ecx
|
---|
267 | movl 16(%esi),%eax
|
---|
268 | adcl %edx,%ebp
|
---|
269 | movl 12(%edi),%edx
|
---|
270 | adcl $0,%ebx
|
---|
271 | # mul a[4]*b[3]
|
---|
272 | mull %edx
|
---|
273 | addl %eax,%ecx
|
---|
274 | movl 12(%esi),%eax
|
---|
275 | adcl %edx,%ebp
|
---|
276 | movl 16(%edi),%edx
|
---|
277 | adcl $0,%ebx
|
---|
278 | # mul a[3]*b[4]
|
---|
279 | mull %edx
|
---|
280 | addl %eax,%ecx
|
---|
281 | movl 8(%esi),%eax
|
---|
282 | adcl %edx,%ebp
|
---|
283 | movl 20(%edi),%edx
|
---|
284 | adcl $0,%ebx
|
---|
285 | # mul a[2]*b[5]
|
---|
286 | mull %edx
|
---|
287 | addl %eax,%ecx
|
---|
288 | movl 4(%esi),%eax
|
---|
289 | adcl %edx,%ebp
|
---|
290 | movl 24(%edi),%edx
|
---|
291 | adcl $0,%ebx
|
---|
292 | # mul a[1]*b[6]
|
---|
293 | mull %edx
|
---|
294 | addl %eax,%ecx
|
---|
295 | movl (%esi),%eax
|
---|
296 | adcl %edx,%ebp
|
---|
297 | movl 28(%edi),%edx
|
---|
298 | adcl $0,%ebx
|
---|
299 | # mul a[0]*b[7]
|
---|
300 | mull %edx
|
---|
301 | addl %eax,%ecx
|
---|
302 | movl 20(%esp),%eax
|
---|
303 | adcl %edx,%ebp
|
---|
304 | movl 4(%edi),%edx
|
---|
305 | adcl $0,%ebx
|
---|
306 | movl %ecx,28(%eax)
|
---|
307 | movl 28(%esi),%eax
|
---|
308 | # saved r[7]
|
---|
309 | # ################## Calculate word 8
|
---|
310 | xorl %ecx,%ecx
|
---|
311 | # mul a[7]*b[1]
|
---|
312 | mull %edx
|
---|
313 | addl %eax,%ebp
|
---|
314 | movl 24(%esi),%eax
|
---|
315 | adcl %edx,%ebx
|
---|
316 | movl 8(%edi),%edx
|
---|
317 | adcl $0,%ecx
|
---|
318 | # mul a[6]*b[2]
|
---|
319 | mull %edx
|
---|
320 | addl %eax,%ebp
|
---|
321 | movl 20(%esi),%eax
|
---|
322 | adcl %edx,%ebx
|
---|
323 | movl 12(%edi),%edx
|
---|
324 | adcl $0,%ecx
|
---|
325 | # mul a[5]*b[3]
|
---|
326 | mull %edx
|
---|
327 | addl %eax,%ebp
|
---|
328 | movl 16(%esi),%eax
|
---|
329 | adcl %edx,%ebx
|
---|
330 | movl 16(%edi),%edx
|
---|
331 | adcl $0,%ecx
|
---|
332 | # mul a[4]*b[4]
|
---|
333 | mull %edx
|
---|
334 | addl %eax,%ebp
|
---|
335 | movl 12(%esi),%eax
|
---|
336 | adcl %edx,%ebx
|
---|
337 | movl 20(%edi),%edx
|
---|
338 | adcl $0,%ecx
|
---|
339 | # mul a[3]*b[5]
|
---|
340 | mull %edx
|
---|
341 | addl %eax,%ebp
|
---|
342 | movl 8(%esi),%eax
|
---|
343 | adcl %edx,%ebx
|
---|
344 | movl 24(%edi),%edx
|
---|
345 | adcl $0,%ecx
|
---|
346 | # mul a[2]*b[6]
|
---|
347 | mull %edx
|
---|
348 | addl %eax,%ebp
|
---|
349 | movl 4(%esi),%eax
|
---|
350 | adcl %edx,%ebx
|
---|
351 | movl 28(%edi),%edx
|
---|
352 | adcl $0,%ecx
|
---|
353 | # mul a[1]*b[7]
|
---|
354 | mull %edx
|
---|
355 | addl %eax,%ebp
|
---|
356 | movl 20(%esp),%eax
|
---|
357 | adcl %edx,%ebx
|
---|
358 | movl 8(%edi),%edx
|
---|
359 | adcl $0,%ecx
|
---|
360 | movl %ebp,32(%eax)
|
---|
361 | movl 28(%esi),%eax
|
---|
362 | # saved r[8]
|
---|
363 | # ################## Calculate word 9
|
---|
364 | xorl %ebp,%ebp
|
---|
365 | # mul a[7]*b[2]
|
---|
366 | mull %edx
|
---|
367 | addl %eax,%ebx
|
---|
368 | movl 24(%esi),%eax
|
---|
369 | adcl %edx,%ecx
|
---|
370 | movl 12(%edi),%edx
|
---|
371 | adcl $0,%ebp
|
---|
372 | # mul a[6]*b[3]
|
---|
373 | mull %edx
|
---|
374 | addl %eax,%ebx
|
---|
375 | movl 20(%esi),%eax
|
---|
376 | adcl %edx,%ecx
|
---|
377 | movl 16(%edi),%edx
|
---|
378 | adcl $0,%ebp
|
---|
379 | # mul a[5]*b[4]
|
---|
380 | mull %edx
|
---|
381 | addl %eax,%ebx
|
---|
382 | movl 16(%esi),%eax
|
---|
383 | adcl %edx,%ecx
|
---|
384 | movl 20(%edi),%edx
|
---|
385 | adcl $0,%ebp
|
---|
386 | # mul a[4]*b[5]
|
---|
387 | mull %edx
|
---|
388 | addl %eax,%ebx
|
---|
389 | movl 12(%esi),%eax
|
---|
390 | adcl %edx,%ecx
|
---|
391 | movl 24(%edi),%edx
|
---|
392 | adcl $0,%ebp
|
---|
393 | # mul a[3]*b[6]
|
---|
394 | mull %edx
|
---|
395 | addl %eax,%ebx
|
---|
396 | movl 8(%esi),%eax
|
---|
397 | adcl %edx,%ecx
|
---|
398 | movl 28(%edi),%edx
|
---|
399 | adcl $0,%ebp
|
---|
400 | # mul a[2]*b[7]
|
---|
401 | mull %edx
|
---|
402 | addl %eax,%ebx
|
---|
403 | movl 20(%esp),%eax
|
---|
404 | adcl %edx,%ecx
|
---|
405 | movl 12(%edi),%edx
|
---|
406 | adcl $0,%ebp
|
---|
407 | movl %ebx,36(%eax)
|
---|
408 | movl 28(%esi),%eax
|
---|
409 | # saved r[9]
|
---|
410 | # ################## Calculate word 10
|
---|
411 | xorl %ebx,%ebx
|
---|
412 | # mul a[7]*b[3]
|
---|
413 | mull %edx
|
---|
414 | addl %eax,%ecx
|
---|
415 | movl 24(%esi),%eax
|
---|
416 | adcl %edx,%ebp
|
---|
417 | movl 16(%edi),%edx
|
---|
418 | adcl $0,%ebx
|
---|
419 | # mul a[6]*b[4]
|
---|
420 | mull %edx
|
---|
421 | addl %eax,%ecx
|
---|
422 | movl 20(%esi),%eax
|
---|
423 | adcl %edx,%ebp
|
---|
424 | movl 20(%edi),%edx
|
---|
425 | adcl $0,%ebx
|
---|
426 | # mul a[5]*b[5]
|
---|
427 | mull %edx
|
---|
428 | addl %eax,%ecx
|
---|
429 | movl 16(%esi),%eax
|
---|
430 | adcl %edx,%ebp
|
---|
431 | movl 24(%edi),%edx
|
---|
432 | adcl $0,%ebx
|
---|
433 | # mul a[4]*b[6]
|
---|
434 | mull %edx
|
---|
435 | addl %eax,%ecx
|
---|
436 | movl 12(%esi),%eax
|
---|
437 | adcl %edx,%ebp
|
---|
438 | movl 28(%edi),%edx
|
---|
439 | adcl $0,%ebx
|
---|
440 | # mul a[3]*b[7]
|
---|
441 | mull %edx
|
---|
442 | addl %eax,%ecx
|
---|
443 | movl 20(%esp),%eax
|
---|
444 | adcl %edx,%ebp
|
---|
445 | movl 16(%edi),%edx
|
---|
446 | adcl $0,%ebx
|
---|
447 | movl %ecx,40(%eax)
|
---|
448 | movl 28(%esi),%eax
|
---|
449 | # saved r[10]
|
---|
450 | # ################## Calculate word 11
|
---|
451 | xorl %ecx,%ecx
|
---|
452 | # mul a[7]*b[4]
|
---|
453 | mull %edx
|
---|
454 | addl %eax,%ebp
|
---|
455 | movl 24(%esi),%eax
|
---|
456 | adcl %edx,%ebx
|
---|
457 | movl 20(%edi),%edx
|
---|
458 | adcl $0,%ecx
|
---|
459 | # mul a[6]*b[5]
|
---|
460 | mull %edx
|
---|
461 | addl %eax,%ebp
|
---|
462 | movl 20(%esi),%eax
|
---|
463 | adcl %edx,%ebx
|
---|
464 | movl 24(%edi),%edx
|
---|
465 | adcl $0,%ecx
|
---|
466 | # mul a[5]*b[6]
|
---|
467 | mull %edx
|
---|
468 | addl %eax,%ebp
|
---|
469 | movl 16(%esi),%eax
|
---|
470 | adcl %edx,%ebx
|
---|
471 | movl 28(%edi),%edx
|
---|
472 | adcl $0,%ecx
|
---|
473 | # mul a[4]*b[7]
|
---|
474 | mull %edx
|
---|
475 | addl %eax,%ebp
|
---|
476 | movl 20(%esp),%eax
|
---|
477 | adcl %edx,%ebx
|
---|
478 | movl 20(%edi),%edx
|
---|
479 | adcl $0,%ecx
|
---|
480 | movl %ebp,44(%eax)
|
---|
481 | movl 28(%esi),%eax
|
---|
482 | # saved r[11]
|
---|
483 | # ################## Calculate word 12
|
---|
484 | xorl %ebp,%ebp
|
---|
485 | # mul a[7]*b[5]
|
---|
486 | mull %edx
|
---|
487 | addl %eax,%ebx
|
---|
488 | movl 24(%esi),%eax
|
---|
489 | adcl %edx,%ecx
|
---|
490 | movl 24(%edi),%edx
|
---|
491 | adcl $0,%ebp
|
---|
492 | # mul a[6]*b[6]
|
---|
493 | mull %edx
|
---|
494 | addl %eax,%ebx
|
---|
495 | movl 20(%esi),%eax
|
---|
496 | adcl %edx,%ecx
|
---|
497 | movl 28(%edi),%edx
|
---|
498 | adcl $0,%ebp
|
---|
499 | # mul a[5]*b[7]
|
---|
500 | mull %edx
|
---|
501 | addl %eax,%ebx
|
---|
502 | movl 20(%esp),%eax
|
---|
503 | adcl %edx,%ecx
|
---|
504 | movl 24(%edi),%edx
|
---|
505 | adcl $0,%ebp
|
---|
506 | movl %ebx,48(%eax)
|
---|
507 | movl 28(%esi),%eax
|
---|
508 | # saved r[12]
|
---|
509 | # ################## Calculate word 13
|
---|
510 | xorl %ebx,%ebx
|
---|
511 | # mul a[7]*b[6]
|
---|
512 | mull %edx
|
---|
513 | addl %eax,%ecx
|
---|
514 | movl 24(%esi),%eax
|
---|
515 | adcl %edx,%ebp
|
---|
516 | movl 28(%edi),%edx
|
---|
517 | adcl $0,%ebx
|
---|
518 | # mul a[6]*b[7]
|
---|
519 | mull %edx
|
---|
520 | addl %eax,%ecx
|
---|
521 | movl 20(%esp),%eax
|
---|
522 | adcl %edx,%ebp
|
---|
523 | movl 28(%edi),%edx
|
---|
524 | adcl $0,%ebx
|
---|
525 | movl %ecx,52(%eax)
|
---|
526 | movl 28(%esi),%eax
|
---|
527 | # saved r[13]
|
---|
528 | # ################## Calculate word 14
|
---|
529 | xorl %ecx,%ecx
|
---|
530 | # mul a[7]*b[7]
|
---|
531 | mull %edx
|
---|
532 | addl %eax,%ebp
|
---|
533 | movl 20(%esp),%eax
|
---|
534 | adcl %edx,%ebx
|
---|
535 | adcl $0,%ecx
|
---|
536 | movl %ebp,56(%eax)
|
---|
537 | # saved r[14]
|
---|
538 | # save r[15]
|
---|
539 | movl %ebx,60(%eax)
|
---|
540 | popl %ebx
|
---|
541 | popl %ebp
|
---|
542 | popl %edi
|
---|
543 | popl %esi
|
---|
544 | ret
|
---|
545 | .globl _bn_mul_comba4
|
---|
546 | .align 4
|
---|
547 | _bn_mul_comba4:
|
---|
548 | L_bn_mul_comba4_begin:
|
---|
549 | .byte 243,15,30,251
|
---|
550 | pushl %esi
|
---|
551 | movl 12(%esp),%esi
|
---|
552 | pushl %edi
|
---|
553 | movl 20(%esp),%edi
|
---|
554 | pushl %ebp
|
---|
555 | pushl %ebx
|
---|
556 | xorl %ebx,%ebx
|
---|
557 | movl (%esi),%eax
|
---|
558 | xorl %ecx,%ecx
|
---|
559 | movl (%edi),%edx
|
---|
560 | # ################## Calculate word 0
|
---|
561 | xorl %ebp,%ebp
|
---|
562 | # mul a[0]*b[0]
|
---|
563 | mull %edx
|
---|
564 | addl %eax,%ebx
|
---|
565 | movl 20(%esp),%eax
|
---|
566 | adcl %edx,%ecx
|
---|
567 | movl (%edi),%edx
|
---|
568 | adcl $0,%ebp
|
---|
569 | movl %ebx,(%eax)
|
---|
570 | movl 4(%esi),%eax
|
---|
571 | # saved r[0]
|
---|
572 | # ################## Calculate word 1
|
---|
573 | xorl %ebx,%ebx
|
---|
574 | # mul a[1]*b[0]
|
---|
575 | mull %edx
|
---|
576 | addl %eax,%ecx
|
---|
577 | movl (%esi),%eax
|
---|
578 | adcl %edx,%ebp
|
---|
579 | movl 4(%edi),%edx
|
---|
580 | adcl $0,%ebx
|
---|
581 | # mul a[0]*b[1]
|
---|
582 | mull %edx
|
---|
583 | addl %eax,%ecx
|
---|
584 | movl 20(%esp),%eax
|
---|
585 | adcl %edx,%ebp
|
---|
586 | movl (%edi),%edx
|
---|
587 | adcl $0,%ebx
|
---|
588 | movl %ecx,4(%eax)
|
---|
589 | movl 8(%esi),%eax
|
---|
590 | # saved r[1]
|
---|
591 | # ################## Calculate word 2
|
---|
592 | xorl %ecx,%ecx
|
---|
593 | # mul a[2]*b[0]
|
---|
594 | mull %edx
|
---|
595 | addl %eax,%ebp
|
---|
596 | movl 4(%esi),%eax
|
---|
597 | adcl %edx,%ebx
|
---|
598 | movl 4(%edi),%edx
|
---|
599 | adcl $0,%ecx
|
---|
600 | # mul a[1]*b[1]
|
---|
601 | mull %edx
|
---|
602 | addl %eax,%ebp
|
---|
603 | movl (%esi),%eax
|
---|
604 | adcl %edx,%ebx
|
---|
605 | movl 8(%edi),%edx
|
---|
606 | adcl $0,%ecx
|
---|
607 | # mul a[0]*b[2]
|
---|
608 | mull %edx
|
---|
609 | addl %eax,%ebp
|
---|
610 | movl 20(%esp),%eax
|
---|
611 | adcl %edx,%ebx
|
---|
612 | movl (%edi),%edx
|
---|
613 | adcl $0,%ecx
|
---|
614 | movl %ebp,8(%eax)
|
---|
615 | movl 12(%esi),%eax
|
---|
616 | # saved r[2]
|
---|
617 | # ################## Calculate word 3
|
---|
618 | xorl %ebp,%ebp
|
---|
619 | # mul a[3]*b[0]
|
---|
620 | mull %edx
|
---|
621 | addl %eax,%ebx
|
---|
622 | movl 8(%esi),%eax
|
---|
623 | adcl %edx,%ecx
|
---|
624 | movl 4(%edi),%edx
|
---|
625 | adcl $0,%ebp
|
---|
626 | # mul a[2]*b[1]
|
---|
627 | mull %edx
|
---|
628 | addl %eax,%ebx
|
---|
629 | movl 4(%esi),%eax
|
---|
630 | adcl %edx,%ecx
|
---|
631 | movl 8(%edi),%edx
|
---|
632 | adcl $0,%ebp
|
---|
633 | # mul a[1]*b[2]
|
---|
634 | mull %edx
|
---|
635 | addl %eax,%ebx
|
---|
636 | movl (%esi),%eax
|
---|
637 | adcl %edx,%ecx
|
---|
638 | movl 12(%edi),%edx
|
---|
639 | adcl $0,%ebp
|
---|
640 | # mul a[0]*b[3]
|
---|
641 | mull %edx
|
---|
642 | addl %eax,%ebx
|
---|
643 | movl 20(%esp),%eax
|
---|
644 | adcl %edx,%ecx
|
---|
645 | movl 4(%edi),%edx
|
---|
646 | adcl $0,%ebp
|
---|
647 | movl %ebx,12(%eax)
|
---|
648 | movl 12(%esi),%eax
|
---|
649 | # saved r[3]
|
---|
650 | # ################## Calculate word 4
|
---|
651 | xorl %ebx,%ebx
|
---|
652 | # mul a[3]*b[1]
|
---|
653 | mull %edx
|
---|
654 | addl %eax,%ecx
|
---|
655 | movl 8(%esi),%eax
|
---|
656 | adcl %edx,%ebp
|
---|
657 | movl 8(%edi),%edx
|
---|
658 | adcl $0,%ebx
|
---|
659 | # mul a[2]*b[2]
|
---|
660 | mull %edx
|
---|
661 | addl %eax,%ecx
|
---|
662 | movl 4(%esi),%eax
|
---|
663 | adcl %edx,%ebp
|
---|
664 | movl 12(%edi),%edx
|
---|
665 | adcl $0,%ebx
|
---|
666 | # mul a[1]*b[3]
|
---|
667 | mull %edx
|
---|
668 | addl %eax,%ecx
|
---|
669 | movl 20(%esp),%eax
|
---|
670 | adcl %edx,%ebp
|
---|
671 | movl 8(%edi),%edx
|
---|
672 | adcl $0,%ebx
|
---|
673 | movl %ecx,16(%eax)
|
---|
674 | movl 12(%esi),%eax
|
---|
675 | # saved r[4]
|
---|
676 | # ################## Calculate word 5
|
---|
677 | xorl %ecx,%ecx
|
---|
678 | # mul a[3]*b[2]
|
---|
679 | mull %edx
|
---|
680 | addl %eax,%ebp
|
---|
681 | movl 8(%esi),%eax
|
---|
682 | adcl %edx,%ebx
|
---|
683 | movl 12(%edi),%edx
|
---|
684 | adcl $0,%ecx
|
---|
685 | # mul a[2]*b[3]
|
---|
686 | mull %edx
|
---|
687 | addl %eax,%ebp
|
---|
688 | movl 20(%esp),%eax
|
---|
689 | adcl %edx,%ebx
|
---|
690 | movl 12(%edi),%edx
|
---|
691 | adcl $0,%ecx
|
---|
692 | movl %ebp,20(%eax)
|
---|
693 | movl 12(%esi),%eax
|
---|
694 | # saved r[5]
|
---|
695 | # ################## Calculate word 6
|
---|
696 | xorl %ebp,%ebp
|
---|
697 | # mul a[3]*b[3]
|
---|
698 | mull %edx
|
---|
699 | addl %eax,%ebx
|
---|
700 | movl 20(%esp),%eax
|
---|
701 | adcl %edx,%ecx
|
---|
702 | adcl $0,%ebp
|
---|
703 | movl %ebx,24(%eax)
|
---|
704 | # saved r[6]
|
---|
705 | # save r[7]
|
---|
706 | movl %ecx,28(%eax)
|
---|
707 | popl %ebx
|
---|
708 | popl %ebp
|
---|
709 | popl %edi
|
---|
710 | popl %esi
|
---|
711 | ret
|
---|
712 | .globl _bn_sqr_comba8
|
---|
713 | .align 4
|
---|
714 | _bn_sqr_comba8:
|
---|
715 | L_bn_sqr_comba8_begin:
|
---|
716 | .byte 243,15,30,251
|
---|
717 | pushl %esi
|
---|
718 | pushl %edi
|
---|
719 | pushl %ebp
|
---|
720 | pushl %ebx
|
---|
721 | movl 20(%esp),%edi
|
---|
722 | movl 24(%esp),%esi
|
---|
723 | xorl %ebx,%ebx
|
---|
724 | xorl %ecx,%ecx
|
---|
725 | movl (%esi),%eax
|
---|
726 | # ############### Calculate word 0
|
---|
727 | xorl %ebp,%ebp
|
---|
728 | # sqr a[0]*a[0]
|
---|
729 | mull %eax
|
---|
730 | addl %eax,%ebx
|
---|
731 | adcl %edx,%ecx
|
---|
732 | movl (%esi),%edx
|
---|
733 | adcl $0,%ebp
|
---|
734 | movl %ebx,(%edi)
|
---|
735 | movl 4(%esi),%eax
|
---|
736 | # saved r[0]
|
---|
737 | # ############### Calculate word 1
|
---|
738 | xorl %ebx,%ebx
|
---|
739 | # sqr a[1]*a[0]
|
---|
740 | mull %edx
|
---|
741 | addl %eax,%eax
|
---|
742 | adcl %edx,%edx
|
---|
743 | adcl $0,%ebx
|
---|
744 | addl %eax,%ecx
|
---|
745 | adcl %edx,%ebp
|
---|
746 | movl 8(%esi),%eax
|
---|
747 | adcl $0,%ebx
|
---|
748 | movl %ecx,4(%edi)
|
---|
749 | movl (%esi),%edx
|
---|
750 | # saved r[1]
|
---|
751 | # ############### Calculate word 2
|
---|
752 | xorl %ecx,%ecx
|
---|
753 | # sqr a[2]*a[0]
|
---|
754 | mull %edx
|
---|
755 | addl %eax,%eax
|
---|
756 | adcl %edx,%edx
|
---|
757 | adcl $0,%ecx
|
---|
758 | addl %eax,%ebp
|
---|
759 | adcl %edx,%ebx
|
---|
760 | movl 4(%esi),%eax
|
---|
761 | adcl $0,%ecx
|
---|
762 | # sqr a[1]*a[1]
|
---|
763 | mull %eax
|
---|
764 | addl %eax,%ebp
|
---|
765 | adcl %edx,%ebx
|
---|
766 | movl (%esi),%edx
|
---|
767 | adcl $0,%ecx
|
---|
768 | movl %ebp,8(%edi)
|
---|
769 | movl 12(%esi),%eax
|
---|
770 | # saved r[2]
|
---|
771 | # ############### Calculate word 3
|
---|
772 | xorl %ebp,%ebp
|
---|
773 | # sqr a[3]*a[0]
|
---|
774 | mull %edx
|
---|
775 | addl %eax,%eax
|
---|
776 | adcl %edx,%edx
|
---|
777 | adcl $0,%ebp
|
---|
778 | addl %eax,%ebx
|
---|
779 | adcl %edx,%ecx
|
---|
780 | movl 8(%esi),%eax
|
---|
781 | adcl $0,%ebp
|
---|
782 | movl 4(%esi),%edx
|
---|
783 | # sqr a[2]*a[1]
|
---|
784 | mull %edx
|
---|
785 | addl %eax,%eax
|
---|
786 | adcl %edx,%edx
|
---|
787 | adcl $0,%ebp
|
---|
788 | addl %eax,%ebx
|
---|
789 | adcl %edx,%ecx
|
---|
790 | movl 16(%esi),%eax
|
---|
791 | adcl $0,%ebp
|
---|
792 | movl %ebx,12(%edi)
|
---|
793 | movl (%esi),%edx
|
---|
794 | # saved r[3]
|
---|
795 | # ############### Calculate word 4
|
---|
796 | xorl %ebx,%ebx
|
---|
797 | # sqr a[4]*a[0]
|
---|
798 | mull %edx
|
---|
799 | addl %eax,%eax
|
---|
800 | adcl %edx,%edx
|
---|
801 | adcl $0,%ebx
|
---|
802 | addl %eax,%ecx
|
---|
803 | adcl %edx,%ebp
|
---|
804 | movl 12(%esi),%eax
|
---|
805 | adcl $0,%ebx
|
---|
806 | movl 4(%esi),%edx
|
---|
807 | # sqr a[3]*a[1]
|
---|
808 | mull %edx
|
---|
809 | addl %eax,%eax
|
---|
810 | adcl %edx,%edx
|
---|
811 | adcl $0,%ebx
|
---|
812 | addl %eax,%ecx
|
---|
813 | adcl %edx,%ebp
|
---|
814 | movl 8(%esi),%eax
|
---|
815 | adcl $0,%ebx
|
---|
816 | # sqr a[2]*a[2]
|
---|
817 | mull %eax
|
---|
818 | addl %eax,%ecx
|
---|
819 | adcl %edx,%ebp
|
---|
820 | movl (%esi),%edx
|
---|
821 | adcl $0,%ebx
|
---|
822 | movl %ecx,16(%edi)
|
---|
823 | movl 20(%esi),%eax
|
---|
824 | # saved r[4]
|
---|
825 | # ############### Calculate word 5
|
---|
826 | xorl %ecx,%ecx
|
---|
827 | # sqr a[5]*a[0]
|
---|
828 | mull %edx
|
---|
829 | addl %eax,%eax
|
---|
830 | adcl %edx,%edx
|
---|
831 | adcl $0,%ecx
|
---|
832 | addl %eax,%ebp
|
---|
833 | adcl %edx,%ebx
|
---|
834 | movl 16(%esi),%eax
|
---|
835 | adcl $0,%ecx
|
---|
836 | movl 4(%esi),%edx
|
---|
837 | # sqr a[4]*a[1]
|
---|
838 | mull %edx
|
---|
839 | addl %eax,%eax
|
---|
840 | adcl %edx,%edx
|
---|
841 | adcl $0,%ecx
|
---|
842 | addl %eax,%ebp
|
---|
843 | adcl %edx,%ebx
|
---|
844 | movl 12(%esi),%eax
|
---|
845 | adcl $0,%ecx
|
---|
846 | movl 8(%esi),%edx
|
---|
847 | # sqr a[3]*a[2]
|
---|
848 | mull %edx
|
---|
849 | addl %eax,%eax
|
---|
850 | adcl %edx,%edx
|
---|
851 | adcl $0,%ecx
|
---|
852 | addl %eax,%ebp
|
---|
853 | adcl %edx,%ebx
|
---|
854 | movl 24(%esi),%eax
|
---|
855 | adcl $0,%ecx
|
---|
856 | movl %ebp,20(%edi)
|
---|
857 | movl (%esi),%edx
|
---|
858 | # saved r[5]
|
---|
859 | # ############### Calculate word 6
|
---|
860 | xorl %ebp,%ebp
|
---|
861 | # sqr a[6]*a[0]
|
---|
862 | mull %edx
|
---|
863 | addl %eax,%eax
|
---|
864 | adcl %edx,%edx
|
---|
865 | adcl $0,%ebp
|
---|
866 | addl %eax,%ebx
|
---|
867 | adcl %edx,%ecx
|
---|
868 | movl 20(%esi),%eax
|
---|
869 | adcl $0,%ebp
|
---|
870 | movl 4(%esi),%edx
|
---|
871 | # sqr a[5]*a[1]
|
---|
872 | mull %edx
|
---|
873 | addl %eax,%eax
|
---|
874 | adcl %edx,%edx
|
---|
875 | adcl $0,%ebp
|
---|
876 | addl %eax,%ebx
|
---|
877 | adcl %edx,%ecx
|
---|
878 | movl 16(%esi),%eax
|
---|
879 | adcl $0,%ebp
|
---|
880 | movl 8(%esi),%edx
|
---|
881 | # sqr a[4]*a[2]
|
---|
882 | mull %edx
|
---|
883 | addl %eax,%eax
|
---|
884 | adcl %edx,%edx
|
---|
885 | adcl $0,%ebp
|
---|
886 | addl %eax,%ebx
|
---|
887 | adcl %edx,%ecx
|
---|
888 | movl 12(%esi),%eax
|
---|
889 | adcl $0,%ebp
|
---|
890 | # sqr a[3]*a[3]
|
---|
891 | mull %eax
|
---|
892 | addl %eax,%ebx
|
---|
893 | adcl %edx,%ecx
|
---|
894 | movl (%esi),%edx
|
---|
895 | adcl $0,%ebp
|
---|
896 | movl %ebx,24(%edi)
|
---|
897 | movl 28(%esi),%eax
|
---|
898 | # saved r[6]
|
---|
899 | # ############### Calculate word 7
|
---|
900 | xorl %ebx,%ebx
|
---|
901 | # sqr a[7]*a[0]
|
---|
902 | mull %edx
|
---|
903 | addl %eax,%eax
|
---|
904 | adcl %edx,%edx
|
---|
905 | adcl $0,%ebx
|
---|
906 | addl %eax,%ecx
|
---|
907 | adcl %edx,%ebp
|
---|
908 | movl 24(%esi),%eax
|
---|
909 | adcl $0,%ebx
|
---|
910 | movl 4(%esi),%edx
|
---|
911 | # sqr a[6]*a[1]
|
---|
912 | mull %edx
|
---|
913 | addl %eax,%eax
|
---|
914 | adcl %edx,%edx
|
---|
915 | adcl $0,%ebx
|
---|
916 | addl %eax,%ecx
|
---|
917 | adcl %edx,%ebp
|
---|
918 | movl 20(%esi),%eax
|
---|
919 | adcl $0,%ebx
|
---|
920 | movl 8(%esi),%edx
|
---|
921 | # sqr a[5]*a[2]
|
---|
922 | mull %edx
|
---|
923 | addl %eax,%eax
|
---|
924 | adcl %edx,%edx
|
---|
925 | adcl $0,%ebx
|
---|
926 | addl %eax,%ecx
|
---|
927 | adcl %edx,%ebp
|
---|
928 | movl 16(%esi),%eax
|
---|
929 | adcl $0,%ebx
|
---|
930 | movl 12(%esi),%edx
|
---|
931 | # sqr a[4]*a[3]
|
---|
932 | mull %edx
|
---|
933 | addl %eax,%eax
|
---|
934 | adcl %edx,%edx
|
---|
935 | adcl $0,%ebx
|
---|
936 | addl %eax,%ecx
|
---|
937 | adcl %edx,%ebp
|
---|
938 | movl 28(%esi),%eax
|
---|
939 | adcl $0,%ebx
|
---|
940 | movl %ecx,28(%edi)
|
---|
941 | movl 4(%esi),%edx
|
---|
942 | # saved r[7]
|
---|
943 | # ############### Calculate word 8
|
---|
944 | xorl %ecx,%ecx
|
---|
945 | # sqr a[7]*a[1]
|
---|
946 | mull %edx
|
---|
947 | addl %eax,%eax
|
---|
948 | adcl %edx,%edx
|
---|
949 | adcl $0,%ecx
|
---|
950 | addl %eax,%ebp
|
---|
951 | adcl %edx,%ebx
|
---|
952 | movl 24(%esi),%eax
|
---|
953 | adcl $0,%ecx
|
---|
954 | movl 8(%esi),%edx
|
---|
955 | # sqr a[6]*a[2]
|
---|
956 | mull %edx
|
---|
957 | addl %eax,%eax
|
---|
958 | adcl %edx,%edx
|
---|
959 | adcl $0,%ecx
|
---|
960 | addl %eax,%ebp
|
---|
961 | adcl %edx,%ebx
|
---|
962 | movl 20(%esi),%eax
|
---|
963 | adcl $0,%ecx
|
---|
964 | movl 12(%esi),%edx
|
---|
965 | # sqr a[5]*a[3]
|
---|
966 | mull %edx
|
---|
967 | addl %eax,%eax
|
---|
968 | adcl %edx,%edx
|
---|
969 | adcl $0,%ecx
|
---|
970 | addl %eax,%ebp
|
---|
971 | adcl %edx,%ebx
|
---|
972 | movl 16(%esi),%eax
|
---|
973 | adcl $0,%ecx
|
---|
974 | # sqr a[4]*a[4]
|
---|
975 | mull %eax
|
---|
976 | addl %eax,%ebp
|
---|
977 | adcl %edx,%ebx
|
---|
978 | movl 8(%esi),%edx
|
---|
979 | adcl $0,%ecx
|
---|
980 | movl %ebp,32(%edi)
|
---|
981 | movl 28(%esi),%eax
|
---|
982 | # saved r[8]
|
---|
983 | # ############### Calculate word 9
|
---|
984 | xorl %ebp,%ebp
|
---|
985 | # sqr a[7]*a[2]
|
---|
986 | mull %edx
|
---|
987 | addl %eax,%eax
|
---|
988 | adcl %edx,%edx
|
---|
989 | adcl $0,%ebp
|
---|
990 | addl %eax,%ebx
|
---|
991 | adcl %edx,%ecx
|
---|
992 | movl 24(%esi),%eax
|
---|
993 | adcl $0,%ebp
|
---|
994 | movl 12(%esi),%edx
|
---|
995 | # sqr a[6]*a[3]
|
---|
996 | mull %edx
|
---|
997 | addl %eax,%eax
|
---|
998 | adcl %edx,%edx
|
---|
999 | adcl $0,%ebp
|
---|
1000 | addl %eax,%ebx
|
---|
1001 | adcl %edx,%ecx
|
---|
1002 | movl 20(%esi),%eax
|
---|
1003 | adcl $0,%ebp
|
---|
1004 | movl 16(%esi),%edx
|
---|
1005 | # sqr a[5]*a[4]
|
---|
1006 | mull %edx
|
---|
1007 | addl %eax,%eax
|
---|
1008 | adcl %edx,%edx
|
---|
1009 | adcl $0,%ebp
|
---|
1010 | addl %eax,%ebx
|
---|
1011 | adcl %edx,%ecx
|
---|
1012 | movl 28(%esi),%eax
|
---|
1013 | adcl $0,%ebp
|
---|
1014 | movl %ebx,36(%edi)
|
---|
1015 | movl 12(%esi),%edx
|
---|
1016 | # saved r[9]
|
---|
1017 | # ############### Calculate word 10
|
---|
1018 | xorl %ebx,%ebx
|
---|
1019 | # sqr a[7]*a[3]
|
---|
1020 | mull %edx
|
---|
1021 | addl %eax,%eax
|
---|
1022 | adcl %edx,%edx
|
---|
1023 | adcl $0,%ebx
|
---|
1024 | addl %eax,%ecx
|
---|
1025 | adcl %edx,%ebp
|
---|
1026 | movl 24(%esi),%eax
|
---|
1027 | adcl $0,%ebx
|
---|
1028 | movl 16(%esi),%edx
|
---|
1029 | # sqr a[6]*a[4]
|
---|
1030 | mull %edx
|
---|
1031 | addl %eax,%eax
|
---|
1032 | adcl %edx,%edx
|
---|
1033 | adcl $0,%ebx
|
---|
1034 | addl %eax,%ecx
|
---|
1035 | adcl %edx,%ebp
|
---|
1036 | movl 20(%esi),%eax
|
---|
1037 | adcl $0,%ebx
|
---|
1038 | # sqr a[5]*a[5]
|
---|
1039 | mull %eax
|
---|
1040 | addl %eax,%ecx
|
---|
1041 | adcl %edx,%ebp
|
---|
1042 | movl 16(%esi),%edx
|
---|
1043 | adcl $0,%ebx
|
---|
1044 | movl %ecx,40(%edi)
|
---|
1045 | movl 28(%esi),%eax
|
---|
1046 | # saved r[10]
|
---|
1047 | # ############### Calculate word 11
|
---|
1048 | xorl %ecx,%ecx
|
---|
1049 | # sqr a[7]*a[4]
|
---|
1050 | mull %edx
|
---|
1051 | addl %eax,%eax
|
---|
1052 | adcl %edx,%edx
|
---|
1053 | adcl $0,%ecx
|
---|
1054 | addl %eax,%ebp
|
---|
1055 | adcl %edx,%ebx
|
---|
1056 | movl 24(%esi),%eax
|
---|
1057 | adcl $0,%ecx
|
---|
1058 | movl 20(%esi),%edx
|
---|
1059 | # sqr a[6]*a[5]
|
---|
1060 | mull %edx
|
---|
1061 | addl %eax,%eax
|
---|
1062 | adcl %edx,%edx
|
---|
1063 | adcl $0,%ecx
|
---|
1064 | addl %eax,%ebp
|
---|
1065 | adcl %edx,%ebx
|
---|
1066 | movl 28(%esi),%eax
|
---|
1067 | adcl $0,%ecx
|
---|
1068 | movl %ebp,44(%edi)
|
---|
1069 | movl 20(%esi),%edx
|
---|
1070 | # saved r[11]
|
---|
1071 | # ############### Calculate word 12
|
---|
1072 | xorl %ebp,%ebp
|
---|
1073 | # sqr a[7]*a[5]
|
---|
1074 | mull %edx
|
---|
1075 | addl %eax,%eax
|
---|
1076 | adcl %edx,%edx
|
---|
1077 | adcl $0,%ebp
|
---|
1078 | addl %eax,%ebx
|
---|
1079 | adcl %edx,%ecx
|
---|
1080 | movl 24(%esi),%eax
|
---|
1081 | adcl $0,%ebp
|
---|
1082 | # sqr a[6]*a[6]
|
---|
1083 | mull %eax
|
---|
1084 | addl %eax,%ebx
|
---|
1085 | adcl %edx,%ecx
|
---|
1086 | movl 24(%esi),%edx
|
---|
1087 | adcl $0,%ebp
|
---|
1088 | movl %ebx,48(%edi)
|
---|
1089 | movl 28(%esi),%eax
|
---|
1090 | # saved r[12]
|
---|
1091 | # ############### Calculate word 13
|
---|
1092 | xorl %ebx,%ebx
|
---|
1093 | # sqr a[7]*a[6]
|
---|
1094 | mull %edx
|
---|
1095 | addl %eax,%eax
|
---|
1096 | adcl %edx,%edx
|
---|
1097 | adcl $0,%ebx
|
---|
1098 | addl %eax,%ecx
|
---|
1099 | adcl %edx,%ebp
|
---|
1100 | movl 28(%esi),%eax
|
---|
1101 | adcl $0,%ebx
|
---|
1102 | movl %ecx,52(%edi)
|
---|
1103 | # saved r[13]
|
---|
1104 | # ############### Calculate word 14
|
---|
1105 | xorl %ecx,%ecx
|
---|
1106 | # sqr a[7]*a[7]
|
---|
1107 | mull %eax
|
---|
1108 | addl %eax,%ebp
|
---|
1109 | adcl %edx,%ebx
|
---|
1110 | adcl $0,%ecx
|
---|
1111 | movl %ebp,56(%edi)
|
---|
1112 | # saved r[14]
|
---|
1113 | movl %ebx,60(%edi)
|
---|
1114 | popl %ebx
|
---|
1115 | popl %ebp
|
---|
1116 | popl %edi
|
---|
1117 | popl %esi
|
---|
1118 | ret
|
---|
1119 | .globl _bn_sqr_comba4
|
---|
1120 | .align 4
|
---|
1121 | _bn_sqr_comba4:
|
---|
1122 | L_bn_sqr_comba4_begin:
|
---|
1123 | .byte 243,15,30,251
|
---|
1124 | pushl %esi
|
---|
1125 | pushl %edi
|
---|
1126 | pushl %ebp
|
---|
1127 | pushl %ebx
|
---|
1128 | movl 20(%esp),%edi
|
---|
1129 | movl 24(%esp),%esi
|
---|
1130 | xorl %ebx,%ebx
|
---|
1131 | xorl %ecx,%ecx
|
---|
1132 | movl (%esi),%eax
|
---|
1133 | # ############### Calculate word 0
|
---|
1134 | xorl %ebp,%ebp
|
---|
1135 | # sqr a[0]*a[0]
|
---|
1136 | mull %eax
|
---|
1137 | addl %eax,%ebx
|
---|
1138 | adcl %edx,%ecx
|
---|
1139 | movl (%esi),%edx
|
---|
1140 | adcl $0,%ebp
|
---|
1141 | movl %ebx,(%edi)
|
---|
1142 | movl 4(%esi),%eax
|
---|
1143 | # saved r[0]
|
---|
1144 | # ############### Calculate word 1
|
---|
1145 | xorl %ebx,%ebx
|
---|
1146 | # sqr a[1]*a[0]
|
---|
1147 | mull %edx
|
---|
1148 | addl %eax,%eax
|
---|
1149 | adcl %edx,%edx
|
---|
1150 | adcl $0,%ebx
|
---|
1151 | addl %eax,%ecx
|
---|
1152 | adcl %edx,%ebp
|
---|
1153 | movl 8(%esi),%eax
|
---|
1154 | adcl $0,%ebx
|
---|
1155 | movl %ecx,4(%edi)
|
---|
1156 | movl (%esi),%edx
|
---|
1157 | # saved r[1]
|
---|
1158 | # ############### Calculate word 2
|
---|
1159 | xorl %ecx,%ecx
|
---|
1160 | # sqr a[2]*a[0]
|
---|
1161 | mull %edx
|
---|
1162 | addl %eax,%eax
|
---|
1163 | adcl %edx,%edx
|
---|
1164 | adcl $0,%ecx
|
---|
1165 | addl %eax,%ebp
|
---|
1166 | adcl %edx,%ebx
|
---|
1167 | movl 4(%esi),%eax
|
---|
1168 | adcl $0,%ecx
|
---|
1169 | # sqr a[1]*a[1]
|
---|
1170 | mull %eax
|
---|
1171 | addl %eax,%ebp
|
---|
1172 | adcl %edx,%ebx
|
---|
1173 | movl (%esi),%edx
|
---|
1174 | adcl $0,%ecx
|
---|
1175 | movl %ebp,8(%edi)
|
---|
1176 | movl 12(%esi),%eax
|
---|
1177 | # saved r[2]
|
---|
1178 | # ############### Calculate word 3
|
---|
1179 | xorl %ebp,%ebp
|
---|
1180 | # sqr a[3]*a[0]
|
---|
1181 | mull %edx
|
---|
1182 | addl %eax,%eax
|
---|
1183 | adcl %edx,%edx
|
---|
1184 | adcl $0,%ebp
|
---|
1185 | addl %eax,%ebx
|
---|
1186 | adcl %edx,%ecx
|
---|
1187 | movl 8(%esi),%eax
|
---|
1188 | adcl $0,%ebp
|
---|
1189 | movl 4(%esi),%edx
|
---|
1190 | # sqr a[2]*a[1]
|
---|
1191 | mull %edx
|
---|
1192 | addl %eax,%eax
|
---|
1193 | adcl %edx,%edx
|
---|
1194 | adcl $0,%ebp
|
---|
1195 | addl %eax,%ebx
|
---|
1196 | adcl %edx,%ecx
|
---|
1197 | movl 12(%esi),%eax
|
---|
1198 | adcl $0,%ebp
|
---|
1199 | movl %ebx,12(%edi)
|
---|
1200 | movl 4(%esi),%edx
|
---|
1201 | # saved r[3]
|
---|
1202 | # ############### Calculate word 4
|
---|
1203 | xorl %ebx,%ebx
|
---|
1204 | # sqr a[3]*a[1]
|
---|
1205 | mull %edx
|
---|
1206 | addl %eax,%eax
|
---|
1207 | adcl %edx,%edx
|
---|
1208 | adcl $0,%ebx
|
---|
1209 | addl %eax,%ecx
|
---|
1210 | adcl %edx,%ebp
|
---|
1211 | movl 8(%esi),%eax
|
---|
1212 | adcl $0,%ebx
|
---|
1213 | # sqr a[2]*a[2]
|
---|
1214 | mull %eax
|
---|
1215 | addl %eax,%ecx
|
---|
1216 | adcl %edx,%ebp
|
---|
1217 | movl 8(%esi),%edx
|
---|
1218 | adcl $0,%ebx
|
---|
1219 | movl %ecx,16(%edi)
|
---|
1220 | movl 12(%esi),%eax
|
---|
1221 | # saved r[4]
|
---|
1222 | # ############### Calculate word 5
|
---|
1223 | xorl %ecx,%ecx
|
---|
1224 | # sqr a[3]*a[2]
|
---|
1225 | mull %edx
|
---|
1226 | addl %eax,%eax
|
---|
1227 | adcl %edx,%edx
|
---|
1228 | adcl $0,%ecx
|
---|
1229 | addl %eax,%ebp
|
---|
1230 | adcl %edx,%ebx
|
---|
1231 | movl 12(%esi),%eax
|
---|
1232 | adcl $0,%ecx
|
---|
1233 | movl %ebp,20(%edi)
|
---|
1234 | # saved r[5]
|
---|
1235 | # ############### Calculate word 6
|
---|
1236 | xorl %ebp,%ebp
|
---|
1237 | # sqr a[3]*a[3]
|
---|
1238 | mull %eax
|
---|
1239 | addl %eax,%ebx
|
---|
1240 | adcl %edx,%ecx
|
---|
1241 | adcl $0,%ebp
|
---|
1242 | movl %ebx,24(%edi)
|
---|
1243 | # saved r[6]
|
---|
1244 | movl %ecx,28(%edi)
|
---|
1245 | popl %ebx
|
---|
1246 | popl %ebp
|
---|
1247 | popl %edi
|
---|
1248 | popl %esi
|
---|
1249 | ret
|
---|