diff options
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386')
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/Manifest | 56 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/distfiles | 20 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-add1.S | 232 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-lshift.S | 188 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul1.S | 168 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul2.S | 172 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul3.S | 172 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-rshift.S | 194 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-sub1.S | 234 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/syntax.h | 136 |
10 files changed, 786 insertions, 786 deletions
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/Manifest b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/Manifest index 5d03bd3..812bc8a 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/Manifest +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/Manifest | |||
@@ -1,28 +1,28 @@ | |||
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 | ||
20 | mpih-add1.S | 20 | mpih-add1.S |
21 | mpih-mul1.S | 21 | mpih-mul1.S |
22 | mpih-mul2.S | 22 | mpih-mul2.S |
23 | mpih-mul3.S | 23 | mpih-mul3.S |
24 | mpih-lshift.S | 24 | mpih-lshift.S |
25 | mpih-rshift.S | 25 | mpih-rshift.S |
26 | mpih-sub1.S | 26 | mpih-sub1.S |
27 | syntax.h | 27 | syntax.h |
28 | $names$ iQCVAwUAP+LmOTEAnp832S/7AQJZmgQA1+GIl7rXiEY00y5xD2kG5Lm2QD6c9aBME8hTl812OEcj0ul/QSpdv8E2NEKooifr4SiLVhEVfLNaLqAgN3cIsttn3rRX3/pMC5JwSKHDJPsUbpN9tzb5dr2YC9GG9m8xngAQrN11IQPnGfvFLJK+oDnEMIAeHDpOnX9NeQPDAQA==bnOy | 28 | $names$ iQCVAwUAP+LmOTEAnp832S/7AQJZmgQA1+GIl7rXiEY00y5xD2kG5Lm2QD6c9aBME8hTl812OEcj0ul/QSpdv8E2NEKooifr4SiLVhEVfLNaLqAgN3cIsttn3rRX3/pMC5JwSKHDJPsUbpN9tzb5dr2YC9GG9m8xngAQrN11IQPnGfvFLJK+oDnEMIAeHDpOnX9NeQPDAQA==bnOy |
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/distfiles b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/distfiles index 480544d..22b9979 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/distfiles +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/distfiles | |||
@@ -1,10 +1,10 @@ | |||
1 | Manifest | 1 | Manifest |
2 | mpih-add1.S | 2 | mpih-add1.S |
3 | mpih-mul1.S | 3 | mpih-mul1.S |
4 | mpih-mul2.S | 4 | mpih-mul2.S |
5 | mpih-mul3.S | 5 | mpih-mul3.S |
6 | mpih-lshift.S | 6 | mpih-lshift.S |
7 | mpih-rshift.S | 7 | mpih-rshift.S |
8 | mpih-sub1.S | 8 | mpih-sub1.S |
9 | syntax.h | 9 | syntax.h |
10 | 10 | ||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-add1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-add1.S index 55375c4..652b232 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-add1.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-add1.S | |||
@@ -1,116 +1,116 @@ | |||
1 | /* i80386 add_n -- Add two limb vectors of the same length > 0 and store | 1 | /* i80386 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, 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_add_n( mpi_ptr_t res_ptr, (sp + 4) | 37 | * _gcry_mpih_add_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 | .text | 43 | .text |
44 | ALIGN (3) | 44 | ALIGN (3) |
45 | .globl C_SYMBOL_NAME(_gcry_mpih_add_n) | 45 | .globl C_SYMBOL_NAME(_gcry_mpih_add_n) |
46 | C_SYMBOL_NAME(_gcry_mpih_add_n:) | 46 | C_SYMBOL_NAME(_gcry_mpih_add_n:) |
47 | pushl %edi | 47 | pushl %edi |
48 | pushl %esi | 48 | pushl %esi |
49 | 49 | ||
50 | movl 12(%esp),%edi /* res_ptr */ | 50 | movl 12(%esp),%edi /* res_ptr */ |
51 | movl 16(%esp),%esi /* s1_ptr */ | 51 | movl 16(%esp),%esi /* s1_ptr */ |
52 | movl 20(%esp),%edx /* s2_ptr */ | 52 | movl 20(%esp),%edx /* s2_ptr */ |
53 | movl 24(%esp),%ecx /* size */ | 53 | movl 24(%esp),%ecx /* size */ |
54 | 54 | ||
55 | movl %ecx,%eax | 55 | movl %ecx,%eax |
56 | shrl $3,%ecx /* compute count for unrolled loop */ | 56 | shrl $3,%ecx /* compute count for unrolled loop */ |
57 | negl %eax | 57 | negl %eax |
58 | andl $7,%eax /* get index where to start loop */ | 58 | andl $7,%eax /* get index where to start loop */ |
59 | jz Loop /* necessary special case for 0 */ | 59 | jz Loop /* necessary special case for 0 */ |
60 | incl %ecx /* adjust loop count */ | 60 | incl %ecx /* adjust loop count */ |
61 | shll $2,%eax /* adjustment for pointers... */ | 61 | shll $2,%eax /* adjustment for pointers... */ |
62 | subl %eax,%edi /* ... since they are offset ... */ | 62 | subl %eax,%edi /* ... since they are offset ... */ |
63 | subl %eax,%esi /* ... by a constant when we ... */ | 63 | subl %eax,%esi /* ... by a constant when we ... */ |
64 | subl %eax,%edx /* ... enter the loop */ | 64 | subl %eax,%edx /* ... enter the loop */ |
65 | shrl $2,%eax /* restore previous value */ | 65 | shrl $2,%eax /* restore previous value */ |
66 | #ifdef PIC | 66 | #ifdef PIC |
67 | /* Calculate start address in loop for PIC. Due to limitations in some | 67 | /* Calculate start address in loop for PIC. Due to limitations in some |
68 | assemblers, Loop-L0-3 cannot be put into the leal */ | 68 | assemblers, Loop-L0-3 cannot be put into the leal */ |
69 | call L0 | 69 | call L0 |
70 | L0: leal (%eax,%eax,8),%eax | 70 | L0: leal (%eax,%eax,8),%eax |
71 | addl (%esp),%eax | 71 | addl (%esp),%eax |
72 | addl $(Loop-L0-3),%eax | 72 | addl $(Loop-L0-3),%eax |
73 | addl $4,%esp | 73 | addl $4,%esp |
74 | #else | 74 | #else |
75 | /* Calculate start address in loop for non-PIC. */ | 75 | /* Calculate start address in loop for non-PIC. */ |
76 | leal (Loop - 3)(%eax,%eax,8),%eax | 76 | leal (Loop - 3)(%eax,%eax,8),%eax |
77 | #endif | 77 | #endif |
78 | jmp *%eax /* jump into loop */ | 78 | jmp *%eax /* jump into loop */ |
79 | ALIGN (3) | 79 | ALIGN (3) |
80 | Loop: movl (%esi),%eax | 80 | Loop: movl (%esi),%eax |
81 | adcl (%edx),%eax | 81 | adcl (%edx),%eax |
82 | movl %eax,(%edi) | 82 | movl %eax,(%edi) |
83 | movl 4(%esi),%eax | 83 | movl 4(%esi),%eax |
84 | adcl 4(%edx),%eax | 84 | adcl 4(%edx),%eax |
85 | movl %eax,4(%edi) | 85 | movl %eax,4(%edi) |
86 | movl 8(%esi),%eax | 86 | movl 8(%esi),%eax |
87 | adcl 8(%edx),%eax | 87 | adcl 8(%edx),%eax |
88 | movl %eax,8(%edi) | 88 | movl %eax,8(%edi) |
89 | movl 12(%esi),%eax | 89 | movl 12(%esi),%eax |
90 | adcl 12(%edx),%eax | 90 | adcl 12(%edx),%eax |
91 | movl %eax,12(%edi) | 91 | movl %eax,12(%edi) |
92 | movl 16(%esi),%eax | 92 | movl 16(%esi),%eax |
93 | adcl 16(%edx),%eax | 93 | adcl 16(%edx),%eax |
94 | movl %eax,16(%edi) | 94 | movl %eax,16(%edi) |
95 | movl 20(%esi),%eax | 95 | movl 20(%esi),%eax |
96 | adcl 20(%edx),%eax | 96 | adcl 20(%edx),%eax |
97 | movl %eax,20(%edi) | 97 | movl %eax,20(%edi) |
98 | movl 24(%esi),%eax | 98 | movl 24(%esi),%eax |
99 | adcl 24(%edx),%eax | 99 | adcl 24(%edx),%eax |
100 | movl %eax,24(%edi) | 100 | movl %eax,24(%edi) |
101 | movl 28(%esi),%eax | 101 | movl 28(%esi),%eax |
102 | adcl 28(%edx),%eax | 102 | adcl 28(%edx),%eax |
103 | movl %eax,28(%edi) | 103 | movl %eax,28(%edi) |
104 | leal 32(%edi),%edi | 104 | leal 32(%edi),%edi |
105 | leal 32(%esi),%esi | 105 | leal 32(%esi),%esi |
106 | leal 32(%edx),%edx | 106 | leal 32(%edx),%edx |
107 | decl %ecx | 107 | decl %ecx |
108 | jnz Loop | 108 | jnz Loop |
109 | 109 | ||
110 | sbbl %eax,%eax | 110 | sbbl %eax,%eax |
111 | negl %eax | 111 | negl %eax |
112 | 112 | ||
113 | popl %esi | 113 | popl %esi |
114 | popl %edi | 114 | popl %edi |
115 | ret | 115 | ret |
116 | 116 | ||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-lshift.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-lshift.S index 1dc4c63..bf8ed9d 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-lshift.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-lshift.S | |||
@@ -1,94 +1,94 @@ | |||
1 | /* i80386 lshift | 1 | /* i80386 lshift |
2 | * Copyright (C) 1992, 1994, 1998, | 2 | * Copyright (C) 1992, 1994, 1998, |
3 | * 2001, 2002 Free Software Foundation, Inc. | 3 | * 2001, 2002 Free Software Foundation, Inc. |
4 | * | 4 | * |
5 | * This file is part of Libgcrypt. | 5 | * This file is part of Libgcrypt. |
6 | * | 6 | * |
7 | * Libgcrypt is free software; you can redistribute it and/or modify | 7 | * Libgcrypt is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU Lesser General Public License as | 8 | * it under the terms of the GNU Lesser General Public License as |
9 | * published by the Free Software Foundation; either version 2.1 of | 9 | * published by the Free Software Foundation; either version 2.1 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * Libgcrypt is distributed in the hope that it will be useful, | 12 | * Libgcrypt is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU Lesser General Public License for more details. | 15 | * GNU Lesser General Public License for more details. |
16 | * | 16 | * |
17 | * You should have received a copy of the GNU Lesser General Public | 17 | * You should have received a copy of the GNU Lesser General Public |
18 | * License along with this program; if not, write to the Free Software | 18 | * License along with this program; if not, write to the Free Software |
19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
20 | * | 20 | * |
21 | * Note: This code is heavily based on the GNU MP Library. | 21 | * Note: This code is heavily based on the GNU MP Library. |
22 | * Actually it's the same code with only minor changes in the | 22 | * Actually it's the same code with only minor changes in the |
23 | * way the data is stored; this is to support the abstraction | 23 | * way the data is stored; this is to support the abstraction |
24 | * of an optional secure memory allocation which may be used | 24 | * of an optional secure memory allocation which may be used |
25 | * to avoid revealing of sensitive data due to paging etc. | 25 | * to avoid revealing of sensitive data due to paging etc. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | 28 | ||
29 | #include "sysdep.h" | 29 | #include "sysdep.h" |
30 | #include "asm-syntax.h" | 30 | #include "asm-syntax.h" |
31 | 31 | ||
32 | 32 | ||
33 | /******************* | 33 | /******************* |
34 | * mpi_limb_t | 34 | * mpi_limb_t |
35 | * _gcry_mpih_lshift( mpi_ptr_t wp, (sp + 4) | 35 | * _gcry_mpih_lshift( mpi_ptr_t wp, (sp + 4) |
36 | * mpi_ptr_t up, (sp + 8) | 36 | * mpi_ptr_t up, (sp + 8) |
37 | * mpi_size_t usize, (sp + 12) | 37 | * mpi_size_t usize, (sp + 12) |
38 | * unsigned cnt) (sp + 16) | 38 | * unsigned cnt) (sp + 16) |
39 | */ | 39 | */ |
40 | 40 | ||
41 | .text | 41 | .text |
42 | ALIGN (3) | 42 | ALIGN (3) |
43 | .globl C_SYMBOL_NAME(_gcry_mpih_lshift) | 43 | .globl C_SYMBOL_NAME(_gcry_mpih_lshift) |
44 | C_SYMBOL_NAME(_gcry_mpih_lshift:) | 44 | C_SYMBOL_NAME(_gcry_mpih_lshift:) |
45 | pushl %edi | 45 | pushl %edi |
46 | pushl %esi | 46 | pushl %esi |
47 | pushl %ebx | 47 | pushl %ebx |
48 | 48 | ||
49 | movl 16(%esp),%edi /* res_ptr */ | 49 | movl 16(%esp),%edi /* res_ptr */ |
50 | movl 20(%esp),%esi /* s_ptr */ | 50 | movl 20(%esp),%esi /* s_ptr */ |
51 | movl 24(%esp),%edx /* size */ | 51 | movl 24(%esp),%edx /* size */ |
52 | movl 28(%esp),%ecx /* cnt */ | 52 | movl 28(%esp),%ecx /* cnt */ |
53 | 53 | ||
54 | subl $4,%esi /* adjust s_ptr */ | 54 | subl $4,%esi /* adjust s_ptr */ |
55 | 55 | ||
56 | movl (%esi,%edx,4),%ebx /* read most significant limb */ | 56 | movl (%esi,%edx,4),%ebx /* read most significant limb */ |
57 | xorl %eax,%eax | 57 | xorl %eax,%eax |
58 | shldl %cl,%ebx,%eax /* compute carry limb */ | 58 | shldl %cl,%ebx,%eax /* compute carry limb */ |
59 | decl %edx | 59 | decl %edx |
60 | jz Lend | 60 | jz Lend |
61 | pushl %eax /* push carry limb onto stack */ | 61 | pushl %eax /* push carry limb onto stack */ |
62 | testb $1,%dl | 62 | testb $1,%dl |
63 | jnz L1 /* enter loop in the middle */ | 63 | jnz L1 /* enter loop in the middle */ |
64 | movl %ebx,%eax | 64 | movl %ebx,%eax |
65 | 65 | ||
66 | ALIGN (3) | 66 | ALIGN (3) |
67 | Loop: movl (%esi,%edx,4),%ebx /* load next lower limb */ | 67 | Loop: movl (%esi,%edx,4),%ebx /* load next lower limb */ |
68 | shldl %cl,%ebx,%eax /* compute result limb */ | 68 | shldl %cl,%ebx,%eax /* compute result limb */ |
69 | movl %eax,(%edi,%edx,4) /* store it */ | 69 | movl %eax,(%edi,%edx,4) /* store it */ |
70 | decl %edx | 70 | decl %edx |
71 | L1: movl (%esi,%edx,4),%eax | 71 | L1: movl (%esi,%edx,4),%eax |
72 | shldl %cl,%eax,%ebx | 72 | shldl %cl,%eax,%ebx |
73 | movl %ebx,(%edi,%edx,4) | 73 | movl %ebx,(%edi,%edx,4) |
74 | decl %edx | 74 | decl %edx |
75 | jnz Loop | 75 | jnz Loop |
76 | 76 | ||
77 | shll %cl,%eax /* compute least significant limb */ | 77 | shll %cl,%eax /* compute least significant limb */ |
78 | movl %eax,(%edi) /* store it */ | 78 | movl %eax,(%edi) /* store it */ |
79 | 79 | ||
80 | popl %eax /* pop carry limb */ | 80 | popl %eax /* pop carry limb */ |
81 | 81 | ||
82 | popl %ebx | 82 | popl %ebx |
83 | popl %esi | 83 | popl %esi |
84 | popl %edi | 84 | popl %edi |
85 | ret | 85 | ret |
86 | 86 | ||
87 | Lend: shll %cl,%ebx /* compute least significant limb */ | 87 | Lend: shll %cl,%ebx /* compute least significant limb */ |
88 | movl %ebx,(%edi) /* store it */ | 88 | movl %ebx,(%edi) /* store it */ |
89 | 89 | ||
90 | popl %ebx | 90 | popl %ebx |
91 | popl %esi | 91 | popl %esi |
92 | popl %edi | 92 | popl %edi |
93 | ret | 93 | ret |
94 | 94 | ||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul1.S index ee93d58..c9760ef 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul1.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul1.S | |||
@@ -1,84 +1,84 @@ | |||
1 | /* i80386 mul_1 -- Multiply a limb vector with a limb and store | 1 | /* i80386 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 | * 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_mul_1( mpi_ptr_t res_ptr, (sp + 4) | 36 | * _gcry_mpih_mul_1( mpi_ptr_t res_ptr, (sp + 4) |
37 | * mpi_ptr_t s1_ptr, (sp + 8) | 37 | * mpi_ptr_t s1_ptr, (sp + 8) |
38 | * mpi_size_t s1_size, (sp + 12) | 38 | * mpi_size_t s1_size, (sp + 12) |
39 | * mpi_limb_t s2_limb) (sp + 16) | 39 | * mpi_limb_t s2_limb) (sp + 16) |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #define res_ptr edi | 42 | #define res_ptr edi |
43 | #define s1_ptr esi | 43 | #define s1_ptr esi |
44 | #define size ecx | 44 | #define size ecx |
45 | #define s2_limb ebp | 45 | #define s2_limb ebp |
46 | 46 | ||
47 | TEXT | 47 | TEXT |
48 | ALIGN (3) | 48 | ALIGN (3) |
49 | GLOBL C_SYMBOL_NAME(_gcry_mpih_mul_1) | 49 | GLOBL C_SYMBOL_NAME(_gcry_mpih_mul_1) |
50 | C_SYMBOL_NAME(_gcry_mpih_mul_1:) | 50 | C_SYMBOL_NAME(_gcry_mpih_mul_1:) |
51 | 51 | ||
52 | INSN1(push,l ,R(edi)) | 52 | INSN1(push,l ,R(edi)) |
53 | INSN1(push,l ,R(esi)) | 53 | INSN1(push,l ,R(esi)) |
54 | INSN1(push,l ,R(ebx)) | 54 | INSN1(push,l ,R(ebx)) |
55 | INSN1(push,l ,R(ebp)) | 55 | INSN1(push,l ,R(ebp)) |
56 | 56 | ||
57 | INSN2(mov,l ,R(res_ptr),MEM_DISP(esp,20)) | 57 | INSN2(mov,l ,R(res_ptr),MEM_DISP(esp,20)) |
58 | INSN2(mov,l ,R(s1_ptr),MEM_DISP(esp,24)) | 58 | INSN2(mov,l ,R(s1_ptr),MEM_DISP(esp,24)) |
59 | INSN2(mov,l ,R(size),MEM_DISP(esp,28)) | 59 | INSN2(mov,l ,R(size),MEM_DISP(esp,28)) |
60 | INSN2(mov,l ,R(s2_limb),MEM_DISP(esp,32)) | 60 | INSN2(mov,l ,R(s2_limb),MEM_DISP(esp,32)) |
61 | 61 | ||
62 | INSN2(lea,l ,R(res_ptr),MEM_INDEX(res_ptr,size,4)) | 62 | INSN2(lea,l ,R(res_ptr),MEM_INDEX(res_ptr,size,4)) |
63 | INSN2(lea,l ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4)) | 63 | INSN2(lea,l ,R(s1_ptr),MEM_INDEX(s1_ptr,size,4)) |
64 | INSN1(neg,l ,R(size)) | 64 | INSN1(neg,l ,R(size)) |
65 | INSN2(xor,l ,R(ebx),R(ebx)) | 65 | INSN2(xor,l ,R(ebx),R(ebx)) |
66 | ALIGN (3) | 66 | ALIGN (3) |
67 | Loop: | 67 | Loop: |
68 | INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4)) | 68 | INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4)) |
69 | INSN1(mul,l ,R(s2_limb)) | 69 | INSN1(mul,l ,R(s2_limb)) |
70 | INSN2(add,l ,R(eax),R(ebx)) | 70 | INSN2(add,l ,R(eax),R(ebx)) |
71 | INSN2(mov,l ,MEM_INDEX(res_ptr,size,4),R(eax)) | 71 | INSN2(mov,l ,MEM_INDEX(res_ptr,size,4),R(eax)) |
72 | INSN2(adc,l ,R(edx),$0) | 72 | INSN2(adc,l ,R(edx),$0) |
73 | INSN2(mov,l ,R(ebx),R(edx)) | 73 | INSN2(mov,l ,R(ebx),R(edx)) |
74 | 74 | ||
75 | INSN1(inc,l ,R(size)) | 75 | INSN1(inc,l ,R(size)) |
76 | INSN1(jnz, ,Loop) | 76 | INSN1(jnz, ,Loop) |
77 | INSN2(mov,l ,R(eax),R(ebx)) | 77 | INSN2(mov,l ,R(eax),R(ebx)) |
78 | 78 | ||
79 | INSN1(pop,l ,R(ebp)) | 79 | INSN1(pop,l ,R(ebp)) |
80 | INSN1(pop,l ,R(ebx)) | 80 | INSN1(pop,l ,R(ebx)) |
81 | INSN1(pop,l ,R(esi)) | 81 | INSN1(pop,l ,R(esi)) |
82 | INSN1(pop,l ,R(edi)) | 82 | INSN1(pop,l ,R(edi)) |
83 | ret | 83 | ret |
84 | 84 | ||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul2.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul2.S index 7547f0f..9794e11 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul2.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul2.S | |||
@@ -1,86 +1,86 @@ | |||
1 | /* i80386 addmul_1 -- Multiply a limb vector with a limb and add | 1 | /* i80386 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) |
51 | C_SYMBOL_NAME(_gcry_mpih_addmul_1:) | 51 | C_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 | Loop: | 68 | Loop: |
69 | INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4)) | 69 | INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4)) |
70 | INSN1(mul,l ,R(s2_limb)) | 70 | INSN1(mul,l ,R(s2_limb)) |
71 | INSN2(add,l ,R(eax),R(ebx)) | 71 | INSN2(add,l ,R(eax),R(ebx)) |
72 | INSN2(adc,l ,R(edx),$0) | 72 | INSN2(adc,l ,R(edx),$0) |
73 | INSN2(add,l ,MEM_INDEX(res_ptr,size,4),R(eax)) | 73 | INSN2(add,l ,MEM_INDEX(res_ptr,size,4),R(eax)) |
74 | INSN2(adc,l ,R(edx),$0) | 74 | INSN2(adc,l ,R(edx),$0) |
75 | INSN2(mov,l ,R(ebx),R(edx)) | 75 | INSN2(mov,l ,R(ebx),R(edx)) |
76 | 76 | ||
77 | INSN1(inc,l ,R(size)) | 77 | INSN1(inc,l ,R(size)) |
78 | INSN1(jnz, ,Loop) | 78 | INSN1(jnz, ,Loop) |
79 | INSN2(mov,l ,R(eax),R(ebx)) | 79 | INSN2(mov,l ,R(eax),R(ebx)) |
80 | 80 | ||
81 | INSN1(pop,l ,R(ebp)) | 81 | INSN1(pop,l ,R(ebp)) |
82 | INSN1(pop,l ,R(ebx)) | 82 | INSN1(pop,l ,R(ebx)) |
83 | INSN1(pop,l ,R(esi)) | 83 | INSN1(pop,l ,R(esi)) |
84 | INSN1(pop,l ,R(edi)) | 84 | INSN1(pop,l ,R(edi)) |
85 | ret | 85 | ret |
86 | 86 | ||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul3.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul3.S index 498052d..6df2017 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul3.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-mul3.S | |||
@@ -1,86 +1,86 @@ | |||
1 | /* i80386 submul_1 -- Multiply a limb vector with a limb and add | 1 | /* i80386 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) |
51 | C_SYMBOL_NAME(_gcry_mpih_submul_1:) | 51 | C_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 | Loop: | 68 | Loop: |
69 | INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4)) | 69 | INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4)) |
70 | INSN1(mul,l ,R(s2_limb)) | 70 | INSN1(mul,l ,R(s2_limb)) |
71 | INSN2(add,l ,R(eax),R(ebx)) | 71 | INSN2(add,l ,R(eax),R(ebx)) |
72 | INSN2(adc,l ,R(edx),$0) | 72 | INSN2(adc,l ,R(edx),$0) |
73 | INSN2(sub,l ,MEM_INDEX(res_ptr,size,4),R(eax)) | 73 | INSN2(sub,l ,MEM_INDEX(res_ptr,size,4),R(eax)) |
74 | INSN2(adc,l ,R(edx),$0) | 74 | INSN2(adc,l ,R(edx),$0) |
75 | INSN2(mov,l ,R(ebx),R(edx)) | 75 | INSN2(mov,l ,R(ebx),R(edx)) |
76 | 76 | ||
77 | INSN1(inc,l ,R(size)) | 77 | INSN1(inc,l ,R(size)) |
78 | INSN1(jnz, ,Loop) | 78 | INSN1(jnz, ,Loop) |
79 | INSN2(mov,l ,R(eax),R(ebx)) | 79 | INSN2(mov,l ,R(eax),R(ebx)) |
80 | 80 | ||
81 | INSN1(pop,l ,R(ebp)) | 81 | INSN1(pop,l ,R(ebp)) |
82 | INSN1(pop,l ,R(ebx)) | 82 | INSN1(pop,l ,R(ebx)) |
83 | INSN1(pop,l ,R(esi)) | 83 | INSN1(pop,l ,R(esi)) |
84 | INSN1(pop,l ,R(edi)) | 84 | INSN1(pop,l ,R(edi)) |
85 | ret | 85 | ret |
86 | 86 | ||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-rshift.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-rshift.S index 4956854..2920e55 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-rshift.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/mpih-rshift.S | |||
@@ -1,97 +1,97 @@ | |||
1 | /* i80386 rshift | 1 | /* i80386 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 | * mpi_limb_t | 35 | * mpi_limb_t |
36 | * _gcry_mpih_rshift( mpi_ptr_t wp, (sp + 4) | 36 | * _gcry_mpih_rshift( 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_rshift) | 44 | .globl C_SYMBOL_NAME(_gcry_mpih_rshift) |
45 | C_SYMBOL_NAME(_gcry_mpih_rshift:) | 45 | C_SYMBOL_NAME(_gcry_mpih_rshift:) |
46 | pushl %edi | 46 | pushl %edi |
47 | pushl %esi | 47 | pushl %esi |
48 | pushl %ebx | 48 | pushl %ebx |
49 | 49 | ||
50 | movl 16(%esp),%edi /* wp */ | 50 | movl 16(%esp),%edi /* wp */ |
51 | movl 20(%esp),%esi /* up */ | 51 | movl 20(%esp),%esi /* up */ |
52 | movl 24(%esp),%edx /* usize */ | 52 | movl 24(%esp),%edx /* usize */ |
53 | movl 28(%esp),%ecx /* cnt */ | 53 | movl 28(%esp),%ecx /* cnt */ |
54 | 54 | ||
55 | leal -4(%edi,%edx,4),%edi | 55 | leal -4(%edi,%edx,4),%edi |
56 | leal (%esi,%edx,4),%esi | 56 | leal (%esi,%edx,4),%esi |
57 | negl %edx | 57 | negl %edx |
58 | 58 | ||
59 | movl (%esi,%edx,4),%ebx /* read least significant limb */ | 59 | movl (%esi,%edx,4),%ebx /* read least significant limb */ |
60 | xorl %eax,%eax | 60 | xorl %eax,%eax |
61 | shrdl %cl,%ebx,%eax /* compute carry limb */ | 61 | shrdl %cl,%ebx,%eax /* compute carry limb */ |
62 | incl %edx | 62 | incl %edx |
63 | jz Lend2 | 63 | jz Lend2 |
64 | pushl %eax /* push carry limb onto stack */ | 64 | pushl %eax /* push carry limb onto stack */ |
65 | testb $1,%dl | 65 | testb $1,%dl |
66 | jnz L2 /* enter loop in the middle */ | 66 | jnz L2 /* enter loop in the middle */ |
67 | movl %ebx,%eax | 67 | movl %ebx,%eax |
68 | 68 | ||
69 | ALIGN (3) | 69 | ALIGN (3) |
70 | Loop2: movl (%esi,%edx,4),%ebx /* load next higher limb */ | 70 | Loop2: movl (%esi,%edx,4),%ebx /* load next higher limb */ |
71 | shrdl %cl,%ebx,%eax /* compute result limb */ | 71 | shrdl %cl,%ebx,%eax /* compute result limb */ |
72 | movl %eax,(%edi,%edx,4) /* store it */ | 72 | movl %eax,(%edi,%edx,4) /* store it */ |
73 | incl %edx | 73 | incl %edx |
74 | L2: movl (%esi,%edx,4),%eax | 74 | L2: movl (%esi,%edx,4),%eax |
75 | shrdl %cl,%eax,%ebx | 75 | shrdl %cl,%eax,%ebx |
76 | movl %ebx,(%edi,%edx,4) | 76 | movl %ebx,(%edi,%edx,4) |
77 | incl %edx | 77 | incl %edx |
78 | jnz Loop2 | 78 | jnz Loop2 |
79 | 79 | ||
80 | shrl %cl,%eax /* compute most significant limb */ | 80 | shrl %cl,%eax /* compute most significant limb */ |
81 | movl %eax,(%edi) /* store it */ | 81 | movl %eax,(%edi) /* store it */ |
82 | 82 | ||
83 | popl %eax /* pop carry limb */ | 83 | popl %eax /* pop carry limb */ |
84 | 84 | ||
85 | popl %ebx | 85 | popl %ebx |
86 | popl %esi | 86 | popl %esi |
87 | popl %edi | 87 | popl %edi |
88 | ret | 88 | ret |
89 | 89 | ||
90 | Lend2: shrl %cl,%ebx /* compute most significant limb */ | 90 | Lend2: shrl %cl,%ebx /* compute most significant limb */ |
91 | movl %ebx,(%edi) /* store it */ | 91 | movl %ebx,(%edi) /* store it */ |
92 | 92 | ||
93 | popl %ebx | 93 | popl %ebx |
94 | popl %esi | 94 | popl %esi |
95 | popl %edi | 95 | popl %edi |
96 | ret | 96 | ret |
97 | 97 | ||
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 | ||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/syntax.h b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/syntax.h index ef91ed7..39ede98 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/syntax.h +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/i386/syntax.h | |||
@@ -1,68 +1,68 @@ | |||
1 | /* syntax.h -- Definitions for x86 syntax variations. | 1 | /* syntax.h -- Definitions for x86 syntax variations. |
2 | * | 2 | * |
3 | * Copyright (C) 1992, 1994, 1995, 1998, | 3 | * Copyright (C) 1992, 1994, 1995, 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 | #undef ALIGN | 29 | #undef ALIGN |
30 | 30 | ||
31 | #if defined (BSD_SYNTAX) || defined (ELF_SYNTAX) | 31 | #if defined (BSD_SYNTAX) || defined (ELF_SYNTAX) |
32 | #define R(r) %r | 32 | #define R(r) %r |
33 | #define MEM(base)(base) | 33 | #define MEM(base)(base) |
34 | #define MEM_DISP(base,displacement)displacement(R(base)) | 34 | #define MEM_DISP(base,displacement)displacement(R(base)) |
35 | #define MEM_INDEX(base,index,size)(R(base),R(index),size) | 35 | #define MEM_INDEX(base,index,size)(R(base),R(index),size) |
36 | #ifdef __STDC__ | 36 | #ifdef __STDC__ |
37 | #define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst | 37 | #define INSN1(mnemonic,size_suffix,dst)mnemonic##size_suffix dst |
38 | #define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src,dst | 38 | #define INSN2(mnemonic,size_suffix,dst,src)mnemonic##size_suffix src,dst |
39 | #else | 39 | #else |
40 | #define INSN1(mnemonic,size_suffix,dst)mnemonic/**/size_suffix dst | 40 | #define INSN1(mnemonic,size_suffix,dst)mnemonic/**/size_suffix dst |
41 | #define INSN2(mnemonic,size_suffix,dst,src)mnemonic/**/size_suffix src,dst | 41 | #define INSN2(mnemonic,size_suffix,dst,src)mnemonic/**/size_suffix src,dst |
42 | #endif | 42 | #endif |
43 | #define TEXT .text | 43 | #define TEXT .text |
44 | #if defined (BSD_SYNTAX) | 44 | #if defined (BSD_SYNTAX) |
45 | #define ALIGN(log) .align log | 45 | #define ALIGN(log) .align log |
46 | #endif | 46 | #endif |
47 | #if defined (ELF_SYNTAX) | 47 | #if defined (ELF_SYNTAX) |
48 | #define ALIGN(log) .align 1<<(log) | 48 | #define ALIGN(log) .align 1<<(log) |
49 | #endif | 49 | #endif |
50 | #define GLOBL .globl | 50 | #define GLOBL .globl |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #ifdef INTEL_SYNTAX | 53 | #ifdef INTEL_SYNTAX |
54 | #define R(r) r | 54 | #define R(r) r |
55 | #define MEM(base)[base] | 55 | #define MEM(base)[base] |
56 | #define MEM_DISP(base,displacement)[base+(displacement)] | 56 | #define MEM_DISP(base,displacement)[base+(displacement)] |
57 | #define MEM_INDEX(base,index,size)[base+index*size] | 57 | #define MEM_INDEX(base,index,size)[base+index*size] |
58 | #define INSN1(mnemonic,size_suffix,dst)mnemonic dst | 58 | #define INSN1(mnemonic,size_suffix,dst)mnemonic dst |
59 | #define INSN2(mnemonic,size_suffix,dst,src)mnemonic dst,src | 59 | #define INSN2(mnemonic,size_suffix,dst,src)mnemonic dst,src |
60 | #define TEXT .text | 60 | #define TEXT .text |
61 | #define ALIGN(log) .align log | 61 | #define ALIGN(log) .align log |
62 | #define GLOBL .globl | 62 | #define GLOBL .globl |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | #ifdef X86_BROKEN_ALIGN | 65 | #ifdef X86_BROKEN_ALIGN |
66 | #undef ALIGN | 66 | #undef ALIGN |
67 | #define ALIGN(log) .align log,0x90 | 67 | #define ALIGN(log) .align log,0x90 |
68 | #endif | 68 | #endif |