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