1 /* $NetBSD: bf_enc_686.S,v 1.1 2001/09/09 11:01:02 tls Exp $ */
4 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
7 * This package is an SSL implementation written
8 * by Eric Young (eay@cryptsoft.com).
9 * The implementation was written so as to conform with Netscapes SSL.
11 * This library is free for commercial and non-commercial use as long as
12 * the following conditions are aheared to. The following conditions
13 * apply to all code found in this distribution, be it the RC4, RSA,
14 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
15 * included with this distribution is covered by the same copyright terms
16 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
18 * Copyright remains Eric Young's, and as such any Copyright notices in
19 * the code are not to be removed.
20 * If this package is used in a product, Eric Young should be given attribution
21 * as the author of the parts of the library used.
22 * This can be in the form of a textual message at program startup or
23 * in documentation (online or textual) provided with the package.
25 * Redistribution and use in source and binary forms, with or without
26 * modification, are permitted provided that the following conditions
28 * 1. Redistributions of source code must retain the copyright
29 * notice, this list of conditions and the following disclaimer.
30 * 2. Redistributions in binary form must reproduce the above copyright
31 * notice, this list of conditions and the following disclaimer in the
32 * documentation and/or other materials provided with the distribution.
33 * 3. All advertising materials mentioning features or use of this software
34 * must display the following acknowledgement:
35 * "This product includes cryptographic software written by
36 * Eric Young (eay@cryptsoft.com)"
37 * The word 'cryptographic' can be left out if the rouines from the library
38 * being used are not cryptographic related :-).
39 * 4. If you include any Windows specific code (or a derivative thereof) from
40 * the apps directory (application code) you must include an acknowledgement:
41 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
43 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
44 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
45 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
46 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
47 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
55 * The licence and distribution terms for any publically available version or
56 * derivative of this code cannot be changed. i.e. this code cannot simply be
57 * copied and put under another distribution licence
58 * [including the GNU Public Licence.]
62 * Modified from the output of `perl bf-686.pl elf' by
63 * Jason R. Thorpe <thorpej@zembu.com> and Thor Lancelot Simon
67 #include <i386/include/asm.h>
68 #define _C_LABEL CNAME
77 /* Load the 2 words */
82 /* P pointer, s and enc flag */
95 movl 72(%edi,%eax,4),%esi
96 movl 1096(%edi,%ebx,4),%ebp
100 movl 2120(%edi,%eax,4),%eax
102 movl 3144(%edi,%ebx,4),%ebp
114 movl 72(%edi,%eax,4),%esi
115 movl 1096(%edi,%ebx,4),%ebp
119 movl 2120(%edi,%eax,4),%eax
121 movl 3144(%edi,%ebx,4),%ebp
133 movl 72(%edi,%eax,4),%esi
134 movl 1096(%edi,%ebx,4),%ebp
138 movl 2120(%edi,%eax,4),%eax
140 movl 3144(%edi,%ebx,4),%ebp
152 movl 72(%edi,%eax,4),%esi
153 movl 1096(%edi,%ebx,4),%ebp
157 movl 2120(%edi,%eax,4),%eax
159 movl 3144(%edi,%ebx,4),%ebp
171 movl 72(%edi,%eax,4),%esi
172 movl 1096(%edi,%ebx,4),%ebp
176 movl 2120(%edi,%eax,4),%eax
178 movl 3144(%edi,%ebx,4),%ebp
190 movl 72(%edi,%eax,4),%esi
191 movl 1096(%edi,%ebx,4),%ebp
195 movl 2120(%edi,%eax,4),%eax
197 movl 3144(%edi,%ebx,4),%ebp
209 movl 72(%edi,%eax,4),%esi
210 movl 1096(%edi,%ebx,4),%ebp
214 movl 2120(%edi,%eax,4),%eax
216 movl 3144(%edi,%ebx,4),%ebp
228 movl 72(%edi,%eax,4),%esi
229 movl 1096(%edi,%ebx,4),%ebp
233 movl 2120(%edi,%eax,4),%eax
235 movl 3144(%edi,%ebx,4),%ebp
247 movl 72(%edi,%eax,4),%esi
248 movl 1096(%edi,%ebx,4),%ebp
252 movl 2120(%edi,%eax,4),%eax
254 movl 3144(%edi,%ebx,4),%ebp
266 movl 72(%edi,%eax,4),%esi
267 movl 1096(%edi,%ebx,4),%ebp
271 movl 2120(%edi,%eax,4),%eax
273 movl 3144(%edi,%ebx,4),%ebp
285 movl 72(%edi,%eax,4),%esi
286 movl 1096(%edi,%ebx,4),%ebp
290 movl 2120(%edi,%eax,4),%eax
292 movl 3144(%edi,%ebx,4),%ebp
304 movl 72(%edi,%eax,4),%esi
305 movl 1096(%edi,%ebx,4),%ebp
309 movl 2120(%edi,%eax,4),%eax
311 movl 3144(%edi,%ebx,4),%ebp
323 movl 72(%edi,%eax,4),%esi
324 movl 1096(%edi,%ebx,4),%ebp
328 movl 2120(%edi,%eax,4),%eax
330 movl 3144(%edi,%ebx,4),%ebp
342 movl 72(%edi,%eax,4),%esi
343 movl 1096(%edi,%ebx,4),%ebp
347 movl 2120(%edi,%eax,4),%eax
349 movl 3144(%edi,%ebx,4),%ebp
361 movl 72(%edi,%eax,4),%esi
362 movl 1096(%edi,%ebx,4),%ebp
366 movl 2120(%edi,%eax,4),%eax
368 movl 3144(%edi,%ebx,4),%ebp
380 movl 72(%edi,%eax,4),%esi
381 movl 1096(%edi,%ebx,4),%ebp
385 movl 2120(%edi,%eax,4),%eax
387 movl 3144(%edi,%ebx,4),%ebp
401 .size _C_LABEL(BF_encrypt),.L_BF_encrypt_end-_C_LABEL(BF_encrypt)
410 /* Load the 2 words */
415 /* P pointer, s and enc flag */
428 movl 72(%edi,%eax,4),%esi
429 movl 1096(%edi,%ebx,4),%ebp
433 movl 2120(%edi,%eax,4),%eax
435 movl 3144(%edi,%ebx,4),%ebp
447 movl 72(%edi,%eax,4),%esi
448 movl 1096(%edi,%ebx,4),%ebp
452 movl 2120(%edi,%eax,4),%eax
454 movl 3144(%edi,%ebx,4),%ebp
466 movl 72(%edi,%eax,4),%esi
467 movl 1096(%edi,%ebx,4),%ebp
471 movl 2120(%edi,%eax,4),%eax
473 movl 3144(%edi,%ebx,4),%ebp
485 movl 72(%edi,%eax,4),%esi
486 movl 1096(%edi,%ebx,4),%ebp
490 movl 2120(%edi,%eax,4),%eax
492 movl 3144(%edi,%ebx,4),%ebp
504 movl 72(%edi,%eax,4),%esi
505 movl 1096(%edi,%ebx,4),%ebp
509 movl 2120(%edi,%eax,4),%eax
511 movl 3144(%edi,%ebx,4),%ebp
523 movl 72(%edi,%eax,4),%esi
524 movl 1096(%edi,%ebx,4),%ebp
528 movl 2120(%edi,%eax,4),%eax
530 movl 3144(%edi,%ebx,4),%ebp
542 movl 72(%edi,%eax,4),%esi
543 movl 1096(%edi,%ebx,4),%ebp
547 movl 2120(%edi,%eax,4),%eax
549 movl 3144(%edi,%ebx,4),%ebp
561 movl 72(%edi,%eax,4),%esi
562 movl 1096(%edi,%ebx,4),%ebp
566 movl 2120(%edi,%eax,4),%eax
568 movl 3144(%edi,%ebx,4),%ebp
580 movl 72(%edi,%eax,4),%esi
581 movl 1096(%edi,%ebx,4),%ebp
585 movl 2120(%edi,%eax,4),%eax
587 movl 3144(%edi,%ebx,4),%ebp
599 movl 72(%edi,%eax,4),%esi
600 movl 1096(%edi,%ebx,4),%ebp
604 movl 2120(%edi,%eax,4),%eax
606 movl 3144(%edi,%ebx,4),%ebp
618 movl 72(%edi,%eax,4),%esi
619 movl 1096(%edi,%ebx,4),%ebp
623 movl 2120(%edi,%eax,4),%eax
625 movl 3144(%edi,%ebx,4),%ebp
637 movl 72(%edi,%eax,4),%esi
638 movl 1096(%edi,%ebx,4),%ebp
642 movl 2120(%edi,%eax,4),%eax
644 movl 3144(%edi,%ebx,4),%ebp
656 movl 72(%edi,%eax,4),%esi
657 movl 1096(%edi,%ebx,4),%ebp
661 movl 2120(%edi,%eax,4),%eax
663 movl 3144(%edi,%ebx,4),%ebp
675 movl 72(%edi,%eax,4),%esi
676 movl 1096(%edi,%ebx,4),%ebp
680 movl 2120(%edi,%eax,4),%eax
682 movl 3144(%edi,%ebx,4),%ebp
694 movl 72(%edi,%eax,4),%esi
695 movl 1096(%edi,%ebx,4),%ebp
699 movl 2120(%edi,%eax,4),%eax
701 movl 3144(%edi,%ebx,4),%ebp
713 movl 72(%edi,%eax,4),%esi
714 movl 1096(%edi,%ebx,4),%ebp
718 movl 2120(%edi,%eax,4),%eax
720 movl 3144(%edi,%ebx,4),%ebp
734 .size _C_LABEL(BF_decrypt),.L_BF_decrypt_end-_C_LABEL(BF_decrypt)