aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586
diff options
context:
space:
mode:
authorDavid Walter Seikel2011-06-27 15:59:06 +1000
committerDavid Walter Seikel2011-06-27 15:59:06 +1000
commit92bd9b2503e7dd927f416cb9b17f169ea925fa56 (patch)
treef0f3776cfc0c6e6224db66f5678387c580095f16 /linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586
parentMake use of the new packaging stuff from upstream. (diff)
downloadmeta-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/i586')
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/Manifest54
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/README52
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/distfiles20
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-add1.S270
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-lshift.S458
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul1.S178
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul2.S186
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul3.S186
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-rshift.S456
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-sub1.S284
10 files changed, 1072 insertions, 1072 deletions
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/Manifest b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/Manifest
index a3d6a4c..6d1d7f8 100755..100644
--- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/Manifest
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/Manifest
@@ -1,27 +1,27 @@
1# Manifest - checksums 1# Manifest - checksums
2# Copyright 2003 Free Software Foundation, Inc. 2# Copyright 2003 Free Software Foundation, Inc.
3# 3#
4# This file is part of Libgcrypt. 4# This file is part of Libgcrypt.
5# 5#
6# Libgcrypt is free software; you can redistribute it and/or modify 6# Libgcrypt is free software; you can redistribute it and/or modify
7# it under the terms of the GNU Lesser general Public License as 7# it under the terms of the GNU Lesser general Public License as
8# published by the Free Software Foundation; either version 2.1 of 8# published by the Free Software Foundation; either version 2.1 of
9# the License, or (at your option) any later version. 9# the License, or (at your option) any later version.
10# 10#
11# Libgcrypt is distributed in the hope that it will be useful, 11# Libgcrypt is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Lesser General Public License for more details. 14# GNU Lesser General Public License for more details.
15# 15#
16# You should have received a copy of the GNU Lesser General Public 16# You should have received a copy of the GNU Lesser General Public
17# License along with this program; if not, write to the Free Software 17# License along with this program; if not, write to the Free Software
18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19 19
20mpih-add1.S 20mpih-add1.S
21mpih-mul1.S 21mpih-mul1.S
22mpih-mul2.S 22mpih-mul2.S
23mpih-mul3.S 23mpih-mul3.S
24mpih-lshift.S 24mpih-lshift.S
25mpih-rshift.S 25mpih-rshift.S
26mpih-sub1.S 26mpih-sub1.S
27$names$ iQCVAwUAP+LmQDEAnp832S/7AQKCmgQAhG+E7X0KB4qdVf3sMb6Qr+Iv5Jlehzoub/5vxTRgePKzRuOHidCnTzSSoyzA++UcHrOjHQQDMsXnO6PqpS1d/TKkxjnGN7rE8mvMYlFAT8RsawTozSfh14mCzI0HTDbaKL9Z8pcMJtadB3XqAuqWJNO8kyECJFwurt3DRWXSWS8==Rug5 27$names$ iQCVAwUAP+LmQDEAnp832S/7AQKCmgQAhG+E7X0KB4qdVf3sMb6Qr+Iv5Jlehzoub/5vxTRgePKzRuOHidCnTzSSoyzA++UcHrOjHQQDMsXnO6PqpS1d/TKkxjnGN7rE8mvMYlFAT8RsawTozSfh14mCzI0HTDbaKL9Z8pcMJtadB3XqAuqWJNO8kyECJFwurt3DRWXSWS8==Rug5
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/README b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/README
index b698cba..d73b082 100755..100644
--- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/README
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/README
@@ -1,26 +1,26 @@
1This directory contains mpn functions optimized for Intel Pentium 1This directory contains mpn functions optimized for Intel Pentium
2processors. 2processors.
3 3
4RELEVANT OPTIMIZATION ISSUES 4RELEVANT OPTIMIZATION ISSUES
5 5
61. Pentium doesn't allocate cache lines on writes, unlike most other modern 61. Pentium doesn't allocate cache lines on writes, unlike most other modern
7processors. Since the functions in the mpn class do array writes, we have to 7processors. Since the functions in the mpn class do array writes, we have to
8handle allocating the destination cache lines by reading a word from it in the 8handle allocating the destination cache lines by reading a word from it in the
9loops, to achieve the best performance. 9loops, to achieve the best performance.
10 10
112. Pairing of memory operations requires that the two issued operations refer 112. Pairing of memory operations requires that the two issued operations refer
12to different cache banks. The simplest way to insure this is to read/write 12to different cache banks. The simplest way to insure this is to read/write
13two words from the same object. If we make operations on different objects, 13two words from the same object. If we make operations on different objects,
14they might or might not be to the same cache bank. 14they might or might not be to the same cache bank.
15 15
16STATUS 16STATUS
17 17
181. mpn_lshift and mpn_rshift run at about 6 cycles/limb, but the Pentium 181. mpn_lshift and mpn_rshift run at about 6 cycles/limb, but the Pentium
19documentation indicates that they should take only 43/8 = 5.375 cycles/limb, 19documentation indicates that they should take only 43/8 = 5.375 cycles/limb,
20or 5 cycles/limb asymptotically. 20or 5 cycles/limb asymptotically.
21 21
222. mpn_add_n and mpn_sub_n run at asymptotically 2 cycles/limb. Due to loop 222. mpn_add_n and mpn_sub_n run at asymptotically 2 cycles/limb. Due to loop
23overhead and other delays (cache refill?), they run at or near 2.5 cycles/limb. 23overhead and other delays (cache refill?), they run at or near 2.5 cycles/limb.
24 24
253. mpn_mul_1, mpn_addmul_1, mpn_submul_1 all run 1 cycle faster than they 253. mpn_mul_1, mpn_addmul_1, mpn_submul_1 all run 1 cycle faster than they
26should... 26should...
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/distfiles b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/distfiles
index f11658e..546f777 100755..100644
--- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/distfiles
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/distfiles
@@ -1,10 +1,10 @@
1Manifest 1Manifest
2mpih-add1.S 2mpih-add1.S
3mpih-mul1.S 3mpih-mul1.S
4mpih-mul2.S 4mpih-mul2.S
5mpih-mul3.S 5mpih-mul3.S
6mpih-lshift.S 6mpih-lshift.S
7mpih-rshift.S 7mpih-rshift.S
8mpih-sub1.S 8mpih-sub1.S
9README 9README
10 10
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-add1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-add1.S
index 6068fcb..7436d59 100755..100644
--- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-add1.S
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-add1.S
@@ -1,135 +1,135 @@
1/* i80586 add_n -- Add two limb vectors of the same length > 0 and store 1/* i80586 add_n -- Add 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, 1996, 1998, 4 * Copyright (C) 1992, 1994, 1995, 1996, 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 23
24 24
25#include "sysdep.h" 25#include "sysdep.h"
26#include "asm-syntax.h" 26#include "asm-syntax.h"
27 27
28 28
29/******************* 29/*******************
30 * mpi_limb_t 30 * mpi_limb_t
31 * _gcry_mpih_add_n( mpi_ptr_t res_ptr, (sp + 4) 31 * _gcry_mpih_add_n( mpi_ptr_t res_ptr, (sp + 4)
32 * mpi_ptr_t s1_ptr, (sp + 8) 32 * mpi_ptr_t s1_ptr, (sp + 8)
33 * mpi_ptr_t s2_ptr, (sp + 12) 33 * mpi_ptr_t s2_ptr, (sp + 12)
34 * mpi_size_t size) (sp + 16) 34 * mpi_size_t size) (sp + 16)
35 */ 35 */
36 36
37.text 37.text
38 ALIGN (3) 38 ALIGN (3)
39 .globl C_SYMBOL_NAME(_gcry_mpih_add_n) 39 .globl C_SYMBOL_NAME(_gcry_mpih_add_n)
40C_SYMBOL_NAME(_gcry_mpih_add_n:) 40C_SYMBOL_NAME(_gcry_mpih_add_n:)
41 pushl %edi 41 pushl %edi
42 pushl %esi 42 pushl %esi
43 pushl %ebx 43 pushl %ebx
44 pushl %ebp 44 pushl %ebp
45 45
46 movl 20(%esp),%edi /* res_ptr */ 46 movl 20(%esp),%edi /* res_ptr */
47 movl 24(%esp),%esi /* s1_ptr */ 47 movl 24(%esp),%esi /* s1_ptr */
48 movl 28(%esp),%ebp /* s2_ptr */ 48 movl 28(%esp),%ebp /* s2_ptr */
49 movl 32(%esp),%ecx /* size */ 49 movl 32(%esp),%ecx /* size */
50 50
51 movl (%ebp),%ebx 51 movl (%ebp),%ebx
52 52
53 decl %ecx 53 decl %ecx
54 movl %ecx,%edx 54 movl %ecx,%edx
55 shrl $3,%ecx 55 shrl $3,%ecx
56 andl $7,%edx 56 andl $7,%edx
57 testl %ecx,%ecx /* zero carry flag */ 57 testl %ecx,%ecx /* zero carry flag */
58 jz Lend 58 jz Lend
59 pushl %edx 59 pushl %edx
60 60
61 ALIGN (3) 61 ALIGN (3)
62Loop: movl 28(%edi),%eax /* fetch destination cache line */ 62Loop: movl 28(%edi),%eax /* fetch destination cache line */
63 leal 32(%edi),%edi 63 leal 32(%edi),%edi
64 64
65L1: movl (%esi),%eax 65L1: movl (%esi),%eax
66 movl 4(%esi),%edx 66 movl 4(%esi),%edx
67 adcl %ebx,%eax 67 adcl %ebx,%eax
68 movl 4(%ebp),%ebx 68 movl 4(%ebp),%ebx
69 adcl %ebx,%edx 69 adcl %ebx,%edx
70 movl 8(%ebp),%ebx 70 movl 8(%ebp),%ebx
71 movl %eax,-32(%edi) 71 movl %eax,-32(%edi)
72 movl %edx,-28(%edi) 72 movl %edx,-28(%edi)
73 73
74L2: movl 8(%esi),%eax 74L2: movl 8(%esi),%eax
75 movl 12(%esi),%edx 75 movl 12(%esi),%edx
76 adcl %ebx,%eax 76 adcl %ebx,%eax
77 movl 12(%ebp),%ebx 77 movl 12(%ebp),%ebx
78 adcl %ebx,%edx 78 adcl %ebx,%edx
79 movl 16(%ebp),%ebx 79 movl 16(%ebp),%ebx
80 movl %eax,-24(%edi) 80 movl %eax,-24(%edi)
81 movl %edx,-20(%edi) 81 movl %edx,-20(%edi)
82 82
83L3: movl 16(%esi),%eax 83L3: movl 16(%esi),%eax
84 movl 20(%esi),%edx 84 movl 20(%esi),%edx
85 adcl %ebx,%eax 85 adcl %ebx,%eax
86 movl 20(%ebp),%ebx 86 movl 20(%ebp),%ebx
87 adcl %ebx,%edx 87 adcl %ebx,%edx
88 movl 24(%ebp),%ebx 88 movl 24(%ebp),%ebx
89 movl %eax,-16(%edi) 89 movl %eax,-16(%edi)
90 movl %edx,-12(%edi) 90 movl %edx,-12(%edi)
91 91
92L4: movl 24(%esi),%eax 92L4: movl 24(%esi),%eax
93 movl 28(%esi),%edx 93 movl 28(%esi),%edx
94 adcl %ebx,%eax 94 adcl %ebx,%eax
95 movl 28(%ebp),%ebx 95 movl 28(%ebp),%ebx
96 adcl %ebx,%edx 96 adcl %ebx,%edx
97 movl 32(%ebp),%ebx 97 movl 32(%ebp),%ebx
98 movl %eax,-8(%edi) 98 movl %eax,-8(%edi)
99 movl %edx,-4(%edi) 99 movl %edx,-4(%edi)
100 100
101 leal 32(%esi),%esi 101 leal 32(%esi),%esi
102 leal 32(%ebp),%ebp 102 leal 32(%ebp),%ebp
103 decl %ecx 103 decl %ecx
104 jnz Loop 104 jnz Loop
105 105
106 popl %edx 106 popl %edx
107Lend: 107Lend:
108 decl %edx /* test %edx w/o clobbering carry */ 108 decl %edx /* test %edx w/o clobbering carry */
109 js Lend2 109 js Lend2
110 incl %edx 110 incl %edx
111Loop2: 111Loop2:
112 leal 4(%edi),%edi 112 leal 4(%edi),%edi
113 movl (%esi),%eax 113 movl (%esi),%eax
114 adcl %ebx,%eax 114 adcl %ebx,%eax
115 movl 4(%ebp),%ebx 115 movl 4(%ebp),%ebx
116 movl %eax,-4(%edi) 116 movl %eax,-4(%edi)
117 leal 4(%esi),%esi 117 leal 4(%esi),%esi
118 leal 4(%ebp),%ebp 118 leal 4(%ebp),%ebp
119 decl %edx 119 decl %edx
120 jnz Loop2 120 jnz Loop2
121Lend2: 121Lend2:
122 movl (%esi),%eax 122 movl (%esi),%eax
123 adcl %ebx,%eax 123 adcl %ebx,%eax
124 movl %eax,(%edi) 124 movl %eax,(%edi)
125 125
126 sbbl %eax,%eax 126 sbbl %eax,%eax
127 negl %eax 127 negl %eax
128 128
129 popl %ebp 129 popl %ebp
130 popl %ebx 130 popl %ebx
131 popl %esi 131 popl %esi
132 popl %edi 132 popl %edi
133 ret 133 ret
134 134
135 135
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-lshift.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-lshift.S
index 8aa3224..9d25fe9 100755..100644
--- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-lshift.S
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-lshift.S
@@ -1,229 +1,229 @@
1/* i80586 lshift 1/* i80586 lshift
2 * 2 *
3 * Copyright (C) 1992, 1994, 1998, 3 * Copyright (C) 1992, 1994, 1998,
4 * 2001, 2002 Free Software Foundation, Inc. 4 * 2001, 2002 Free Software Foundation, Inc.
5 * 5 *
6 * This file is part of Libgcrypt. 6 * This file is part of Libgcrypt.
7 * 7 *
8 * Libgcrypt is free software; you can redistribute it and/or modify 8 * Libgcrypt is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as 9 * it under the terms of the GNU Lesser General Public License as
10 * published by the Free Software Foundation; either version 2.1 of 10 * published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version. 11 * the License, or (at your option) any later version.
12 * 12 *
13 * Libgcrypt is distributed in the hope that it will be useful, 13 * Libgcrypt is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details. 16 * GNU Lesser General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU Lesser General Public 18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this program; if not, write to the Free Software 19 * License along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21 * 21 *
22 * Note: This code is heavily based on the GNU MP Library. 22 * Note: This code is heavily based on the GNU MP Library.
23 * Actually it's the same code with only minor changes in the 23 * Actually it's the same code with only minor changes in the
24 * way the data is stored; this is to support the abstraction 24 * way the data is stored; this is to support the abstraction
25 * of an optional secure memory allocation which may be used 25 * of an optional secure memory allocation which may be used
26 * to avoid revealing of sensitive data due to paging etc. 26 * to avoid revealing of sensitive data due to paging etc.
27 */ 27 */
28 28
29 29
30#include "sysdep.h" 30#include "sysdep.h"
31#include "asm-syntax.h" 31#include "asm-syntax.h"
32 32
33 33
34/******************* 34/*******************
35 * mpi_limb_t 35 * mpi_limb_t
36 * _gcry_mpih_lshift( mpi_ptr_t wp, (sp + 4) 36 * _gcry_mpih_lshift( mpi_ptr_t wp, (sp + 4)
37 * mpi_ptr_t up, (sp + 8) 37 * mpi_ptr_t up, (sp + 8)
38 * mpi_size_t usize, (sp + 12) 38 * mpi_size_t usize, (sp + 12)
39 * unsigned cnt) (sp + 16) 39 * unsigned cnt) (sp + 16)
40 */ 40 */
41 41
42.text 42.text
43 ALIGN (3) 43 ALIGN (3)
44 .globl C_SYMBOL_NAME(_gcry_mpih_lshift) 44 .globl C_SYMBOL_NAME(_gcry_mpih_lshift)
45C_SYMBOL_NAME(_gcry_mpih_lshift:) 45C_SYMBOL_NAME(_gcry_mpih_lshift:)
46 46
47 pushl %edi 47 pushl %edi
48 pushl %esi 48 pushl %esi
49 pushl %ebx 49 pushl %ebx
50 pushl %ebp 50 pushl %ebp
51 51
52 movl 20(%esp),%edi /* res_ptr */ 52 movl 20(%esp),%edi /* res_ptr */
53 movl 24(%esp),%esi /* s_ptr */ 53 movl 24(%esp),%esi /* s_ptr */
54 movl 28(%esp),%ebp /* size */ 54 movl 28(%esp),%ebp /* size */
55 movl 32(%esp),%ecx /* cnt */ 55 movl 32(%esp),%ecx /* cnt */
56 56
57/* We can use faster code for shift-by-1 under certain conditions. */ 57/* We can use faster code for shift-by-1 under certain conditions. */
58 cmp $1,%ecx 58 cmp $1,%ecx
59 jne Lnormal 59 jne Lnormal
60 leal 4(%esi),%eax 60 leal 4(%esi),%eax
61 cmpl %edi,%eax 61 cmpl %edi,%eax
62 jnc Lspecial /* jump if s_ptr + 1 >= res_ptr */ 62 jnc Lspecial /* jump if s_ptr + 1 >= res_ptr */
63 leal (%esi,%ebp,4),%eax 63 leal (%esi,%ebp,4),%eax
64 cmpl %eax,%edi 64 cmpl %eax,%edi
65 jnc Lspecial /* jump if res_ptr >= s_ptr + size */ 65 jnc Lspecial /* jump if res_ptr >= s_ptr + size */
66 66
67Lnormal: 67Lnormal:
68 leal -4(%edi,%ebp,4),%edi 68 leal -4(%edi,%ebp,4),%edi
69 leal -4(%esi,%ebp,4),%esi 69 leal -4(%esi,%ebp,4),%esi
70 70
71 movl (%esi),%edx 71 movl (%esi),%edx
72 subl $4,%esi 72 subl $4,%esi
73 xorl %eax,%eax 73 xorl %eax,%eax
74 shldl %cl,%edx,%eax /* compute carry limb */ 74 shldl %cl,%edx,%eax /* compute carry limb */
75 pushl %eax /* push carry limb onto stack */ 75 pushl %eax /* push carry limb onto stack */
76 76
77 decl %ebp 77 decl %ebp
78 pushl %ebp 78 pushl %ebp
79 shrl $3,%ebp 79 shrl $3,%ebp
80 jz Lend 80 jz Lend
81 81
82 movl (%edi),%eax /* fetch destination cache line */ 82 movl (%edi),%eax /* fetch destination cache line */
83 83
84 ALIGN (2) 84 ALIGN (2)
85Loop: movl -28(%edi),%eax /* fetch destination cache line */ 85Loop: movl -28(%edi),%eax /* fetch destination cache line */
86 movl %edx,%ebx 86 movl %edx,%ebx
87 87
88 movl (%esi),%eax 88 movl (%esi),%eax
89 movl -4(%esi),%edx 89 movl -4(%esi),%edx
90 shldl %cl,%eax,%ebx 90 shldl %cl,%eax,%ebx
91 shldl %cl,%edx,%eax 91 shldl %cl,%edx,%eax
92 movl %ebx,(%edi) 92 movl %ebx,(%edi)
93 movl %eax,-4(%edi) 93 movl %eax,-4(%edi)
94 94
95 movl -8(%esi),%ebx 95 movl -8(%esi),%ebx
96 movl -12(%esi),%eax 96 movl -12(%esi),%eax
97 shldl %cl,%ebx,%edx 97 shldl %cl,%ebx,%edx
98 shldl %cl,%eax,%ebx 98 shldl %cl,%eax,%ebx
99 movl %edx,-8(%edi) 99 movl %edx,-8(%edi)
100 movl %ebx,-12(%edi) 100 movl %ebx,-12(%edi)
101 101
102 movl -16(%esi),%edx 102 movl -16(%esi),%edx
103 movl -20(%esi),%ebx 103 movl -20(%esi),%ebx
104 shldl %cl,%edx,%eax 104 shldl %cl,%edx,%eax
105 shldl %cl,%ebx,%edx 105 shldl %cl,%ebx,%edx
106 movl %eax,-16(%edi) 106 movl %eax,-16(%edi)
107 movl %edx,-20(%edi) 107 movl %edx,-20(%edi)
108 108
109 movl -24(%esi),%eax 109 movl -24(%esi),%eax
110 movl -28(%esi),%edx 110 movl -28(%esi),%edx
111 shldl %cl,%eax,%ebx 111 shldl %cl,%eax,%ebx
112 shldl %cl,%edx,%eax 112 shldl %cl,%edx,%eax
113 movl %ebx,-24(%edi) 113 movl %ebx,-24(%edi)
114 movl %eax,-28(%edi) 114 movl %eax,-28(%edi)
115 115
116 subl $32,%esi 116 subl $32,%esi
117 subl $32,%edi 117 subl $32,%edi
118 decl %ebp 118 decl %ebp
119 jnz Loop 119 jnz Loop
120 120
121Lend: popl %ebp 121Lend: popl %ebp
122 andl $7,%ebp 122 andl $7,%ebp
123 jz Lend2 123 jz Lend2
124Loop2: movl (%esi),%eax 124Loop2: movl (%esi),%eax
125 shldl %cl,%eax,%edx 125 shldl %cl,%eax,%edx
126 movl %edx,(%edi) 126 movl %edx,(%edi)
127 movl %eax,%edx 127 movl %eax,%edx
128 subl $4,%esi 128 subl $4,%esi
129 subl $4,%edi 129 subl $4,%edi
130 decl %ebp 130 decl %ebp
131 jnz Loop2 131 jnz Loop2
132 132
133Lend2: shll %cl,%edx /* compute least significant limb */ 133Lend2: shll %cl,%edx /* compute least significant limb */
134 movl %edx,(%edi) /* store it */ 134 movl %edx,(%edi) /* store it */
135 135
136 popl %eax /* pop carry limb */ 136 popl %eax /* pop carry limb */
137 137
138 popl %ebp 138 popl %ebp
139 popl %ebx 139 popl %ebx
140 popl %esi 140 popl %esi
141 popl %edi 141 popl %edi
142 ret 142 ret
143 143
144/* We loop from least significant end of the arrays, which is only 144/* We loop from least significant end of the arrays, which is only
145 permissable if the source and destination don't overlap, since the 145 permissable if the source and destination don't overlap, since the
146 function is documented to work for overlapping source and destination. 146 function is documented to work for overlapping source and destination.
147*/ 147*/
148 148
149Lspecial: 149Lspecial:
150 movl (%esi),%edx 150 movl (%esi),%edx
151 addl $4,%esi 151 addl $4,%esi
152 152
153 decl %ebp 153 decl %ebp
154 pushl %ebp 154 pushl %ebp
155 shrl $3,%ebp 155 shrl $3,%ebp
156 156
157 addl %edx,%edx 157 addl %edx,%edx
158 incl %ebp 158 incl %ebp
159 decl %ebp 159 decl %ebp
160 jz LLend 160 jz LLend
161 161
162 movl (%edi),%eax /* fetch destination cache line */ 162 movl (%edi),%eax /* fetch destination cache line */
163 163
164 ALIGN (2) 164 ALIGN (2)
165LLoop: movl 28(%edi),%eax /* fetch destination cache line */ 165LLoop: movl 28(%edi),%eax /* fetch destination cache line */
166 movl %edx,%ebx 166 movl %edx,%ebx
167 167
168 movl (%esi),%eax 168 movl (%esi),%eax
169 movl 4(%esi),%edx 169 movl 4(%esi),%edx
170 adcl %eax,%eax 170 adcl %eax,%eax
171 movl %ebx,(%edi) 171 movl %ebx,(%edi)
172 adcl %edx,%edx 172 adcl %edx,%edx
173 movl %eax,4(%edi) 173 movl %eax,4(%edi)
174 174
175 movl 8(%esi),%ebx 175 movl 8(%esi),%ebx
176 movl 12(%esi),%eax 176 movl 12(%esi),%eax
177 adcl %ebx,%ebx 177 adcl %ebx,%ebx
178 movl %edx,8(%edi) 178 movl %edx,8(%edi)
179 adcl %eax,%eax 179 adcl %eax,%eax
180 movl %ebx,12(%edi) 180 movl %ebx,12(%edi)
181 181
182 movl 16(%esi),%edx 182 movl 16(%esi),%edx
183 movl 20(%esi),%ebx 183 movl 20(%esi),%ebx
184 adcl %edx,%edx 184 adcl %edx,%edx
185 movl %eax,16(%edi) 185 movl %eax,16(%edi)
186 adcl %ebx,%ebx 186 adcl %ebx,%ebx
187 movl %edx,20(%edi) 187 movl %edx,20(%edi)
188 188
189 movl 24(%esi),%eax 189 movl 24(%esi),%eax
190 movl 28(%esi),%edx 190 movl 28(%esi),%edx
191 adcl %eax,%eax 191 adcl %eax,%eax
192 movl %ebx,24(%edi) 192 movl %ebx,24(%edi)
193 adcl %edx,%edx 193 adcl %edx,%edx
194 movl %eax,28(%edi) 194 movl %eax,28(%edi)
195 195
196 leal 32(%esi),%esi /* use leal not to clobber carry */ 196 leal 32(%esi),%esi /* use leal not to clobber carry */
197 leal 32(%edi),%edi 197 leal 32(%edi),%edi
198 decl %ebp 198 decl %ebp
199 jnz LLoop 199 jnz LLoop
200 200
201LLend: popl %ebp 201LLend: popl %ebp
202 sbbl %eax,%eax /* save carry in %eax */ 202 sbbl %eax,%eax /* save carry in %eax */
203 andl $7,%ebp 203 andl $7,%ebp
204 jz LLend2 204 jz LLend2
205 addl %eax,%eax /* restore carry from eax */ 205 addl %eax,%eax /* restore carry from eax */
206LLoop2: movl %edx,%ebx 206LLoop2: movl %edx,%ebx
207 movl (%esi),%edx 207 movl (%esi),%edx
208 adcl %edx,%edx 208 adcl %edx,%edx
209 movl %ebx,(%edi) 209 movl %ebx,(%edi)
210 210
211 leal 4(%esi),%esi /* use leal not to clobber carry */ 211 leal 4(%esi),%esi /* use leal not to clobber carry */
212 leal 4(%edi),%edi 212 leal 4(%edi),%edi
213 decl %ebp 213 decl %ebp
214 jnz LLoop2 214 jnz LLoop2
215 215
216 jmp LL1 216 jmp LL1
217LLend2: addl %eax,%eax /* restore carry from eax */ 217LLend2: addl %eax,%eax /* restore carry from eax */
218LL1: movl %edx,(%edi) /* store last limb */ 218LL1: movl %edx,(%edi) /* store last limb */
219 219
220 sbbl %eax,%eax 220 sbbl %eax,%eax
221 negl %eax 221 negl %eax
222 222
223 popl %ebp 223 popl %ebp
224 popl %ebx 224 popl %ebx
225 popl %esi 225 popl %esi
226 popl %edi 226 popl %edi
227 ret 227 ret
228 228
229 229
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul1.S
index 2e32460..3601d96 100755..100644
--- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul1.S
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul1.S
@@ -1,89 +1,89 @@
1/* i80586 mul_1 -- Multiply a limb vector with a limb and store 1/* i80586 mul_1 -- Multiply a limb vector with a limb and store
2 * the result in a second limb vector. 2 * the result in a second limb vector.
3 * 3 *
4 * Copyright (C) 1992, 1994, 1996, 1998, 4 * Copyright (C) 1992, 1994, 1996, 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_mul_1( mpi_ptr_t res_ptr, (sp + 4) 37 * _gcry_mpih_mul_1( 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_size_t s1_size, (sp + 12) 39 * mpi_size_t s1_size, (sp + 12)
40 * mpi_limb_t s2_limb) (sp + 16) 40 * mpi_limb_t s2_limb) (sp + 16)
41 */ 41 */
42 42
43#define res_ptr edi 43#define res_ptr edi
44#define s1_ptr esi 44#define s1_ptr esi
45#define size ecx 45#define size ecx
46#define s2_limb ebp 46#define s2_limb ebp
47 47
48 TEXT 48 TEXT
49 ALIGN (3) 49 ALIGN (3)
50 GLOBL C_SYMBOL_NAME(_gcry_mpih_mul_1) 50 GLOBL C_SYMBOL_NAME(_gcry_mpih_mul_1)
51C_SYMBOL_NAME(_gcry_mpih_mul_1:) 51C_SYMBOL_NAME(_gcry_mpih_mul_1:)
52 52
53 INSN1(push,l ,R(edi)) 53 INSN1(push,l ,R(edi))
54 INSN1(push,l ,R(esi)) 54 INSN1(push,l ,R(esi))
55 INSN1(push,l ,R(ebx)) 55 INSN1(push,l ,R(ebx))
56 INSN1(push,l ,R(ebp)) 56 INSN1(push,l ,R(ebp))
57 57
58 INSN2(mov,l ,R(res_ptr),MEM_DISP(esp,20)) 58 INSN2(mov,l ,R(res_ptr),MEM_DISP(esp,20))
59 INSN2(mov,l ,R(s1_ptr),MEM_DISP(esp,24)) 59 INSN2(mov,l ,R(s1_ptr),MEM_DISP(esp,24))
60 INSN2(mov,l ,R(size),MEM_DISP(esp,28)) 60 INSN2(mov,l ,R(size),MEM_DISP(esp,28))
61 INSN2(mov,l ,R(s2_limb),MEM_DISP(esp,32)) 61 INSN2(mov,l ,R(s2_limb),MEM_DISP(esp,32))
62 62
63 INSN2(lea,l ,R(res_ptr),MEM_INDEX(res_ptr,size,4)) 63 INSN2(lea,l ,R(res_ptr),MEM_INDEX(res_ptr,size,4))
64 INSN2(lea,l ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4)) 64 INSN2(lea,l ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4))
65 INSN1(neg,l ,R(size)) 65 INSN1(neg,l ,R(size))
66 INSN2(xor,l ,R(ebx),R(ebx)) 66 INSN2(xor,l ,R(ebx),R(ebx))
67 ALIGN (3) 67 ALIGN (3)
68 68
69Loop: INSN2(adc,l ,R(ebx),$0) 69Loop: INSN2(adc,l ,R(ebx),$0)
70 INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4)) 70 INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4))
71 71
72 INSN1(mul,l ,R(s2_limb)) 72 INSN1(mul,l ,R(s2_limb))
73 73
74 INSN2(add,l ,R(ebx),R(eax)) 74 INSN2(add,l ,R(ebx),R(eax))
75 75
76 INSN2(mov,l ,MEM_INDEX(res_ptr,size,4),R(ebx)) 76 INSN2(mov,l ,MEM_INDEX(res_ptr,size,4),R(ebx))
77 INSN1(inc,l ,R(size)) 77 INSN1(inc,l ,R(size))
78 78
79 INSN2(mov,l ,R(ebx),R(edx)) 79 INSN2(mov,l ,R(ebx),R(edx))
80 INSN1(jnz, ,Loop) 80 INSN1(jnz, ,Loop)
81 81
82 INSN2(adc,l ,R(ebx),$0) 82 INSN2(adc,l ,R(ebx),$0)
83 INSN2(mov,l ,R(eax),R(ebx)) 83 INSN2(mov,l ,R(eax),R(ebx))
84 INSN1(pop,l ,R(ebp)) 84 INSN1(pop,l ,R(ebp))
85 INSN1(pop,l ,R(ebx)) 85 INSN1(pop,l ,R(ebx))
86 INSN1(pop,l ,R(esi)) 86 INSN1(pop,l ,R(esi))
87 INSN1(pop,l ,R(edi)) 87 INSN1(pop,l ,R(edi))
88 ret 88 ret
89 89
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul2.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul2.S
index 47b0ec4..f32d363 100755..100644
--- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul2.S
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul2.S
@@ -1,93 +1,93 @@
1/* i80586 addmul_1 -- Multiply a limb vector with a limb and add 1/* i80586 addmul_1 -- Multiply a limb vector with a limb and add
2 * the result to a second limb vector. 2 * the result to a second limb vector.
3 * 3 *
4 * Copyright (C) 1992, 1994, 1998, 4 * Copyright (C) 1992, 1994, 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_addmul_1( mpi_ptr_t res_ptr, (sp + 4) 37 * _gcry_mpih_addmul_1( 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_size_t s1_size, (sp + 12) 39 * mpi_size_t s1_size, (sp + 12)
40 * mpi_limb_t s2_limb) (sp + 16) 40 * mpi_limb_t s2_limb) (sp + 16)
41 */ 41 */
42 42
43#define res_ptr edi 43#define res_ptr edi
44#define s1_ptr esi 44#define s1_ptr esi
45#define size ecx 45#define size ecx
46#define s2_limb ebp 46#define s2_limb ebp
47 47
48 TEXT 48 TEXT
49 ALIGN (3) 49 ALIGN (3)
50 GLOBL C_SYMBOL_NAME(_gcry_mpih_addmul_1) 50 GLOBL C_SYMBOL_NAME(_gcry_mpih_addmul_1)
51C_SYMBOL_NAME(_gcry_mpih_addmul_1:) 51C_SYMBOL_NAME(_gcry_mpih_addmul_1:)
52 52
53 INSN1(push,l ,R(edi)) 53 INSN1(push,l ,R(edi))
54 INSN1(push,l ,R(esi)) 54 INSN1(push,l ,R(esi))
55 INSN1(push,l ,R(ebx)) 55 INSN1(push,l ,R(ebx))
56 INSN1(push,l ,R(ebp)) 56 INSN1(push,l ,R(ebp))
57 57
58 INSN2(mov,l ,R(res_ptr),MEM_DISP(esp,20)) 58 INSN2(mov,l ,R(res_ptr),MEM_DISP(esp,20))
59 INSN2(mov,l ,R(s1_ptr),MEM_DISP(esp,24)) 59 INSN2(mov,l ,R(s1_ptr),MEM_DISP(esp,24))
60 INSN2(mov,l ,R(size),MEM_DISP(esp,28)) 60 INSN2(mov,l ,R(size),MEM_DISP(esp,28))
61 INSN2(mov,l ,R(s2_limb),MEM_DISP(esp,32)) 61 INSN2(mov,l ,R(s2_limb),MEM_DISP(esp,32))
62 62
63 INSN2(lea,l ,R(res_ptr),MEM_INDEX(res_ptr,size,4)) 63 INSN2(lea,l ,R(res_ptr),MEM_INDEX(res_ptr,size,4))
64 INSN2(lea,l ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4)) 64 INSN2(lea,l ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4))
65 INSN1(neg,l ,R(size)) 65 INSN1(neg,l ,R(size))
66 INSN2(xor,l ,R(ebx),R(ebx)) 66 INSN2(xor,l ,R(ebx),R(ebx))
67 ALIGN (3) 67 ALIGN (3)
68 68
69Loop: INSN2(adc,l ,R(ebx),$0) 69Loop: INSN2(adc,l ,R(ebx),$0)
70 INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4)) 70 INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4))
71 71
72 INSN1(mul,l ,R(s2_limb)) 72 INSN1(mul,l ,R(s2_limb))
73 73
74 INSN2(add,l ,R(eax),R(ebx)) 74 INSN2(add,l ,R(eax),R(ebx))
75 INSN2(mov,l ,R(ebx),MEM_INDEX(res_ptr,size,4)) 75 INSN2(mov,l ,R(ebx),MEM_INDEX(res_ptr,size,4))
76 76
77 INSN2(adc,l ,R(edx),$0) 77 INSN2(adc,l ,R(edx),$0)
78 INSN2(add,l ,R(ebx),R(eax)) 78 INSN2(add,l ,R(ebx),R(eax))
79 79
80 INSN2(mov,l ,MEM_INDEX(res_ptr,size,4),R(ebx)) 80 INSN2(mov,l ,MEM_INDEX(res_ptr,size,4),R(ebx))
81 INSN1(inc,l ,R(size)) 81 INSN1(inc,l ,R(size))
82 82
83 INSN2(mov,l ,R(ebx),R(edx)) 83 INSN2(mov,l ,R(ebx),R(edx))
84 INSN1(jnz, ,Loop) 84 INSN1(jnz, ,Loop)
85 85
86 INSN2(adc,l ,R(ebx),$0) 86 INSN2(adc,l ,R(ebx),$0)
87 INSN2(mov,l ,R(eax),R(ebx)) 87 INSN2(mov,l ,R(eax),R(ebx))
88 INSN1(pop,l ,R(ebp)) 88 INSN1(pop,l ,R(ebp))
89 INSN1(pop,l ,R(ebx)) 89 INSN1(pop,l ,R(ebx))
90 INSN1(pop,l ,R(esi)) 90 INSN1(pop,l ,R(esi))
91 INSN1(pop,l ,R(edi)) 91 INSN1(pop,l ,R(edi))
92 ret 92 ret
93 93
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul3.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul3.S
index 4c1bd83..fa27d4e 100755..100644
--- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul3.S
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-mul3.S
@@ -1,93 +1,93 @@
1/* i80586 submul_1 -- Multiply a limb vector with a limb and add 1/* i80586 submul_1 -- Multiply a limb vector with a limb and add
2 * the result to a second limb vector. 2 * the result to a second limb vector.
3 * 3 *
4 * Copyright (C) 1992, 1994, 1998, 4 * Copyright (C) 1992, 1994, 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_submul_1( mpi_ptr_t res_ptr, (sp + 4) 37 * _gcry_mpih_submul_1( 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_size_t s1_size, (sp + 12) 39 * mpi_size_t s1_size, (sp + 12)
40 * mpi_limb_t s2_limb) (sp + 16) 40 * mpi_limb_t s2_limb) (sp + 16)
41 */ 41 */
42 42
43#define res_ptr edi 43#define res_ptr edi
44#define s1_ptr esi 44#define s1_ptr esi
45#define size ecx 45#define size ecx
46#define s2_limb ebp 46#define s2_limb ebp
47 47
48 TEXT 48 TEXT
49 ALIGN (3) 49 ALIGN (3)
50 GLOBL C_SYMBOL_NAME(_gcry_mpih_submul_1) 50 GLOBL C_SYMBOL_NAME(_gcry_mpih_submul_1)
51C_SYMBOL_NAME(_gcry_mpih_submul_1:) 51C_SYMBOL_NAME(_gcry_mpih_submul_1:)
52 52
53 INSN1(push,l ,R(edi)) 53 INSN1(push,l ,R(edi))
54 INSN1(push,l ,R(esi)) 54 INSN1(push,l ,R(esi))
55 INSN1(push,l ,R(ebx)) 55 INSN1(push,l ,R(ebx))
56 INSN1(push,l ,R(ebp)) 56 INSN1(push,l ,R(ebp))
57 57
58 INSN2(mov,l ,R(res_ptr),MEM_DISP(esp,20)) 58 INSN2(mov,l ,R(res_ptr),MEM_DISP(esp,20))
59 INSN2(mov,l ,R(s1_ptr),MEM_DISP(esp,24)) 59 INSN2(mov,l ,R(s1_ptr),MEM_DISP(esp,24))
60 INSN2(mov,l ,R(size),MEM_DISP(esp,28)) 60 INSN2(mov,l ,R(size),MEM_DISP(esp,28))
61 INSN2(mov,l ,R(s2_limb),MEM_DISP(esp,32)) 61 INSN2(mov,l ,R(s2_limb),MEM_DISP(esp,32))
62 62
63 INSN2(lea,l ,R(res_ptr),MEM_INDEX(res_ptr,size,4)) 63 INSN2(lea,l ,R(res_ptr),MEM_INDEX(res_ptr,size,4))
64 INSN2(lea,l ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4)) 64 INSN2(lea,l ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4))
65 INSN1(neg,l ,R(size)) 65 INSN1(neg,l ,R(size))
66 INSN2(xor,l ,R(ebx),R(ebx)) 66 INSN2(xor,l ,R(ebx),R(ebx))
67 ALIGN (3) 67 ALIGN (3)
68 68
69Loop: INSN2(adc,l ,R(ebx),$0) 69Loop: INSN2(adc,l ,R(ebx),$0)
70 INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4)) 70 INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4))
71 71
72 INSN1(mul,l ,R(s2_limb)) 72 INSN1(mul,l ,R(s2_limb))
73 73
74 INSN2(add,l ,R(eax),R(ebx)) 74 INSN2(add,l ,R(eax),R(ebx))
75 INSN2(mov,l ,R(ebx),MEM_INDEX(res_ptr,size,4)) 75 INSN2(mov,l ,R(ebx),MEM_INDEX(res_ptr,size,4))
76 76
77 INSN2(adc,l ,R(edx),$0) 77 INSN2(adc,l ,R(edx),$0)
78 INSN2(sub,l ,R(ebx),R(eax)) 78 INSN2(sub,l ,R(ebx),R(eax))
79 79
80 INSN2(mov,l ,MEM_INDEX(res_ptr,size,4),R(ebx)) 80 INSN2(mov,l ,MEM_INDEX(res_ptr,size,4),R(ebx))
81 INSN1(inc,l ,R(size)) 81 INSN1(inc,l ,R(size))
82 82
83 INSN2(mov,l ,R(ebx),R(edx)) 83 INSN2(mov,l ,R(ebx),R(edx))
84 INSN1(jnz, ,Loop) 84 INSN1(jnz, ,Loop)
85 85
86 INSN2(adc,l ,R(ebx),$0) 86 INSN2(adc,l ,R(ebx),$0)
87 INSN2(mov,l ,R(eax),R(ebx)) 87 INSN2(mov,l ,R(eax),R(ebx))
88 INSN1(pop,l ,R(ebp)) 88 INSN1(pop,l ,R(ebp))
89 INSN1(pop,l ,R(ebx)) 89 INSN1(pop,l ,R(ebx))
90 INSN1(pop,l ,R(esi)) 90 INSN1(pop,l ,R(esi))
91 INSN1(pop,l ,R(edi)) 91 INSN1(pop,l ,R(edi))
92 ret 92 ret
93 93
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-rshift.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-rshift.S
index fec2025..c661e3d 100755..100644
--- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-rshift.S
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-rshift.S
@@ -1,228 +1,228 @@
1/* i80586 rshift 1/* i80586 rshift
2 * 2 *
3 * Copyright (C) 1992, 1994, 1998, 3 * Copyright (C) 1992, 1994, 1998,
4 * 2001, 2002 Free Software Foundation, Inc. 4 * 2001, 2002 Free Software Foundation, Inc.
5 * 5 *
6 * This file is part of Libgcrypt. 6 * This file is part of Libgcrypt.
7 * 7 *
8 * Libgcrypt is free software; you can redistribute it and/or modify 8 * Libgcrypt is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as 9 * it under the terms of the GNU Lesser General Public License as
10 * published by the Free Software Foundation; either version 2.1 of 10 * published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version. 11 * the License, or (at your option) any later version.
12 * 12 *
13 * Libgcrypt is distributed in the hope that it will be useful, 13 * Libgcrypt is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details. 16 * GNU Lesser General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU Lesser General Public 18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this program; if not, write to the Free Software 19 * License along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21 * 21 *
22 * Note: This code is heavily based on the GNU MP Library. 22 * Note: This code is heavily based on the GNU MP Library.
23 * Actually it's the same code with only minor changes in the 23 * Actually it's the same code with only minor changes in the
24 * way the data is stored; this is to support the abstraction 24 * way the data is stored; this is to support the abstraction
25 * of an optional secure memory allocation which may be used 25 * of an optional secure memory allocation which may be used
26 * to avoid revealing of sensitive data due to paging etc. 26 * to avoid revealing of sensitive data due to paging etc.
27 */ 27 */
28 28
29 29
30#include "sysdep.h" 30#include "sysdep.h"
31#include "asm-syntax.h" 31#include "asm-syntax.h"
32 32
33 33
34 34
35/******************* 35/*******************
36 * mpi_limb_t 36 * mpi_limb_t
37 * _gcry_mpih_rshift( mpi_ptr_t wp, (sp + 4) 37 * _gcry_mpih_rshift( mpi_ptr_t wp, (sp + 4)
38 * mpi_ptr_t up, (sp + 8) 38 * mpi_ptr_t up, (sp + 8)
39 * mpi_size_t usize, (sp + 12) 39 * mpi_size_t usize, (sp + 12)
40 * unsigned cnt) (sp + 16) 40 * unsigned cnt) (sp + 16)
41 */ 41 */
42 42
43.text 43.text
44 ALIGN (3) 44 ALIGN (3)
45 .globl C_SYMBOL_NAME(_gcry_mpih_rshift) 45 .globl C_SYMBOL_NAME(_gcry_mpih_rshift)
46C_SYMBOL_NAME(_gcry_mpih_rshift:) 46C_SYMBOL_NAME(_gcry_mpih_rshift:)
47 pushl %edi 47 pushl %edi
48 pushl %esi 48 pushl %esi
49 pushl %ebx 49 pushl %ebx
50 pushl %ebp 50 pushl %ebp
51 51
52 movl 20(%esp),%edi /* res_ptr */ 52 movl 20(%esp),%edi /* res_ptr */
53 movl 24(%esp),%esi /* s_ptr */ 53 movl 24(%esp),%esi /* s_ptr */
54 movl 28(%esp),%ebp /* size */ 54 movl 28(%esp),%ebp /* size */
55 movl 32(%esp),%ecx /* cnt */ 55 movl 32(%esp),%ecx /* cnt */
56 56
57/* We can use faster code for shift-by-1 under certain conditions. */ 57/* We can use faster code for shift-by-1 under certain conditions. */
58 cmp $1,%ecx 58 cmp $1,%ecx
59 jne Rnormal 59 jne Rnormal
60 leal 4(%edi),%eax 60 leal 4(%edi),%eax
61 cmpl %esi,%eax 61 cmpl %esi,%eax
62 jnc Rspecial /* jump if res_ptr + 1 >= s_ptr */ 62 jnc Rspecial /* jump if res_ptr + 1 >= s_ptr */
63 leal (%edi,%ebp,4),%eax 63 leal (%edi,%ebp,4),%eax
64 cmpl %eax,%esi 64 cmpl %eax,%esi
65 jnc Rspecial /* jump if s_ptr >= res_ptr + size */ 65 jnc Rspecial /* jump if s_ptr >= res_ptr + size */
66 66
67Rnormal: 67Rnormal:
68 movl (%esi),%edx 68 movl (%esi),%edx
69 addl $4,%esi 69 addl $4,%esi
70 xorl %eax,%eax 70 xorl %eax,%eax
71 shrdl %cl,%edx,%eax /* compute carry limb */ 71 shrdl %cl,%edx,%eax /* compute carry limb */
72 pushl %eax /* push carry limb onto stack */ 72 pushl %eax /* push carry limb onto stack */
73 73
74 decl %ebp 74 decl %ebp
75 pushl %ebp 75 pushl %ebp
76 shrl $3,%ebp 76 shrl $3,%ebp
77 jz Rend 77 jz Rend
78 78
79 movl (%edi),%eax /* fetch destination cache line */ 79 movl (%edi),%eax /* fetch destination cache line */
80 80
81 ALIGN (2) 81 ALIGN (2)
82Roop: movl 28(%edi),%eax /* fetch destination cache line */ 82Roop: movl 28(%edi),%eax /* fetch destination cache line */
83 movl %edx,%ebx 83 movl %edx,%ebx
84 84
85 movl (%esi),%eax 85 movl (%esi),%eax
86 movl 4(%esi),%edx 86 movl 4(%esi),%edx
87 shrdl %cl,%eax,%ebx 87 shrdl %cl,%eax,%ebx
88 shrdl %cl,%edx,%eax 88 shrdl %cl,%edx,%eax
89 movl %ebx,(%edi) 89 movl %ebx,(%edi)
90 movl %eax,4(%edi) 90 movl %eax,4(%edi)
91 91
92 movl 8(%esi),%ebx 92 movl 8(%esi),%ebx
93 movl 12(%esi),%eax 93 movl 12(%esi),%eax
94 shrdl %cl,%ebx,%edx 94 shrdl %cl,%ebx,%edx
95 shrdl %cl,%eax,%ebx 95 shrdl %cl,%eax,%ebx
96 movl %edx,8(%edi) 96 movl %edx,8(%edi)
97 movl %ebx,12(%edi) 97 movl %ebx,12(%edi)
98 98
99 movl 16(%esi),%edx 99 movl 16(%esi),%edx
100 movl 20(%esi),%ebx 100 movl 20(%esi),%ebx
101 shrdl %cl,%edx,%eax 101 shrdl %cl,%edx,%eax
102 shrdl %cl,%ebx,%edx 102 shrdl %cl,%ebx,%edx
103 movl %eax,16(%edi) 103 movl %eax,16(%edi)
104 movl %edx,20(%edi) 104 movl %edx,20(%edi)
105 105
106 movl 24(%esi),%eax 106 movl 24(%esi),%eax
107 movl 28(%esi),%edx 107 movl 28(%esi),%edx
108 shrdl %cl,%eax,%ebx 108 shrdl %cl,%eax,%ebx
109 shrdl %cl,%edx,%eax 109 shrdl %cl,%edx,%eax
110 movl %ebx,24(%edi) 110 movl %ebx,24(%edi)
111 movl %eax,28(%edi) 111 movl %eax,28(%edi)
112 112
113 addl $32,%esi 113 addl $32,%esi
114 addl $32,%edi 114 addl $32,%edi
115 decl %ebp 115 decl %ebp
116 jnz Roop 116 jnz Roop
117 117
118Rend: popl %ebp 118Rend: popl %ebp
119 andl $7,%ebp 119 andl $7,%ebp
120 jz Rend2 120 jz Rend2
121Roop2: movl (%esi),%eax 121Roop2: movl (%esi),%eax
122 shrdl %cl,%eax,%edx /* compute result limb */ 122 shrdl %cl,%eax,%edx /* compute result limb */
123 movl %edx,(%edi) 123 movl %edx,(%edi)
124 movl %eax,%edx 124 movl %eax,%edx
125 addl $4,%esi 125 addl $4,%esi
126 addl $4,%edi 126 addl $4,%edi
127 decl %ebp 127 decl %ebp
128 jnz Roop2 128 jnz Roop2
129 129
130Rend2: shrl %cl,%edx /* compute most significant limb */ 130Rend2: shrl %cl,%edx /* compute most significant limb */
131 movl %edx,(%edi) /* store it */ 131 movl %edx,(%edi) /* store it */
132 132
133 popl %eax /* pop carry limb */ 133 popl %eax /* pop carry limb */
134 134
135 popl %ebp 135 popl %ebp
136 popl %ebx 136 popl %ebx
137 popl %esi 137 popl %esi
138 popl %edi 138 popl %edi
139 ret 139 ret
140 140
141/* We loop from least significant end of the arrays, which is only 141/* We loop from least significant end of the arrays, which is only
142 permissable if the source and destination don't overlap, since the 142 permissable if the source and destination don't overlap, since the
143 function is documented to work for overlapping source and destination. 143 function is documented to work for overlapping source and destination.
144*/ 144*/
145 145
146Rspecial: 146Rspecial:
147 leal -4(%edi,%ebp,4),%edi 147 leal -4(%edi,%ebp,4),%edi
148 leal -4(%esi,%ebp,4),%esi 148 leal -4(%esi,%ebp,4),%esi
149 149
150 movl (%esi),%edx 150 movl (%esi),%edx
151 subl $4,%esi 151 subl $4,%esi
152 152
153 decl %ebp 153 decl %ebp
154 pushl %ebp 154 pushl %ebp
155 shrl $3,%ebp 155 shrl $3,%ebp
156 156
157 shrl $1,%edx 157 shrl $1,%edx
158 incl %ebp 158 incl %ebp
159 decl %ebp 159 decl %ebp
160 jz RLend 160 jz RLend
161 161
162 movl (%edi),%eax /* fetch destination cache line */ 162 movl (%edi),%eax /* fetch destination cache line */
163 163
164 ALIGN (2) 164 ALIGN (2)
165RLoop: movl -28(%edi),%eax /* fetch destination cache line */ 165RLoop: movl -28(%edi),%eax /* fetch destination cache line */
166 movl %edx,%ebx 166 movl %edx,%ebx
167 167
168 movl (%esi),%eax 168 movl (%esi),%eax
169 movl -4(%esi),%edx 169 movl -4(%esi),%edx
170 rcrl $1,%eax 170 rcrl $1,%eax
171 movl %ebx,(%edi) 171 movl %ebx,(%edi)
172 rcrl $1,%edx 172 rcrl $1,%edx
173 movl %eax,-4(%edi) 173 movl %eax,-4(%edi)
174 174
175 movl -8(%esi),%ebx 175 movl -8(%esi),%ebx
176 movl -12(%esi),%eax 176 movl -12(%esi),%eax
177 rcrl $1,%ebx 177 rcrl $1,%ebx
178 movl %edx,-8(%edi) 178 movl %edx,-8(%edi)
179 rcrl $1,%eax 179 rcrl $1,%eax
180 movl %ebx,-12(%edi) 180 movl %ebx,-12(%edi)
181 181
182 movl -16(%esi),%edx 182 movl -16(%esi),%edx
183 movl -20(%esi),%ebx 183 movl -20(%esi),%ebx
184 rcrl $1,%edx 184 rcrl $1,%edx
185 movl %eax,-16(%edi) 185 movl %eax,-16(%edi)
186 rcrl $1,%ebx 186 rcrl $1,%ebx
187 movl %edx,-20(%edi) 187 movl %edx,-20(%edi)
188 188
189 movl -24(%esi),%eax 189 movl -24(%esi),%eax
190 movl -28(%esi),%edx 190 movl -28(%esi),%edx
191 rcrl $1,%eax 191 rcrl $1,%eax
192 movl %ebx,-24(%edi) 192 movl %ebx,-24(%edi)
193 rcrl $1,%edx 193 rcrl $1,%edx
194 movl %eax,-28(%edi) 194 movl %eax,-28(%edi)
195 195
196 leal -32(%esi),%esi /* use leal not to clobber carry */ 196 leal -32(%esi),%esi /* use leal not to clobber carry */
197 leal -32(%edi),%edi 197 leal -32(%edi),%edi
198 decl %ebp 198 decl %ebp
199 jnz RLoop 199 jnz RLoop
200 200
201RLend: popl %ebp 201RLend: popl %ebp
202 sbbl %eax,%eax /* save carry in %eax */ 202 sbbl %eax,%eax /* save carry in %eax */
203 andl $7,%ebp 203 andl $7,%ebp
204 jz RLend2 204 jz RLend2
205 addl %eax,%eax /* restore carry from eax */ 205 addl %eax,%eax /* restore carry from eax */
206RLoop2: movl %edx,%ebx 206RLoop2: movl %edx,%ebx
207 movl (%esi),%edx 207 movl (%esi),%edx
208 rcrl $1,%edx 208 rcrl $1,%edx
209 movl %ebx,(%edi) 209 movl %ebx,(%edi)
210 210
211 leal -4(%esi),%esi /* use leal not to clobber carry */ 211 leal -4(%esi),%esi /* use leal not to clobber carry */
212 leal -4(%edi),%edi 212 leal -4(%edi),%edi
213 decl %ebp 213 decl %ebp
214 jnz RLoop2 214 jnz RLoop2
215 215
216 jmp RL1 216 jmp RL1
217RLend2: addl %eax,%eax /* restore carry from eax */ 217RLend2: addl %eax,%eax /* restore carry from eax */
218RL1: movl %edx,(%edi) /* store last limb */ 218RL1: movl %edx,(%edi) /* store last limb */
219 219
220 movl $0,%eax 220 movl $0,%eax
221 rcrl $1,%eax 221 rcrl $1,%eax
222 222
223 popl %ebp 223 popl %ebp
224 popl %ebx 224 popl %ebx
225 popl %esi 225 popl %esi
226 popl %edi 226 popl %edi
227 ret 227 ret
228 228
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-sub1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-sub1.S
index 4197428..ef2d580 100755..100644
--- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-sub1.S
+++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i586/mpih-sub1.S
@@ -1,142 +1,142 @@
1/* i80586 sub_n -- Sub two limb vectors of the same length > 0 and store 1/* i80586 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)
47C_SYMBOL_NAME(_gcry_mpih_sub_n:) 47C_SYMBOL_NAME(_gcry_mpih_sub_n:)
48 48
49 pushl %edi 49 pushl %edi
50 pushl %esi 50 pushl %esi
51 pushl %ebx 51 pushl %ebx
52 pushl %ebp 52 pushl %ebp
53 53
54 movl 20(%esp),%edi /* res_ptr */ 54 movl 20(%esp),%edi /* res_ptr */
55 movl 24(%esp),%esi /* s1_ptr */ 55 movl 24(%esp),%esi /* s1_ptr */
56 movl 28(%esp),%ebp /* s2_ptr */ 56 movl 28(%esp),%ebp /* s2_ptr */
57 movl 32(%esp),%ecx /* size */ 57 movl 32(%esp),%ecx /* size */
58 58
59 movl (%ebp),%ebx 59 movl (%ebp),%ebx
60 60
61 decl %ecx 61 decl %ecx
62 movl %ecx,%edx 62 movl %ecx,%edx
63 shrl $3,%ecx 63 shrl $3,%ecx
64 andl $7,%edx 64 andl $7,%edx
65 testl %ecx,%ecx /* zero carry flag */ 65 testl %ecx,%ecx /* zero carry flag */
66 jz Lend 66 jz Lend
67 pushl %edx 67 pushl %edx
68 68
69 ALIGN (3) 69 ALIGN (3)
70Loop: movl 28(%edi),%eax /* fetch destination cache line */ 70Loop: movl 28(%edi),%eax /* fetch destination cache line */
71 leal 32(%edi),%edi 71 leal 32(%edi),%edi
72 72
73L1: movl (%esi),%eax 73L1: movl (%esi),%eax
74 movl 4(%esi),%edx 74 movl 4(%esi),%edx
75 sbbl %ebx,%eax 75 sbbl %ebx,%eax
76 movl 4(%ebp),%ebx 76 movl 4(%ebp),%ebx
77 sbbl %ebx,%edx 77 sbbl %ebx,%edx
78 movl 8(%ebp),%ebx 78 movl 8(%ebp),%ebx
79 movl %eax,-32(%edi) 79 movl %eax,-32(%edi)
80 movl %edx,-28(%edi) 80 movl %edx,-28(%edi)
81 81
82L2: movl 8(%esi),%eax 82L2: movl 8(%esi),%eax
83 movl 12(%esi),%edx 83 movl 12(%esi),%edx
84 sbbl %ebx,%eax 84 sbbl %ebx,%eax
85 movl 12(%ebp),%ebx 85 movl 12(%ebp),%ebx
86 sbbl %ebx,%edx 86 sbbl %ebx,%edx
87 movl 16(%ebp),%ebx 87 movl 16(%ebp),%ebx
88 movl %eax,-24(%edi) 88 movl %eax,-24(%edi)
89 movl %edx,-20(%edi) 89 movl %edx,-20(%edi)
90 90
91L3: movl 16(%esi),%eax 91L3: movl 16(%esi),%eax
92 movl 20(%esi),%edx 92 movl 20(%esi),%edx
93 sbbl %ebx,%eax 93 sbbl %ebx,%eax
94 movl 20(%ebp),%ebx 94 movl 20(%ebp),%ebx
95 sbbl %ebx,%edx 95 sbbl %ebx,%edx
96 movl 24(%ebp),%ebx 96 movl 24(%ebp),%ebx
97 movl %eax,-16(%edi) 97 movl %eax,-16(%edi)
98 movl %edx,-12(%edi) 98 movl %edx,-12(%edi)
99 99
100L4: movl 24(%esi),%eax 100L4: movl 24(%esi),%eax
101 movl 28(%esi),%edx 101 movl 28(%esi),%edx
102 sbbl %ebx,%eax 102 sbbl %ebx,%eax
103 movl 28(%ebp),%ebx 103 movl 28(%ebp),%ebx
104 sbbl %ebx,%edx 104 sbbl %ebx,%edx
105 movl 32(%ebp),%ebx 105 movl 32(%ebp),%ebx
106 movl %eax,-8(%edi) 106 movl %eax,-8(%edi)
107 movl %edx,-4(%edi) 107 movl %edx,-4(%edi)
108 108
109 leal 32(%esi),%esi 109 leal 32(%esi),%esi
110 leal 32(%ebp),%ebp 110 leal 32(%ebp),%ebp
111 decl %ecx 111 decl %ecx
112 jnz Loop 112 jnz Loop
113 113
114 popl %edx 114 popl %edx
115Lend: 115Lend:
116 decl %edx /* test %edx w/o clobbering carry */ 116 decl %edx /* test %edx w/o clobbering carry */
117 js Lend2 117 js Lend2
118 incl %edx 118 incl %edx
119Loop2: 119Loop2:
120 leal 4(%edi),%edi 120 leal 4(%edi),%edi
121 movl (%esi),%eax 121 movl (%esi),%eax
122 sbbl %ebx,%eax 122 sbbl %ebx,%eax
123 movl 4(%ebp),%ebx 123 movl 4(%ebp),%ebx
124 movl %eax,-4(%edi) 124 movl %eax,-4(%edi)
125 leal 4(%esi),%esi 125 leal 4(%esi),%esi
126 leal 4(%ebp),%ebp 126 leal 4(%ebp),%ebp
127 decl %edx 127 decl %edx
128 jnz Loop2 128 jnz Loop2
129Lend2: 129Lend2:
130 movl (%esi),%eax 130 movl (%esi),%eax
131 sbbl %ebx,%eax 131 sbbl %ebx,%eax
132 movl %eax,(%edi) 132 movl %eax,(%edi)
133 133
134 sbbl %eax,%eax 134 sbbl %eax,%eax
135 negl %eax 135 negl %eax
136 136
137 popl %ebp 137 popl %ebp
138 popl %ebx 138 popl %ebx
139 popl %esi 139 popl %esi
140 popl %edi 140 popl %edi
141 ret 141 ret
142 142