diff options
author | David Walter Seikel | 2011-06-27 15:59:06 +1000 |
---|---|---|
committer | David Walter Seikel | 2011-06-27 15:59:06 +1000 |
commit | 92bd9b2503e7dd927f416cb9b17f169ea925fa56 (patch) | |
tree | f0f3776cfc0c6e6224db66f5678387c580095f16 /linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-sub1.S | |
parent | Make use of the new packaging stuff from upstream. (diff) | |
download | meta-impy-92bd9b2503e7dd927f416cb9b17f169ea925fa56.zip meta-impy-92bd9b2503e7dd927f416cb9b17f169ea925fa56.tar.gz meta-impy-92bd9b2503e7dd927f416cb9b17f169ea925fa56.tar.bz2 meta-impy-92bd9b2503e7dd927f416cb9b17f169ea925fa56.tar.xz |
Clean up line endings, execute bits, and other bits of errant nonsense from Windows.
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-sub1.S')
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-sub1.S | 234 |
1 files changed, 117 insertions, 117 deletions
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-sub1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-sub1.S index 941687a..f447f7a 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-sub1.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-sub1.S | |||
@@ -1,117 +1,117 @@ | |||
1 | /* i80386 sub_n -- Sub two limb vectors of the same length > 0 and store | 1 | /* i80386 sub_n -- Sub two limb vectors of the same length > 0 and store |
2 | * sum in a third limb vector. | 2 | * sum in a third limb vector. |
3 | * | 3 | * |
4 | * Copyright (C) 1992, 1994, 1995, 1998, | 4 | * Copyright (C) 1992, 1994, 1995, 1998, |
5 | * 2001, 2002 Free Software Foundation, Inc. | 5 | * 2001, 2002 Free Software Foundation, Inc. |
6 | * | 6 | * |
7 | * This file is part of Libgcrypt. | 7 | * This file is part of Libgcrypt. |
8 | * | 8 | * |
9 | * Libgcrypt is free software; you can redistribute it and/or modify | 9 | * Libgcrypt is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU Lesser General Public License as | 10 | * it under the terms of the GNU Lesser General Public License as |
11 | * published by the Free Software Foundation; either version 2.1 of | 11 | * published by the Free Software Foundation; either version 2.1 of |
12 | * the License, or (at your option) any later version. | 12 | * the License, or (at your option) any later version. |
13 | * | 13 | * |
14 | * Libgcrypt is distributed in the hope that it will be useful, | 14 | * Libgcrypt is distributed in the hope that it will be useful, |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | * GNU Lesser General Public License for more details. | 17 | * GNU Lesser General Public License for more details. |
18 | * | 18 | * |
19 | * You should have received a copy of the GNU Lesser General Public | 19 | * You should have received a copy of the GNU Lesser General Public |
20 | * License along with this program; if not, write to the Free Software | 20 | * License along with this program; if not, write to the Free Software |
21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
22 | * | 22 | * |
23 | * Note: This code is heavily based on the GNU MP Library. | 23 | * Note: This code is heavily based on the GNU MP Library. |
24 | * Actually it's the same code with only minor changes in the | 24 | * Actually it's the same code with only minor changes in the |
25 | * way the data is stored; this is to support the abstraction | 25 | * way the data is stored; this is to support the abstraction |
26 | * of an optional secure memory allocation which may be used | 26 | * of an optional secure memory allocation which may be used |
27 | * to avoid revealing of sensitive data due to paging etc. | 27 | * to avoid revealing of sensitive data due to paging etc. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | 30 | ||
31 | #include "sysdep.h" | 31 | #include "sysdep.h" |
32 | #include "asm-syntax.h" | 32 | #include "asm-syntax.h" |
33 | 33 | ||
34 | 34 | ||
35 | /******************* | 35 | /******************* |
36 | * mpi_limb_t | 36 | * mpi_limb_t |
37 | * _gcry_mpih_sub_n( mpi_ptr_t res_ptr, (sp + 4) | 37 | * _gcry_mpih_sub_n( mpi_ptr_t res_ptr, (sp + 4) |
38 | * mpi_ptr_t s1_ptr, (sp + 8) | 38 | * mpi_ptr_t s1_ptr, (sp + 8) |
39 | * mpi_ptr_t s2_ptr, (sp + 12) | 39 | * mpi_ptr_t s2_ptr, (sp + 12) |
40 | * mpi_size_t size) (sp + 16) | 40 | * mpi_size_t size) (sp + 16) |
41 | */ | 41 | */ |
42 | 42 | ||
43 | 43 | ||
44 | .text | 44 | .text |
45 | ALIGN (3) | 45 | ALIGN (3) |
46 | .globl C_SYMBOL_NAME(_gcry_mpih_sub_n) | 46 | .globl C_SYMBOL_NAME(_gcry_mpih_sub_n) |
47 | C_SYMBOL_NAME(_gcry_mpih_sub_n:) | 47 | C_SYMBOL_NAME(_gcry_mpih_sub_n:) |
48 | pushl %edi | 48 | pushl %edi |
49 | pushl %esi | 49 | pushl %esi |
50 | 50 | ||
51 | movl 12(%esp),%edi /* res_ptr */ | 51 | movl 12(%esp),%edi /* res_ptr */ |
52 | movl 16(%esp),%esi /* s1_ptr */ | 52 | movl 16(%esp),%esi /* s1_ptr */ |
53 | movl 20(%esp),%edx /* s2_ptr */ | 53 | movl 20(%esp),%edx /* s2_ptr */ |
54 | movl 24(%esp),%ecx /* size */ | 54 | movl 24(%esp),%ecx /* size */ |
55 | 55 | ||
56 | movl %ecx,%eax | 56 | movl %ecx,%eax |
57 | shrl $3,%ecx /* compute count for unrolled loop */ | 57 | shrl $3,%ecx /* compute count for unrolled loop */ |
58 | negl %eax | 58 | negl %eax |
59 | andl $7,%eax /* get index where to start loop */ | 59 | andl $7,%eax /* get index where to start loop */ |
60 | jz Loop /* necessary special case for 0 */ | 60 | jz Loop /* necessary special case for 0 */ |
61 | incl %ecx /* adjust loop count */ | 61 | incl %ecx /* adjust loop count */ |
62 | shll $2,%eax /* adjustment for pointers... */ | 62 | shll $2,%eax /* adjustment for pointers... */ |
63 | subl %eax,%edi /* ... since they are offset ... */ | 63 | subl %eax,%edi /* ... since they are offset ... */ |
64 | subl %eax,%esi /* ... by a constant when we ... */ | 64 | subl %eax,%esi /* ... by a constant when we ... */ |
65 | subl %eax,%edx /* ... enter the loop */ | 65 | subl %eax,%edx /* ... enter the loop */ |
66 | shrl $2,%eax /* restore previous value */ | 66 | shrl $2,%eax /* restore previous value */ |
67 | #ifdef PIC | 67 | #ifdef PIC |
68 | /* Calculate start address in loop for PIC. Due to limitations in some | 68 | /* Calculate start address in loop for PIC. Due to limitations in some |
69 | assemblers, Loop-L0-3 cannot be put into the leal */ | 69 | assemblers, Loop-L0-3 cannot be put into the leal */ |
70 | call L0 | 70 | call L0 |
71 | L0: leal (%eax,%eax,8),%eax | 71 | L0: leal (%eax,%eax,8),%eax |
72 | addl (%esp),%eax | 72 | addl (%esp),%eax |
73 | addl $(Loop-L0-3),%eax | 73 | addl $(Loop-L0-3),%eax |
74 | addl $4,%esp | 74 | addl $4,%esp |
75 | #else | 75 | #else |
76 | /* Calculate start address in loop for non-PIC. */ | 76 | /* Calculate start address in loop for non-PIC. */ |
77 | leal (Loop - 3)(%eax,%eax,8),%eax | 77 | leal (Loop - 3)(%eax,%eax,8),%eax |
78 | #endif | 78 | #endif |
79 | jmp *%eax /* jump into loop */ | 79 | jmp *%eax /* jump into loop */ |
80 | ALIGN (3) | 80 | ALIGN (3) |
81 | Loop: movl (%esi),%eax | 81 | Loop: movl (%esi),%eax |
82 | sbbl (%edx),%eax | 82 | sbbl (%edx),%eax |
83 | movl %eax,(%edi) | 83 | movl %eax,(%edi) |
84 | movl 4(%esi),%eax | 84 | movl 4(%esi),%eax |
85 | sbbl 4(%edx),%eax | 85 | sbbl 4(%edx),%eax |
86 | movl %eax,4(%edi) | 86 | movl %eax,4(%edi) |
87 | movl 8(%esi),%eax | 87 | movl 8(%esi),%eax |
88 | sbbl 8(%edx),%eax | 88 | sbbl 8(%edx),%eax |
89 | movl %eax,8(%edi) | 89 | movl %eax,8(%edi) |
90 | movl 12(%esi),%eax | 90 | movl 12(%esi),%eax |
91 | sbbl 12(%edx),%eax | 91 | sbbl 12(%edx),%eax |
92 | movl %eax,12(%edi) | 92 | movl %eax,12(%edi) |
93 | movl 16(%esi),%eax | 93 | movl 16(%esi),%eax |
94 | sbbl 16(%edx),%eax | 94 | sbbl 16(%edx),%eax |
95 | movl %eax,16(%edi) | 95 | movl %eax,16(%edi) |
96 | movl 20(%esi),%eax | 96 | movl 20(%esi),%eax |
97 | sbbl 20(%edx),%eax | 97 | sbbl 20(%edx),%eax |
98 | movl %eax,20(%edi) | 98 | movl %eax,20(%edi) |
99 | movl 24(%esi),%eax | 99 | movl 24(%esi),%eax |
100 | sbbl 24(%edx),%eax | 100 | sbbl 24(%edx),%eax |
101 | movl %eax,24(%edi) | 101 | movl %eax,24(%edi) |
102 | movl 28(%esi),%eax | 102 | movl 28(%esi),%eax |
103 | sbbl 28(%edx),%eax | 103 | sbbl 28(%edx),%eax |
104 | movl %eax,28(%edi) | 104 | movl %eax,28(%edi) |
105 | leal 32(%edi),%edi | 105 | leal 32(%edi),%edi |
106 | leal 32(%esi),%esi | 106 | leal 32(%esi),%esi |
107 | leal 32(%edx),%edx | 107 | leal 32(%edx),%edx |
108 | decl %ecx | 108 | decl %ecx |
109 | jnz Loop | 109 | jnz Loop |
110 | 110 | ||
111 | sbbl %eax,%eax | 111 | sbbl %eax,%eax |
112 | negl %eax | 112 | negl %eax |
113 | 113 | ||
114 | popl %esi | 114 | popl %esi |
115 | popl %edi | 115 | popl %edi |
116 | ret | 116 | ret |
117 | 117 | ||