]> git.ipfire.org Git - thirdparty/openssl.git/blob - crypto/bf/asm/bx86-cpp.s
Import of old SSLeay release: SSLeay 0.8.1b
[thirdparty/openssl.git] / crypto / bf / asm / bx86-cpp.s
1 /* Don't even think of reading this code */
2 /* It was automatically generated by bf586.pl */
3 /* Which is a perl program used to generate the x86 assember for */
4 /* any of elf, a.out, Win32, or Solaris */
5 /* It can be found in SSLeay 0.7.0+ */
6 /* eric <eay@cryptsoft.com> */
7
8 .file "bfx86xxxx.s"
9 .version "01.01"
10 gcc2_compiled.:
11 .text
12 .align ALIGN
13 .globl BF_encrypt
14 TYPE(BF_encrypt,@function)
15 BF_encrypt:
16 pushl %ebp
17 pushl %ebx
18 pushl %esi
19 pushl %edi
20
21
22 /* Load the 2 words */
23 movl 20(%esp), %eax
24 movl (%eax), %ecx
25 movl 4(%eax), %edx
26
27 /* P pointer, s and enc flag */
28 movl 24(%esp), %edi
29 xorl %eax, %eax
30 xorl %ebx, %ebx
31 movl 28(%esp), %ebp
32 cmpl $0, %ebp
33 je .L000start_decrypt
34 xorl (%edi), %ecx
35
36 /* Round 0 */
37 rorl $16, %ecx
38 movl 4(%edi), %esi
39 movb %ch, %al
40 movb %cl, %bl
41 rorl $16, %ecx
42 xorl %esi, %edx
43 movl 72(%edi,%eax,4),%esi
44 movl 1096(%edi,%ebx,4),%ebp
45 movb %ch, %al
46 movb %cl, %bl
47 addl %ebp, %esi
48 movl 2120(%edi,%eax,4),%eax
49 xorl %eax, %esi
50 movl 3144(%edi,%ebx,4),%ebp
51 addl %ebp, %esi
52 xorl %eax, %eax
53 xorl %esi, %edx
54
55 /* Round 1 */
56 rorl $16, %edx
57 movl 8(%edi), %esi
58 movb %dh, %al
59 movb %dl, %bl
60 rorl $16, %edx
61 xorl %esi, %ecx
62 movl 72(%edi,%eax,4),%esi
63 movl 1096(%edi,%ebx,4),%ebp
64 movb %dh, %al
65 movb %dl, %bl
66 addl %ebp, %esi
67 movl 2120(%edi,%eax,4),%eax
68 xorl %eax, %esi
69 movl 3144(%edi,%ebx,4),%ebp
70 addl %ebp, %esi
71 xorl %eax, %eax
72 xorl %esi, %ecx
73
74 /* Round 2 */
75 rorl $16, %ecx
76 movl 12(%edi), %esi
77 movb %ch, %al
78 movb %cl, %bl
79 rorl $16, %ecx
80 xorl %esi, %edx
81 movl 72(%edi,%eax,4),%esi
82 movl 1096(%edi,%ebx,4),%ebp
83 movb %ch, %al
84 movb %cl, %bl
85 addl %ebp, %esi
86 movl 2120(%edi,%eax,4),%eax
87 xorl %eax, %esi
88 movl 3144(%edi,%ebx,4),%ebp
89 addl %ebp, %esi
90 xorl %eax, %eax
91 xorl %esi, %edx
92
93 /* Round 3 */
94 rorl $16, %edx
95 movl 16(%edi), %esi
96 movb %dh, %al
97 movb %dl, %bl
98 rorl $16, %edx
99 xorl %esi, %ecx
100 movl 72(%edi,%eax,4),%esi
101 movl 1096(%edi,%ebx,4),%ebp
102 movb %dh, %al
103 movb %dl, %bl
104 addl %ebp, %esi
105 movl 2120(%edi,%eax,4),%eax
106 xorl %eax, %esi
107 movl 3144(%edi,%ebx,4),%ebp
108 addl %ebp, %esi
109 xorl %eax, %eax
110 xorl %esi, %ecx
111
112 /* Round 4 */
113 rorl $16, %ecx
114 movl 20(%edi), %esi
115 movb %ch, %al
116 movb %cl, %bl
117 rorl $16, %ecx
118 xorl %esi, %edx
119 movl 72(%edi,%eax,4),%esi
120 movl 1096(%edi,%ebx,4),%ebp
121 movb %ch, %al
122 movb %cl, %bl
123 addl %ebp, %esi
124 movl 2120(%edi,%eax,4),%eax
125 xorl %eax, %esi
126 movl 3144(%edi,%ebx,4),%ebp
127 addl %ebp, %esi
128 xorl %eax, %eax
129 xorl %esi, %edx
130
131 /* Round 5 */
132 rorl $16, %edx
133 movl 24(%edi), %esi
134 movb %dh, %al
135 movb %dl, %bl
136 rorl $16, %edx
137 xorl %esi, %ecx
138 movl 72(%edi,%eax,4),%esi
139 movl 1096(%edi,%ebx,4),%ebp
140 movb %dh, %al
141 movb %dl, %bl
142 addl %ebp, %esi
143 movl 2120(%edi,%eax,4),%eax
144 xorl %eax, %esi
145 movl 3144(%edi,%ebx,4),%ebp
146 addl %ebp, %esi
147 xorl %eax, %eax
148 xorl %esi, %ecx
149
150 /* Round 6 */
151 rorl $16, %ecx
152 movl 28(%edi), %esi
153 movb %ch, %al
154 movb %cl, %bl
155 rorl $16, %ecx
156 xorl %esi, %edx
157 movl 72(%edi,%eax,4),%esi
158 movl 1096(%edi,%ebx,4),%ebp
159 movb %ch, %al
160 movb %cl, %bl
161 addl %ebp, %esi
162 movl 2120(%edi,%eax,4),%eax
163 xorl %eax, %esi
164 movl 3144(%edi,%ebx,4),%ebp
165 addl %ebp, %esi
166 xorl %eax, %eax
167 xorl %esi, %edx
168
169 /* Round 7 */
170 rorl $16, %edx
171 movl 32(%edi), %esi
172 movb %dh, %al
173 movb %dl, %bl
174 rorl $16, %edx
175 xorl %esi, %ecx
176 movl 72(%edi,%eax,4),%esi
177 movl 1096(%edi,%ebx,4),%ebp
178 movb %dh, %al
179 movb %dl, %bl
180 addl %ebp, %esi
181 movl 2120(%edi,%eax,4),%eax
182 xorl %eax, %esi
183 movl 3144(%edi,%ebx,4),%ebp
184 addl %ebp, %esi
185 xorl %eax, %eax
186 xorl %esi, %ecx
187
188 /* Round 8 */
189 rorl $16, %ecx
190 movl 36(%edi), %esi
191 movb %ch, %al
192 movb %cl, %bl
193 rorl $16, %ecx
194 xorl %esi, %edx
195 movl 72(%edi,%eax,4),%esi
196 movl 1096(%edi,%ebx,4),%ebp
197 movb %ch, %al
198 movb %cl, %bl
199 addl %ebp, %esi
200 movl 2120(%edi,%eax,4),%eax
201 xorl %eax, %esi
202 movl 3144(%edi,%ebx,4),%ebp
203 addl %ebp, %esi
204 xorl %eax, %eax
205 xorl %esi, %edx
206
207 /* Round 9 */
208 rorl $16, %edx
209 movl 40(%edi), %esi
210 movb %dh, %al
211 movb %dl, %bl
212 rorl $16, %edx
213 xorl %esi, %ecx
214 movl 72(%edi,%eax,4),%esi
215 movl 1096(%edi,%ebx,4),%ebp
216 movb %dh, %al
217 movb %dl, %bl
218 addl %ebp, %esi
219 movl 2120(%edi,%eax,4),%eax
220 xorl %eax, %esi
221 movl 3144(%edi,%ebx,4),%ebp
222 addl %ebp, %esi
223 xorl %eax, %eax
224 xorl %esi, %ecx
225
226 /* Round 10 */
227 rorl $16, %ecx
228 movl 44(%edi), %esi
229 movb %ch, %al
230 movb %cl, %bl
231 rorl $16, %ecx
232 xorl %esi, %edx
233 movl 72(%edi,%eax,4),%esi
234 movl 1096(%edi,%ebx,4),%ebp
235 movb %ch, %al
236 movb %cl, %bl
237 addl %ebp, %esi
238 movl 2120(%edi,%eax,4),%eax
239 xorl %eax, %esi
240 movl 3144(%edi,%ebx,4),%ebp
241 addl %ebp, %esi
242 xorl %eax, %eax
243 xorl %esi, %edx
244
245 /* Round 11 */
246 rorl $16, %edx
247 movl 48(%edi), %esi
248 movb %dh, %al
249 movb %dl, %bl
250 rorl $16, %edx
251 xorl %esi, %ecx
252 movl 72(%edi,%eax,4),%esi
253 movl 1096(%edi,%ebx,4),%ebp
254 movb %dh, %al
255 movb %dl, %bl
256 addl %ebp, %esi
257 movl 2120(%edi,%eax,4),%eax
258 xorl %eax, %esi
259 movl 3144(%edi,%ebx,4),%ebp
260 addl %ebp, %esi
261 xorl %eax, %eax
262 xorl %esi, %ecx
263
264 /* Round 12 */
265 rorl $16, %ecx
266 movl 52(%edi), %esi
267 movb %ch, %al
268 movb %cl, %bl
269 rorl $16, %ecx
270 xorl %esi, %edx
271 movl 72(%edi,%eax,4),%esi
272 movl 1096(%edi,%ebx,4),%ebp
273 movb %ch, %al
274 movb %cl, %bl
275 addl %ebp, %esi
276 movl 2120(%edi,%eax,4),%eax
277 xorl %eax, %esi
278 movl 3144(%edi,%ebx,4),%ebp
279 addl %ebp, %esi
280 xorl %eax, %eax
281 xorl %esi, %edx
282
283 /* Round 13 */
284 rorl $16, %edx
285 movl 56(%edi), %esi
286 movb %dh, %al
287 movb %dl, %bl
288 rorl $16, %edx
289 xorl %esi, %ecx
290 movl 72(%edi,%eax,4),%esi
291 movl 1096(%edi,%ebx,4),%ebp
292 movb %dh, %al
293 movb %dl, %bl
294 addl %ebp, %esi
295 movl 2120(%edi,%eax,4),%eax
296 xorl %eax, %esi
297 movl 3144(%edi,%ebx,4),%ebp
298 addl %ebp, %esi
299 xorl %eax, %eax
300 xorl %esi, %ecx
301
302 /* Round 14 */
303 rorl $16, %ecx
304 movl 60(%edi), %esi
305 movb %ch, %al
306 movb %cl, %bl
307 rorl $16, %ecx
308 xorl %esi, %edx
309 movl 72(%edi,%eax,4),%esi
310 movl 1096(%edi,%ebx,4),%ebp
311 movb %ch, %al
312 movb %cl, %bl
313 addl %ebp, %esi
314 movl 2120(%edi,%eax,4),%eax
315 xorl %eax, %esi
316 movl 3144(%edi,%ebx,4),%ebp
317 addl %ebp, %esi
318 xorl %eax, %eax
319 xorl %esi, %edx
320
321 /* Round 15 */
322 rorl $16, %edx
323 movl 64(%edi), %esi
324 movb %dh, %al
325 movb %dl, %bl
326 rorl $16, %edx
327 xorl %esi, %ecx
328 movl 72(%edi,%eax,4),%esi
329 movl 1096(%edi,%ebx,4),%ebp
330 movb %dh, %al
331 movb %dl, %bl
332 addl %ebp, %esi
333 movl 2120(%edi,%eax,4),%eax
334 xorl %eax, %esi
335 movl 3144(%edi,%ebx,4),%ebp
336 addl %ebp, %esi
337 xorl %eax, %eax
338 xorl %esi, %ecx
339 xorl 68(%edi), %edx
340 movl 20(%esp), %eax
341 movl %edx, (%eax)
342 movl %ecx, 4(%eax)
343 popl %edi
344 popl %esi
345 popl %ebx
346 popl %ebp
347 ret
348 .align ALIGN
349 .L000start_decrypt:
350 xorl 68(%edi), %ecx
351
352 /* Round 16 */
353 rorl $16, %ecx
354 movl 64(%edi), %esi
355 movb %ch, %al
356 movb %cl, %bl
357 rorl $16, %ecx
358 xorl %esi, %edx
359 movl 72(%edi,%eax,4),%esi
360 movl 1096(%edi,%ebx,4),%ebp
361 movb %ch, %al
362 movb %cl, %bl
363 addl %ebp, %esi
364 movl 2120(%edi,%eax,4),%eax
365 xorl %eax, %esi
366 movl 3144(%edi,%ebx,4),%ebp
367 addl %ebp, %esi
368 xorl %eax, %eax
369 xorl %esi, %edx
370
371 /* Round 15 */
372 rorl $16, %edx
373 movl 60(%edi), %esi
374 movb %dh, %al
375 movb %dl, %bl
376 rorl $16, %edx
377 xorl %esi, %ecx
378 movl 72(%edi,%eax,4),%esi
379 movl 1096(%edi,%ebx,4),%ebp
380 movb %dh, %al
381 movb %dl, %bl
382 addl %ebp, %esi
383 movl 2120(%edi,%eax,4),%eax
384 xorl %eax, %esi
385 movl 3144(%edi,%ebx,4),%ebp
386 addl %ebp, %esi
387 xorl %eax, %eax
388 xorl %esi, %ecx
389
390 /* Round 14 */
391 rorl $16, %ecx
392 movl 56(%edi), %esi
393 movb %ch, %al
394 movb %cl, %bl
395 rorl $16, %ecx
396 xorl %esi, %edx
397 movl 72(%edi,%eax,4),%esi
398 movl 1096(%edi,%ebx,4),%ebp
399 movb %ch, %al
400 movb %cl, %bl
401 addl %ebp, %esi
402 movl 2120(%edi,%eax,4),%eax
403 xorl %eax, %esi
404 movl 3144(%edi,%ebx,4),%ebp
405 addl %ebp, %esi
406 xorl %eax, %eax
407 xorl %esi, %edx
408
409 /* Round 13 */
410 rorl $16, %edx
411 movl 52(%edi), %esi
412 movb %dh, %al
413 movb %dl, %bl
414 rorl $16, %edx
415 xorl %esi, %ecx
416 movl 72(%edi,%eax,4),%esi
417 movl 1096(%edi,%ebx,4),%ebp
418 movb %dh, %al
419 movb %dl, %bl
420 addl %ebp, %esi
421 movl 2120(%edi,%eax,4),%eax
422 xorl %eax, %esi
423 movl 3144(%edi,%ebx,4),%ebp
424 addl %ebp, %esi
425 xorl %eax, %eax
426 xorl %esi, %ecx
427
428 /* Round 12 */
429 rorl $16, %ecx
430 movl 48(%edi), %esi
431 movb %ch, %al
432 movb %cl, %bl
433 rorl $16, %ecx
434 xorl %esi, %edx
435 movl 72(%edi,%eax,4),%esi
436 movl 1096(%edi,%ebx,4),%ebp
437 movb %ch, %al
438 movb %cl, %bl
439 addl %ebp, %esi
440 movl 2120(%edi,%eax,4),%eax
441 xorl %eax, %esi
442 movl 3144(%edi,%ebx,4),%ebp
443 addl %ebp, %esi
444 xorl %eax, %eax
445 xorl %esi, %edx
446
447 /* Round 11 */
448 rorl $16, %edx
449 movl 44(%edi), %esi
450 movb %dh, %al
451 movb %dl, %bl
452 rorl $16, %edx
453 xorl %esi, %ecx
454 movl 72(%edi,%eax,4),%esi
455 movl 1096(%edi,%ebx,4),%ebp
456 movb %dh, %al
457 movb %dl, %bl
458 addl %ebp, %esi
459 movl 2120(%edi,%eax,4),%eax
460 xorl %eax, %esi
461 movl 3144(%edi,%ebx,4),%ebp
462 addl %ebp, %esi
463 xorl %eax, %eax
464 xorl %esi, %ecx
465
466 /* Round 10 */
467 rorl $16, %ecx
468 movl 40(%edi), %esi
469 movb %ch, %al
470 movb %cl, %bl
471 rorl $16, %ecx
472 xorl %esi, %edx
473 movl 72(%edi,%eax,4),%esi
474 movl 1096(%edi,%ebx,4),%ebp
475 movb %ch, %al
476 movb %cl, %bl
477 addl %ebp, %esi
478 movl 2120(%edi,%eax,4),%eax
479 xorl %eax, %esi
480 movl 3144(%edi,%ebx,4),%ebp
481 addl %ebp, %esi
482 xorl %eax, %eax
483 xorl %esi, %edx
484
485 /* Round 9 */
486 rorl $16, %edx
487 movl 36(%edi), %esi
488 movb %dh, %al
489 movb %dl, %bl
490 rorl $16, %edx
491 xorl %esi, %ecx
492 movl 72(%edi,%eax,4),%esi
493 movl 1096(%edi,%ebx,4),%ebp
494 movb %dh, %al
495 movb %dl, %bl
496 addl %ebp, %esi
497 movl 2120(%edi,%eax,4),%eax
498 xorl %eax, %esi
499 movl 3144(%edi,%ebx,4),%ebp
500 addl %ebp, %esi
501 xorl %eax, %eax
502 xorl %esi, %ecx
503
504 /* Round 8 */
505 rorl $16, %ecx
506 movl 32(%edi), %esi
507 movb %ch, %al
508 movb %cl, %bl
509 rorl $16, %ecx
510 xorl %esi, %edx
511 movl 72(%edi,%eax,4),%esi
512 movl 1096(%edi,%ebx,4),%ebp
513 movb %ch, %al
514 movb %cl, %bl
515 addl %ebp, %esi
516 movl 2120(%edi,%eax,4),%eax
517 xorl %eax, %esi
518 movl 3144(%edi,%ebx,4),%ebp
519 addl %ebp, %esi
520 xorl %eax, %eax
521 xorl %esi, %edx
522
523 /* Round 7 */
524 rorl $16, %edx
525 movl 28(%edi), %esi
526 movb %dh, %al
527 movb %dl, %bl
528 rorl $16, %edx
529 xorl %esi, %ecx
530 movl 72(%edi,%eax,4),%esi
531 movl 1096(%edi,%ebx,4),%ebp
532 movb %dh, %al
533 movb %dl, %bl
534 addl %ebp, %esi
535 movl 2120(%edi,%eax,4),%eax
536 xorl %eax, %esi
537 movl 3144(%edi,%ebx,4),%ebp
538 addl %ebp, %esi
539 xorl %eax, %eax
540 xorl %esi, %ecx
541
542 /* Round 6 */
543 rorl $16, %ecx
544 movl 24(%edi), %esi
545 movb %ch, %al
546 movb %cl, %bl
547 rorl $16, %ecx
548 xorl %esi, %edx
549 movl 72(%edi,%eax,4),%esi
550 movl 1096(%edi,%ebx,4),%ebp
551 movb %ch, %al
552 movb %cl, %bl
553 addl %ebp, %esi
554 movl 2120(%edi,%eax,4),%eax
555 xorl %eax, %esi
556 movl 3144(%edi,%ebx,4),%ebp
557 addl %ebp, %esi
558 xorl %eax, %eax
559 xorl %esi, %edx
560
561 /* Round 5 */
562 rorl $16, %edx
563 movl 20(%edi), %esi
564 movb %dh, %al
565 movb %dl, %bl
566 rorl $16, %edx
567 xorl %esi, %ecx
568 movl 72(%edi,%eax,4),%esi
569 movl 1096(%edi,%ebx,4),%ebp
570 movb %dh, %al
571 movb %dl, %bl
572 addl %ebp, %esi
573 movl 2120(%edi,%eax,4),%eax
574 xorl %eax, %esi
575 movl 3144(%edi,%ebx,4),%ebp
576 addl %ebp, %esi
577 xorl %eax, %eax
578 xorl %esi, %ecx
579
580 /* Round 4 */
581 rorl $16, %ecx
582 movl 16(%edi), %esi
583 movb %ch, %al
584 movb %cl, %bl
585 rorl $16, %ecx
586 xorl %esi, %edx
587 movl 72(%edi,%eax,4),%esi
588 movl 1096(%edi,%ebx,4),%ebp
589 movb %ch, %al
590 movb %cl, %bl
591 addl %ebp, %esi
592 movl 2120(%edi,%eax,4),%eax
593 xorl %eax, %esi
594 movl 3144(%edi,%ebx,4),%ebp
595 addl %ebp, %esi
596 xorl %eax, %eax
597 xorl %esi, %edx
598
599 /* Round 3 */
600 rorl $16, %edx
601 movl 12(%edi), %esi
602 movb %dh, %al
603 movb %dl, %bl
604 rorl $16, %edx
605 xorl %esi, %ecx
606 movl 72(%edi,%eax,4),%esi
607 movl 1096(%edi,%ebx,4),%ebp
608 movb %dh, %al
609 movb %dl, %bl
610 addl %ebp, %esi
611 movl 2120(%edi,%eax,4),%eax
612 xorl %eax, %esi
613 movl 3144(%edi,%ebx,4),%ebp
614 addl %ebp, %esi
615 xorl %eax, %eax
616 xorl %esi, %ecx
617
618 /* Round 2 */
619 rorl $16, %ecx
620 movl 8(%edi), %esi
621 movb %ch, %al
622 movb %cl, %bl
623 rorl $16, %ecx
624 xorl %esi, %edx
625 movl 72(%edi,%eax,4),%esi
626 movl 1096(%edi,%ebx,4),%ebp
627 movb %ch, %al
628 movb %cl, %bl
629 addl %ebp, %esi
630 movl 2120(%edi,%eax,4),%eax
631 xorl %eax, %esi
632 movl 3144(%edi,%ebx,4),%ebp
633 addl %ebp, %esi
634 xorl %eax, %eax
635 xorl %esi, %edx
636
637 /* Round 1 */
638 rorl $16, %edx
639 movl 4(%edi), %esi
640 movb %dh, %al
641 movb %dl, %bl
642 rorl $16, %edx
643 xorl %esi, %ecx
644 movl 72(%edi,%eax,4),%esi
645 movl 1096(%edi,%ebx,4),%ebp
646 movb %dh, %al
647 movb %dl, %bl
648 addl %ebp, %esi
649 movl 2120(%edi,%eax,4),%eax
650 xorl %eax, %esi
651 movl 3144(%edi,%ebx,4),%ebp
652 addl %ebp, %esi
653 xorl %eax, %eax
654 xorl %esi, %ecx
655 xorl (%edi), %edx
656 movl 20(%esp), %eax
657 movl %edx, (%eax)
658 movl %ecx, 4(%eax)
659 popl %edi
660 popl %esi
661 popl %ebx
662 popl %ebp
663 ret
664 .BF_encrypt_end:
665 SIZE(BF_encrypt,.BF_encrypt_end-BF_encrypt)
666 .ident "desasm.pl"