diff options
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32')
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/Manifest | 56 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/distfiles | 20 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-add1.S | 272 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-lshift.S | 396 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul1.S | 240 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul2.S | 254 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul3.S | 260 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-rshift.S | 262 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-sub1.S | 266 | ||||
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/syntax.h | 150 |
10 files changed, 1088 insertions, 1088 deletions
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/Manifest b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/Manifest index 239449b..26ab6ea 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/Manifest +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/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-sub1.S | 21 | mpih-sub1.S |
22 | mpih-mul1.S | 22 | mpih-mul1.S |
23 | mpih-mul2.S | 23 | mpih-mul2.S |
24 | mpih-mul3.S | 24 | mpih-mul3.S |
25 | mpih-lshift.S | 25 | mpih-lshift.S |
26 | mpih-rshift.S | 26 | mpih-rshift.S |
27 | syntax.h | 27 | syntax.h |
28 | $names$ iQCVAwUAP+LmYzEAnp832S/7AQI/cQP+Mcg9rF/c/bJTY48PE1/ARt7vCMtpIlv9alZSSSrU3WHzCtv9nVczFmwHU3DdKFawigY2DljQcK92dZ5ZlOfpFNMz4PKlVMWaKDk+jKlqm2dxvlHuqEvXPpjFAE2gHrhq5qLXS5ZHeMLJIEK84GYC6fjfLUMdZU3altXTUBvoXhA==Yax+ | 28 | $names$ iQCVAwUAP+LmYzEAnp832S/7AQI/cQP+Mcg9rF/c/bJTY48PE1/ARt7vCMtpIlv9alZSSSrU3WHzCtv9nVczFmwHU3DdKFawigY2DljQcK92dZ5ZlOfpFNMz4PKlVMWaKDk+jKlqm2dxvlHuqEvXPpjFAE2gHrhq5qLXS5ZHeMLJIEK84GYC6fjfLUMdZU3altXTUBvoXhA==Yax+ |
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/distfiles b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/distfiles index 923b110..a086614 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/distfiles +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/distfiles | |||
@@ -1,10 +1,10 @@ | |||
1 | Manifest | 1 | Manifest |
2 | mpih-add1.S | 2 | mpih-add1.S |
3 | mpih-sub1.S | 3 | mpih-sub1.S |
4 | mpih-mul1.S | 4 | mpih-mul1.S |
5 | mpih-mul2.S | 5 | mpih-mul2.S |
6 | mpih-mul3.S | 6 | mpih-mul3.S |
7 | mpih-lshift.S | 7 | mpih-lshift.S |
8 | mpih-rshift.S | 8 | mpih-rshift.S |
9 | syntax.h | 9 | syntax.h |
10 | 10 | ||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-add1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-add1.S index bfc2c01..1661f5e 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-add1.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-add1.S | |||
@@ -1,136 +1,136 @@ | |||
1 | /* PowerPC-32 add_n -- Add two limb vectors of equal, non-zero length. | 1 | /* PowerPC-32 add_n -- Add two limb vectors of equal, non-zero length. |
2 | * | 2 | * |
3 | * Copyright (C) 1992, 1994, 1995, 1998, 2002 Free Software Foundation, Inc. | 3 | * Copyright (C) 1992, 1994, 1995, 1998, 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 | 21 | ||
22 | #include "sysdep.h" | 22 | #include "sysdep.h" |
23 | #include "asm-syntax.h" | 23 | #include "asm-syntax.h" |
24 | 24 | ||
25 | 25 | ||
26 | #ifndef USE_PPC_PATCHES | 26 | #ifndef USE_PPC_PATCHES |
27 | 27 | ||
28 | /******************* | 28 | /******************* |
29 | * mpi_limb_t | 29 | * mpi_limb_t |
30 | * _gcry_mpih_add_n( mpi_ptr_t res_ptr, (r3) | 30 | * _gcry_mpih_add_n( mpi_ptr_t res_ptr, (r3) |
31 | * mpi_ptr_t s1_ptr, (r4) | 31 | * mpi_ptr_t s1_ptr, (r4) |
32 | * mpi_ptr_t s2_ptr, (r5) | 32 | * mpi_ptr_t s2_ptr, (r5) |
33 | * mpi_size_t size) (r6) | 33 | * mpi_size_t size) (r6) |
34 | */ | 34 | */ |
35 | 35 | ||
36 | .toc | 36 | .toc |
37 | .extern _gcry_mpih_add_n[DS] | 37 | .extern _gcry_mpih_add_n[DS] |
38 | .extern ._gcry_mpih_add_n | 38 | .extern ._gcry_mpih_add_n |
39 | .csect [PR] | 39 | .csect [PR] |
40 | .align 2 | 40 | .align 2 |
41 | .globl _gcry_mpih_add_n | 41 | .globl _gcry_mpih_add_n |
42 | .globl ._gcry_mpih_add_n | 42 | .globl ._gcry_mpih_add_n |
43 | .csect _gcry_mpih_add_n[DS] | 43 | .csect _gcry_mpih_add_n[DS] |
44 | _gcry_mpih_add_n: | 44 | _gcry_mpih_add_n: |
45 | .long ._gcry_mpih_add_n, TOC[tc0], 0 | 45 | .long ._gcry_mpih_add_n, TOC[tc0], 0 |
46 | .csect [PR] | 46 | .csect [PR] |
47 | ._gcry_mpih_add_n: | 47 | ._gcry_mpih_add_n: |
48 | mtctr 6 # copy size into CTR | 48 | mtctr 6 # copy size into CTR |
49 | lwz 8,0(4) # load least significant s1 limb | 49 | lwz 8,0(4) # load least significant s1 limb |
50 | lwz 0,0(5) # load least significant s2 limb | 50 | lwz 0,0(5) # load least significant s2 limb |
51 | addi 3,3,-4 # offset res_ptr, it is updated before used | 51 | addi 3,3,-4 # offset res_ptr, it is updated before used |
52 | addc 7,0,8 # add least significant limbs, set cy | 52 | addc 7,0,8 # add least significant limbs, set cy |
53 | bdz Lend # If done, skip loop | 53 | bdz Lend # If done, skip loop |
54 | Loop: lwzu 8,4(4) # load s1 limb and update s1_ptr | 54 | Loop: lwzu 8,4(4) # load s1 limb and update s1_ptr |
55 | lwzu 0,4(5) # load s2 limb and update s2_ptr | 55 | lwzu 0,4(5) # load s2 limb and update s2_ptr |
56 | stwu 7,4(3) # store previous limb in load latency slot | 56 | stwu 7,4(3) # store previous limb in load latency slot |
57 | adde 7,0,8 # add new limbs with cy, set cy | 57 | adde 7,0,8 # add new limbs with cy, set cy |
58 | bdnz Loop # decrement CTR and loop back | 58 | bdnz Loop # decrement CTR and loop back |
59 | Lend: stw 7,4(3) # store ultimate result limb | 59 | Lend: stw 7,4(3) # store ultimate result limb |
60 | li 3,0 # load cy into ... | 60 | li 3,0 # load cy into ... |
61 | addze 3,3 # ... return value register | 61 | addze 3,3 # ... return value register |
62 | blr | 62 | blr |
63 | 63 | ||
64 | #else | 64 | #else |
65 | /* Add two limb vectors of equal, non-zero length for PowerPC. | 65 | /* Add two limb vectors of equal, non-zero length for PowerPC. |
66 | Copyright (C) 1997 Free Software Foundation, Inc. | 66 | Copyright (C) 1997 Free Software Foundation, Inc. |
67 | This file is part of the GNU C Library. | 67 | This file is part of the GNU C Library. |
68 | 68 | ||
69 | The GNU C Library is free software; you can redistribute it and/or | 69 | The GNU C Library is free software; you can redistribute it and/or |
70 | modify it under the terms of the GNU Library General Public License as | 70 | modify it under the terms of the GNU Library General Public License as |
71 | published by the Free Software Foundation; either version 2 of the | 71 | published by the Free Software Foundation; either version 2 of the |
72 | License, or (at your option) any later version. | 72 | License, or (at your option) any later version. |
73 | 73 | ||
74 | The GNU C Library is distributed in the hope that it will be useful, | 74 | The GNU C Library is distributed in the hope that it will be useful, |
75 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 75 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
76 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 76 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
77 | Library General Public License for more details. | 77 | Library General Public License for more details. |
78 | 78 | ||
79 | You should have received a copy of the GNU Library General Public | 79 | You should have received a copy of the GNU Library General Public |
80 | License along with the GNU C Library; see the file COPYING.LIB. If not, | 80 | License along with the GNU C Library; see the file COPYING.LIB. If not, |
81 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 81 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
82 | Boston, MA 02111-1307, USA. */ | 82 | Boston, MA 02111-1307, USA. */ |
83 | 83 | ||
84 | #include "sysdep.h" | 84 | #include "sysdep.h" |
85 | #include "asm-syntax.h" | 85 | #include "asm-syntax.h" |
86 | 86 | ||
87 | 87 | ||
88 | /* mp_limb_t mpn_add_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, | 88 | /* mp_limb_t mpn_add_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, |
89 | mp_size_t size) | 89 | mp_size_t size) |
90 | Calculate s1+s2 and put result in res_ptr; return carry, 0 or 1. */ | 90 | Calculate s1+s2 and put result in res_ptr; return carry, 0 or 1. */ |
91 | 91 | ||
92 | /* Note on optimisation: This code is optimal for the 601. Almost every other | 92 | /* Note on optimisation: This code is optimal for the 601. Almost every other |
93 | possible 2-unrolled inner loop will not be. Also, watch out for the | 93 | possible 2-unrolled inner loop will not be. Also, watch out for the |
94 | alignment... */ | 94 | alignment... */ |
95 | 95 | ||
96 | EALIGN(_gcry_mpih_add_n,3,0) | 96 | EALIGN(_gcry_mpih_add_n,3,0) |
97 | /* Set up for loop below. */ | 97 | /* Set up for loop below. */ |
98 | mtcrf 0x01,%r6 | 98 | mtcrf 0x01,%r6 |
99 | srwi. %r7,%r6,1 | 99 | srwi. %r7,%r6,1 |
100 | li %r10,0 | 100 | li %r10,0 |
101 | mtctr %r7 | 101 | mtctr %r7 |
102 | bt 31,2f | 102 | bt 31,2f |
103 | 103 | ||
104 | /* Clear the carry. */ | 104 | /* Clear the carry. */ |
105 | addic %r0,%r0,0 | 105 | addic %r0,%r0,0 |
106 | /* Adjust pointers for loop. */ | 106 | /* Adjust pointers for loop. */ |
107 | addi %r3,%r3,-4 | 107 | addi %r3,%r3,-4 |
108 | addi %r4,%r4,-4 | 108 | addi %r4,%r4,-4 |
109 | addi %r5,%r5,-4 | 109 | addi %r5,%r5,-4 |
110 | b 0f | 110 | b 0f |
111 | 111 | ||
112 | 2: lwz %r7,0(%r5) | 112 | 2: lwz %r7,0(%r5) |
113 | lwz %r6,0(%r4) | 113 | lwz %r6,0(%r4) |
114 | addc %r6,%r6,%r7 | 114 | addc %r6,%r6,%r7 |
115 | stw %r6,0(%r3) | 115 | stw %r6,0(%r3) |
116 | beq 1f | 116 | beq 1f |
117 | 117 | ||
118 | /* The loop. */ | 118 | /* The loop. */ |
119 | 119 | ||
120 | /* Align start of loop to an odd word boundary to guarantee that the | 120 | /* Align start of loop to an odd word boundary to guarantee that the |
121 | last two words can be fetched in one access (for 601). */ | 121 | last two words can be fetched in one access (for 601). */ |
122 | 0: lwz %r9,4(%r4) | 122 | 0: lwz %r9,4(%r4) |
123 | lwz %r8,4(%r5) | 123 | lwz %r8,4(%r5) |
124 | lwzu %r6,8(%r4) | 124 | lwzu %r6,8(%r4) |
125 | lwzu %r7,8(%r5) | 125 | lwzu %r7,8(%r5) |
126 | adde %r8,%r9,%r8 | 126 | adde %r8,%r9,%r8 |
127 | stw %r8,4(%r3) | 127 | stw %r8,4(%r3) |
128 | adde %r6,%r6,%r7 | 128 | adde %r6,%r6,%r7 |
129 | stwu %r6,8(%r3) | 129 | stwu %r6,8(%r3) |
130 | bdnz 0b | 130 | bdnz 0b |
131 | /* Return the carry. */ | 131 | /* Return the carry. */ |
132 | 1: addze %r3,%r10 | 132 | 1: addze %r3,%r10 |
133 | blr | 133 | blr |
134 | END(_gcry_mpih_add_n) | 134 | END(_gcry_mpih_add_n) |
135 | #endif | 135 | #endif |
136 | 136 | ||
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-lshift.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-lshift.S index 013a350..6231095 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-lshift.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-lshift.S | |||
@@ -1,198 +1,198 @@ | |||
1 | /* PowerPC-32 lshift | 1 | /* PowerPC-32 lshift |
2 | * | 2 | * |
3 | * Copyright (C) 1995, 1998, 2002 Free Software Foundation, Inc. | 3 | * Copyright (C) 1995, 1998, 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 | 21 | ||
22 | #include "sysdep.h" | 22 | #include "sysdep.h" |
23 | #include "asm-syntax.h" | 23 | #include "asm-syntax.h" |
24 | 24 | ||
25 | 25 | ||
26 | #ifndef USE_PPC_PATCHES | 26 | #ifndef USE_PPC_PATCHES |
27 | 27 | ||
28 | /******************* | 28 | /******************* |
29 | * mpi_limb_t | 29 | * mpi_limb_t |
30 | * _gcry_mpih_lshift( mpi_ptr_t wp, (r3) | 30 | * _gcry_mpih_lshift( mpi_ptr_t wp, (r3) |
31 | * mpi_ptr_t up, (r4) | 31 | * mpi_ptr_t up, (r4) |
32 | * mpi_size_t usize, (r5) | 32 | * mpi_size_t usize, (r5) |
33 | * unsigned cnt) (r6) | 33 | * unsigned cnt) (r6) |
34 | */ | 34 | */ |
35 | 35 | ||
36 | .toc | 36 | .toc |
37 | .csect .text[PR] | 37 | .csect .text[PR] |
38 | .align 2 | 38 | .align 2 |
39 | .globl _gcry_mpih_lshift | 39 | .globl _gcry_mpih_lshift |
40 | .globl ._gcry_mpih_lshift | 40 | .globl ._gcry_mpih_lshift |
41 | .csect _gcry_mpih_lshift[DS] | 41 | .csect _gcry_mpih_lshift[DS] |
42 | _gcry_mpih_lshift: | 42 | _gcry_mpih_lshift: |
43 | .long ._gcry_mpih_lshift, TOC[tc0], 0 | 43 | .long ._gcry_mpih_lshift, TOC[tc0], 0 |
44 | .csect .text[PR] | 44 | .csect .text[PR] |
45 | ._gcry_mpih_lshift: | 45 | ._gcry_mpih_lshift: |
46 | mtctr 5 # copy size into CTR | 46 | mtctr 5 # copy size into CTR |
47 | slwi 0,5,2 | 47 | slwi 0,5,2 |
48 | add 7,3,0 # make r7 point at end of res | 48 | add 7,3,0 # make r7 point at end of res |
49 | add 4,4,0 # make r4 point at end of s1 | 49 | add 4,4,0 # make r4 point at end of s1 |
50 | subfic 8,6,32 | 50 | subfic 8,6,32 |
51 | lwzu 11,-4(4) # load first s1 limb | 51 | lwzu 11,-4(4) # load first s1 limb |
52 | srw 3,11,8 # compute function return value | 52 | srw 3,11,8 # compute function return value |
53 | bdz Lend1 | 53 | bdz Lend1 |
54 | 54 | ||
55 | Loop: lwzu 10,-4(4) | 55 | Loop: lwzu 10,-4(4) |
56 | slw 9,11,6 | 56 | slw 9,11,6 |
57 | srw 12,10,8 | 57 | srw 12,10,8 |
58 | or 9,9,12 | 58 | or 9,9,12 |
59 | stwu 9,-4(7) | 59 | stwu 9,-4(7) |
60 | bdz Lend2 | 60 | bdz Lend2 |
61 | lwzu 11,-4(4) | 61 | lwzu 11,-4(4) |
62 | slw 9,10,6 | 62 | slw 9,10,6 |
63 | srw 12,11,8 | 63 | srw 12,11,8 |
64 | or 9,9,12 | 64 | or 9,9,12 |
65 | stwu 9,-4(7) | 65 | stwu 9,-4(7) |
66 | bdnz Loop | 66 | bdnz Loop |
67 | 67 | ||
68 | Lend1: slw 0,11,6 | 68 | Lend1: slw 0,11,6 |
69 | stw 0,-4(7) | 69 | stw 0,-4(7) |
70 | blr | 70 | blr |
71 | 71 | ||
72 | Lend2: slw 0,10,6 | 72 | Lend2: slw 0,10,6 |
73 | stw 0,-4(7) | 73 | stw 0,-4(7) |
74 | blr | 74 | blr |
75 | 75 | ||
76 | #else | 76 | #else |
77 | /* Shift a limb left, low level routine. | 77 | /* Shift a limb left, low level routine. |
78 | Copyright (C) 1996, 1997 Free Software Foundation, Inc. | 78 | Copyright (C) 1996, 1997 Free Software Foundation, Inc. |
79 | This file is part of the GNU C Library. | 79 | This file is part of the GNU C Library. |
80 | 80 | ||
81 | The GNU C Library is free software; you can redistribute it and/or | 81 | The GNU C Library is free software; you can redistribute it and/or |
82 | modify it under the terms of the GNU Library General Public License as | 82 | modify it under the terms of the GNU Library General Public License as |
83 | published by the Free Software Foundation; either version 2 of the | 83 | published by the Free Software Foundation; either version 2 of the |
84 | License, or (at your option) any later version. | 84 | License, or (at your option) any later version. |
85 | 85 | ||
86 | The GNU C Library is distributed in the hope that it will be useful, | 86 | The GNU C Library is distributed in the hope that it will be useful, |
87 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 87 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
88 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 88 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
89 | Library General Public License for more details. | 89 | Library General Public License for more details. |
90 | 90 | ||
91 | You should have received a copy of the GNU Library General Public | 91 | You should have received a copy of the GNU Library General Public |
92 | License along with the GNU C Library; see the file COPYING.LIB. If not, | 92 | License along with the GNU C Library; see the file COPYING.LIB. If not, |
93 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 93 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
94 | Boston, MA 02111-1307, USA. */ | 94 | Boston, MA 02111-1307, USA. */ |
95 | 95 | ||
96 | /* mp_limb_t mpn_lshift (mp_ptr wp, mp_srcptr up, mp_size_t usize, | 96 | /* mp_limb_t mpn_lshift (mp_ptr wp, mp_srcptr up, mp_size_t usize, |
97 | unsigned int cnt) */ | 97 | unsigned int cnt) */ |
98 | 98 | ||
99 | EALIGN(_gcry_mpih_lshift,3,0) | 99 | EALIGN(_gcry_mpih_lshift,3,0) |
100 | mtctr %r5 # copy size into CTR | 100 | mtctr %r5 # copy size into CTR |
101 | cmplwi %cr0,%r5,16 # is size < 16 | 101 | cmplwi %cr0,%r5,16 # is size < 16 |
102 | slwi %r0,%r5,2 | 102 | slwi %r0,%r5,2 |
103 | add %r7,%r3,%r0 # make r7 point at end of res | 103 | add %r7,%r3,%r0 # make r7 point at end of res |
104 | add %r4,%r4,%r0 # make r4 point at end of s1 | 104 | add %r4,%r4,%r0 # make r4 point at end of s1 |
105 | lwzu %r11,-4(%r4) # load first s1 limb | 105 | lwzu %r11,-4(%r4) # load first s1 limb |
106 | subfic %r8,%r6,32 | 106 | subfic %r8,%r6,32 |
107 | srw %r3,%r11,%r8 # compute function return value | 107 | srw %r3,%r11,%r8 # compute function return value |
108 | bge %cr0,L(big) # branch if size >= 16 | 108 | bge %cr0,L(big) # branch if size >= 16 |
109 | 109 | ||
110 | bdz L(end1) | 110 | bdz L(end1) |
111 | 111 | ||
112 | 0: lwzu %r10,-4(%r4) | 112 | 0: lwzu %r10,-4(%r4) |
113 | slw %r9,%r11,%r6 | 113 | slw %r9,%r11,%r6 |
114 | srw %r12,%r10,%r8 | 114 | srw %r12,%r10,%r8 |
115 | or %r9,%r9,%r12 | 115 | or %r9,%r9,%r12 |
116 | stwu %r9,-4(%r7) | 116 | stwu %r9,-4(%r7) |
117 | bdz L(end2) | 117 | bdz L(end2) |
118 | lwzu %r11,-4(%r4) | 118 | lwzu %r11,-4(%r4) |
119 | slw %r9,%r10,%r6 | 119 | slw %r9,%r10,%r6 |
120 | srw %r12,%r11,%r8 | 120 | srw %r12,%r11,%r8 |
121 | or %r9,%r9,%r12 | 121 | or %r9,%r9,%r12 |
122 | stwu %r9,-4(%r7) | 122 | stwu %r9,-4(%r7) |
123 | bdnz 0b | 123 | bdnz 0b |
124 | 124 | ||
125 | L(end1):slw %r0,%r11,%r6 | 125 | L(end1):slw %r0,%r11,%r6 |
126 | stw %r0,-4(%r7) | 126 | stw %r0,-4(%r7) |
127 | blr | 127 | blr |
128 | 128 | ||
129 | 129 | ||
130 | /* Guaranteed not to succeed. */ | 130 | /* Guaranteed not to succeed. */ |
131 | L(boom): tweq %r0,%r0 | 131 | L(boom): tweq %r0,%r0 |
132 | 132 | ||
133 | /* We imitate a case statement, by using (yuk!) fixed-length code chunks, | 133 | /* We imitate a case statement, by using (yuk!) fixed-length code chunks, |
134 | of size 4*12 bytes. We have to do this (or something) to make this PIC. */ | 134 | of size 4*12 bytes. We have to do this (or something) to make this PIC. */ |
135 | L(big): mflr %r9 | 135 | L(big): mflr %r9 |
136 | bltl- %cr0,L(boom) # Never taken, only used to set LR. | 136 | bltl- %cr0,L(boom) # Never taken, only used to set LR. |
137 | slwi %r10,%r6,4 | 137 | slwi %r10,%r6,4 |
138 | mflr %r12 | 138 | mflr %r12 |
139 | add %r10,%r12,%r10 | 139 | add %r10,%r12,%r10 |
140 | slwi %r8,%r6,5 | 140 | slwi %r8,%r6,5 |
141 | add %r10,%r8,%r10 | 141 | add %r10,%r8,%r10 |
142 | mtctr %r10 | 142 | mtctr %r10 |
143 | addi %r5,%r5,-1 | 143 | addi %r5,%r5,-1 |
144 | mtlr %r9 | 144 | mtlr %r9 |
145 | bctr | 145 | bctr |
146 | 146 | ||
147 | L(end2):slw %r0,%r10,%r6 | 147 | L(end2):slw %r0,%r10,%r6 |
148 | stw %r0,-4(%r7) | 148 | stw %r0,-4(%r7) |
149 | blr | 149 | blr |
150 | 150 | ||
151 | #define DO_LSHIFT(n) \ | 151 | #define DO_LSHIFT(n) \ |
152 | mtctr %r5; \ | 152 | mtctr %r5; \ |
153 | 0: lwzu %r10,-4(%r4); \ | 153 | 0: lwzu %r10,-4(%r4); \ |
154 | slwi %r9,%r11,n; \ | 154 | slwi %r9,%r11,n; \ |
155 | inslwi %r9,%r10,n,32-n; \ | 155 | inslwi %r9,%r10,n,32-n; \ |
156 | stwu %r9,-4(%r7); \ | 156 | stwu %r9,-4(%r7); \ |
157 | bdz- L(end2); \ | 157 | bdz- L(end2); \ |
158 | lwzu %r11,-4(%r4); \ | 158 | lwzu %r11,-4(%r4); \ |
159 | slwi %r9,%r10,n; \ | 159 | slwi %r9,%r10,n; \ |
160 | inslwi %r9,%r11,n,32-n; \ | 160 | inslwi %r9,%r11,n,32-n; \ |
161 | stwu %r9,-4(%r7); \ | 161 | stwu %r9,-4(%r7); \ |
162 | bdnz 0b; \ | 162 | bdnz 0b; \ |
163 | b L(end1) | 163 | b L(end1) |
164 | 164 | ||
165 | DO_LSHIFT(1) | 165 | DO_LSHIFT(1) |
166 | DO_LSHIFT(2) | 166 | DO_LSHIFT(2) |
167 | DO_LSHIFT(3) | 167 | DO_LSHIFT(3) |
168 | DO_LSHIFT(4) | 168 | DO_LSHIFT(4) |
169 | DO_LSHIFT(5) | 169 | DO_LSHIFT(5) |
170 | DO_LSHIFT(6) | 170 | DO_LSHIFT(6) |
171 | DO_LSHIFT(7) | 171 | DO_LSHIFT(7) |
172 | DO_LSHIFT(8) | 172 | DO_LSHIFT(8) |
173 | DO_LSHIFT(9) | 173 | DO_LSHIFT(9) |
174 | DO_LSHIFT(10) | 174 | DO_LSHIFT(10) |
175 | DO_LSHIFT(11) | 175 | DO_LSHIFT(11) |
176 | DO_LSHIFT(12) | 176 | DO_LSHIFT(12) |
177 | DO_LSHIFT(13) | 177 | DO_LSHIFT(13) |
178 | DO_LSHIFT(14) | 178 | DO_LSHIFT(14) |
179 | DO_LSHIFT(15) | 179 | DO_LSHIFT(15) |
180 | DO_LSHIFT(16) | 180 | DO_LSHIFT(16) |
181 | DO_LSHIFT(17) | 181 | DO_LSHIFT(17) |
182 | DO_LSHIFT(18) | 182 | DO_LSHIFT(18) |
183 | DO_LSHIFT(19) | 183 | DO_LSHIFT(19) |
184 | DO_LSHIFT(20) | 184 | DO_LSHIFT(20) |
185 | DO_LSHIFT(21) | 185 | DO_LSHIFT(21) |
186 | DO_LSHIFT(22) | 186 | DO_LSHIFT(22) |
187 | DO_LSHIFT(23) | 187 | DO_LSHIFT(23) |
188 | DO_LSHIFT(24) | 188 | DO_LSHIFT(24) |
189 | DO_LSHIFT(25) | 189 | DO_LSHIFT(25) |
190 | DO_LSHIFT(26) | 190 | DO_LSHIFT(26) |
191 | DO_LSHIFT(27) | 191 | DO_LSHIFT(27) |
192 | DO_LSHIFT(28) | 192 | DO_LSHIFT(28) |
193 | DO_LSHIFT(29) | 193 | DO_LSHIFT(29) |
194 | DO_LSHIFT(30) | 194 | DO_LSHIFT(30) |
195 | DO_LSHIFT(31) | 195 | DO_LSHIFT(31) |
196 | 196 | ||
197 | END(_gcry_mpih_lshift) | 197 | END(_gcry_mpih_lshift) |
198 | #endif | 198 | #endif |
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul1.S index e34f521..bd418f7 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul1.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul1.S | |||
@@ -1,120 +1,120 @@ | |||
1 | /* PowerPC-32 mul_1 -- Multiply a limb vector with a limb and store | 1 | /* PowerPC-32 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, 1993, 1994, 1995, | 4 | * Copyright (C) 1992, 1993, 1994, 1995, |
5 | * 1998, 2002 Free Software Foundation, Inc. | 5 | * 1998, 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 | #include "sysdep.h" | 24 | #include "sysdep.h" |
25 | #include "asm-syntax.h" | 25 | #include "asm-syntax.h" |
26 | 26 | ||
27 | 27 | ||
28 | #ifndef USE_PPC_PATCHES | 28 | #ifndef USE_PPC_PATCHES |
29 | 29 | ||
30 | /******************* | 30 | /******************* |
31 | * mpi_limb_t | 31 | * mpi_limb_t |
32 | * _gcry_mpih_mul_1( mpi_ptr_t res_ptr, (r3) | 32 | * _gcry_mpih_mul_1( mpi_ptr_t res_ptr, (r3) |
33 | * mpi_ptr_t s1_ptr, (r4) | 33 | * mpi_ptr_t s1_ptr, (r4) |
34 | * mpi_size_t s1_size, (r5) | 34 | * mpi_size_t s1_size, (r5) |
35 | * mpi_limb_t s2_limb) (r6) | 35 | * mpi_limb_t s2_limb) (r6) |
36 | * | 36 | * |
37 | * This is a fairly straightforward implementation. The timing of the PC601 | 37 | * This is a fairly straightforward implementation. The timing of the PC601 |
38 | * is hard to understand, so I will wait to optimize this until I have some | 38 | * is hard to understand, so I will wait to optimize this until I have some |
39 | * hardware to play with. | 39 | * hardware to play with. |
40 | * | 40 | * |
41 | * The code trivially generalizes to 64 bit limbs for the PC620. | 41 | * The code trivially generalizes to 64 bit limbs for the PC620. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | .toc | 44 | .toc |
45 | .csect ._gcry_mpih_mul_1[PR] | 45 | .csect ._gcry_mpih_mul_1[PR] |
46 | .align 2 | 46 | .align 2 |
47 | .globl _gcry_mpih_mul_1 | 47 | .globl _gcry_mpih_mul_1 |
48 | .globl ._gcry_mpih_mul_1 | 48 | .globl ._gcry_mpih_mul_1 |
49 | .csect _gcry_mpih_mul_1[DS] | 49 | .csect _gcry_mpih_mul_1[DS] |
50 | _gcry_mpih_mul_1: | 50 | _gcry_mpih_mul_1: |
51 | .long ._gcry_mpih_mul_1[PR], TOC[tc0], 0 | 51 | .long ._gcry_mpih_mul_1[PR], TOC[tc0], 0 |
52 | .csect ._gcry_mpih_mul_1[PR] | 52 | .csect ._gcry_mpih_mul_1[PR] |
53 | ._gcry_mpih_mul_1: | 53 | ._gcry_mpih_mul_1: |
54 | mtctr 5 | 54 | mtctr 5 |
55 | 55 | ||
56 | lwz 0,0(4) | 56 | lwz 0,0(4) |
57 | mullw 7,0,6 | 57 | mullw 7,0,6 |
58 | mulhwu 10,0,6 | 58 | mulhwu 10,0,6 |
59 | addi 3,3,-4 # adjust res_ptr | 59 | addi 3,3,-4 # adjust res_ptr |
60 | addic 5,5,0 # clear cy with dummy insn | 60 | addic 5,5,0 # clear cy with dummy insn |
61 | bdz Lend | 61 | bdz Lend |
62 | 62 | ||
63 | Loop: lwzu 0,4(4) | 63 | Loop: lwzu 0,4(4) |
64 | stwu 7,4(3) | 64 | stwu 7,4(3) |
65 | mullw 8,0,6 | 65 | mullw 8,0,6 |
66 | adde 7,8,10 | 66 | adde 7,8,10 |
67 | mulhwu 10,0,6 | 67 | mulhwu 10,0,6 |
68 | bdnz Loop | 68 | bdnz Loop |
69 | 69 | ||
70 | Lend: stw 7,4(3) | 70 | Lend: stw 7,4(3) |
71 | addze 3,10 | 71 | addze 3,10 |
72 | blr | 72 | blr |
73 | 73 | ||
74 | #else | 74 | #else |
75 | /* Multiply a limb vector by a limb, for PowerPC. | 75 | /* Multiply a limb vector by a limb, for PowerPC. |
76 | Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. | 76 | Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. |
77 | This file is part of the GNU C Library. | 77 | This file is part of the GNU C Library. |
78 | 78 | ||
79 | The GNU C Library is free software; you can redistribute it and/or | 79 | The GNU C Library is free software; you can redistribute it and/or |
80 | modify it under the terms of the GNU Library General Public License as | 80 | modify it under the terms of the GNU Library General Public License as |
81 | published by the Free Software Foundation; either version 2 of the | 81 | published by the Free Software Foundation; either version 2 of the |
82 | License, or (at your option) any later version. | 82 | License, or (at your option) any later version. |
83 | 83 | ||
84 | The GNU C Library is distributed in the hope that it will be useful, | 84 | The GNU C Library is distributed in the hope that it will be useful, |
85 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 85 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
86 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 86 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
87 | Library General Public License for more details. | 87 | Library General Public License for more details. |
88 | 88 | ||
89 | You should have received a copy of the GNU Library General Public | 89 | You should have received a copy of the GNU Library General Public |
90 | License along with the GNU C Library; see the file COPYING.LIB. If not, | 90 | License along with the GNU C Library; see the file COPYING.LIB. If not, |
91 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 91 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
92 | Boston, MA 02111-1307, USA. */ | 92 | Boston, MA 02111-1307, USA. */ |
93 | 93 | ||
94 | 94 | ||
95 | /* mp_limb_t mpn_mul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, | 95 | /* mp_limb_t mpn_mul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, |
96 | mp_size_t s1_size, mp_limb_t s2_limb) | 96 | mp_size_t s1_size, mp_limb_t s2_limb) |
97 | Calculate s1*s2 and put result in res_ptr; return carry. */ | 97 | Calculate s1*s2 and put result in res_ptr; return carry. */ |
98 | 98 | ||
99 | ENTRY(_gcry_mpih_mul_1) | 99 | ENTRY(_gcry_mpih_mul_1) |
100 | mtctr %r5 | 100 | mtctr %r5 |
101 | 101 | ||
102 | lwz %r0,0(%r4) | 102 | lwz %r0,0(%r4) |
103 | mullw %r7,%r0,%r6 | 103 | mullw %r7,%r0,%r6 |
104 | mulhwu %r10,%r0,%r6 | 104 | mulhwu %r10,%r0,%r6 |
105 | addi %r3,%r3,-4 # adjust res_ptr | 105 | addi %r3,%r3,-4 # adjust res_ptr |
106 | addic %r5,%r5,0 # clear cy with dummy insn | 106 | addic %r5,%r5,0 # clear cy with dummy insn |
107 | bdz 1f | 107 | bdz 1f |
108 | 108 | ||
109 | 0: lwzu %r0,4(%r4) | 109 | 0: lwzu %r0,4(%r4) |
110 | stwu %r7,4(%r3) | 110 | stwu %r7,4(%r3) |
111 | mullw %r8,%r0,%r6 | 111 | mullw %r8,%r0,%r6 |
112 | adde %r7,%r8,%r10 | 112 | adde %r7,%r8,%r10 |
113 | mulhwu %r10,%r0,%r6 | 113 | mulhwu %r10,%r0,%r6 |
114 | bdnz 0b | 114 | bdnz 0b |
115 | 115 | ||
116 | 1: stw %r7,4(%r3) | 116 | 1: stw %r7,4(%r3) |
117 | addze %r3,%r10 | 117 | addze %r3,%r10 |
118 | blr | 118 | blr |
119 | END(_gcry_mpih_mul_1) | 119 | END(_gcry_mpih_mul_1) |
120 | #endif | 120 | #endif |
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul2.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul2.S index 1e1919b..1d97b81 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul2.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul2.S | |||
@@ -1,127 +1,127 @@ | |||
1 | /* PowerPC-32 addmul_1 -- Multiply a limb vector with a limb and add | 1 | /* PowerPC-32 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) 1995, 1998, 2002 Free Software Foundation, Inc. | 4 | * Copyright (C) 1995, 1998, 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 | 22 | ||
23 | #include "sysdep.h" | 23 | #include "sysdep.h" |
24 | #include "asm-syntax.h" | 24 | #include "asm-syntax.h" |
25 | 25 | ||
26 | 26 | ||
27 | #ifndef USE_PPC_PATCHES | 27 | #ifndef USE_PPC_PATCHES |
28 | 28 | ||
29 | /******************* | 29 | /******************* |
30 | * mpi_limb_t | 30 | * mpi_limb_t |
31 | * _gcry_mpih_addmul_1( mpi_ptr_t res_ptr, (r3) | 31 | * _gcry_mpih_addmul_1( mpi_ptr_t res_ptr, (r3) |
32 | * mpi_ptr_t s1_ptr, (r4) | 32 | * mpi_ptr_t s1_ptr, (r4) |
33 | * mpi_size_t s1_size, (r5) | 33 | * mpi_size_t s1_size, (r5) |
34 | * mpi_limb_t s2_limb) (r6) | 34 | * mpi_limb_t s2_limb) (r6) |
35 | * | 35 | * |
36 | * This is a fairly straightforward implementation. The timing of the PC601 | 36 | * This is a fairly straightforward implementation. The timing of the PC601 |
37 | * is hard to understand, so I will wait to optimize this until I have some | 37 | * is hard to understand, so I will wait to optimize this until I have some |
38 | * hardware to play with. | 38 | * hardware to play with. |
39 | * | 39 | * |
40 | * The code trivially generalizes to 64 bit limbs for the PC620. | 40 | * The code trivially generalizes to 64 bit limbs for the PC620. |
41 | */ | 41 | */ |
42 | 42 | ||
43 | 43 | ||
44 | .toc | 44 | .toc |
45 | .csect ._gcry_mpih_addmul_1[PR] | 45 | .csect ._gcry_mpih_addmul_1[PR] |
46 | .align 2 | 46 | .align 2 |
47 | .globl _gcry_mpih_addmul_1 | 47 | .globl _gcry_mpih_addmul_1 |
48 | .globl ._gcry_mpih_addmul_1 | 48 | .globl ._gcry_mpih_addmul_1 |
49 | .csect _gcry_mpih_addmul_1[DS] | 49 | .csect _gcry_mpih_addmul_1[DS] |
50 | _gcry_mpih_addmul_1: | 50 | _gcry_mpih_addmul_1: |
51 | .long ._gcry_mpih_addmul_1[PR], TOC[tc0], 0 | 51 | .long ._gcry_mpih_addmul_1[PR], TOC[tc0], 0 |
52 | .csect ._gcry_mpih_addmul_1[PR] | 52 | .csect ._gcry_mpih_addmul_1[PR] |
53 | ._gcry_mpih_addmul_1: | 53 | ._gcry_mpih_addmul_1: |
54 | mtctr 5 | 54 | mtctr 5 |
55 | 55 | ||
56 | lwz 0,0(4) | 56 | lwz 0,0(4) |
57 | mullw 7,0,6 | 57 | mullw 7,0,6 |
58 | mulhwu 10,0,6 | 58 | mulhwu 10,0,6 |
59 | lwz 9,0(3) | 59 | lwz 9,0(3) |
60 | addc 8,7,9 | 60 | addc 8,7,9 |
61 | addi 3,3,-4 | 61 | addi 3,3,-4 |
62 | bdz Lend | 62 | bdz Lend |
63 | 63 | ||
64 | Loop: lwzu 0,4(4) | 64 | Loop: lwzu 0,4(4) |
65 | stwu 8,4(3) | 65 | stwu 8,4(3) |
66 | mullw 8,0,6 | 66 | mullw 8,0,6 |
67 | adde 7,8,10 | 67 | adde 7,8,10 |
68 | mulhwu 10,0,6 | 68 | mulhwu 10,0,6 |
69 | lwz 9,4(3) | 69 | lwz 9,4(3) |
70 | addze 10,10 | 70 | addze 10,10 |
71 | addc 8,7,9 | 71 | addc 8,7,9 |
72 | bdnz Loop | 72 | bdnz Loop |
73 | 73 | ||
74 | Lend: stw 8,4(3) | 74 | Lend: stw 8,4(3) |
75 | addze 3,10 | 75 | addze 3,10 |
76 | blr | 76 | blr |
77 | 77 | ||
78 | #else | 78 | #else |
79 | /* Multiply a limb vector by a single limb, for PowerPC. | 79 | /* Multiply a limb vector by a single limb, for PowerPC. |
80 | Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. | 80 | Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. |
81 | This file is part of the GNU C Library. | 81 | This file is part of the GNU C Library. |
82 | 82 | ||
83 | The GNU C Library is free software; you can redistribute it and/or | 83 | The GNU C Library is free software; you can redistribute it and/or |
84 | modify it under the terms of the GNU Library General Public License as | 84 | modify it under the terms of the GNU Library General Public License as |
85 | published by the Free Software Foundation; either version 2 of the | 85 | published by the Free Software Foundation; either version 2 of the |
86 | License, or (at your option) any later version. | 86 | License, or (at your option) any later version. |
87 | 87 | ||
88 | The GNU C Library is distributed in the hope that it will be useful, | 88 | The GNU C Library is distributed in the hope that it will be useful, |
89 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 89 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
90 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 90 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
91 | Library General Public License for more details. | 91 | Library General Public License for more details. |
92 | 92 | ||
93 | You should have received a copy of the GNU Library General Public | 93 | You should have received a copy of the GNU Library General Public |
94 | License along with the GNU C Library; see the file COPYING.LIB. If not, | 94 | License along with the GNU C Library; see the file COPYING.LIB. If not, |
95 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 95 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
96 | Boston, MA 02111-1307, USA. */ | 96 | Boston, MA 02111-1307, USA. */ |
97 | 97 | ||
98 | 98 | ||
99 | /* mp_limb_t mpn_addmul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, | 99 | /* mp_limb_t mpn_addmul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, |
100 | mp_size_t s1_size, mp_limb_t s2_limb) | 100 | mp_size_t s1_size, mp_limb_t s2_limb) |
101 | Calculate res+s1*s2 and put result back in res; return carry. */ | 101 | Calculate res+s1*s2 and put result back in res; return carry. */ |
102 | ENTRY(_gcry_mpih_addmul_1) | 102 | ENTRY(_gcry_mpih_addmul_1) |
103 | mtctr %r5 | 103 | mtctr %r5 |
104 | 104 | ||
105 | lwz %r0,0(%r4) | 105 | lwz %r0,0(%r4) |
106 | mullw %r7,%r0,%r6 | 106 | mullw %r7,%r0,%r6 |
107 | mulhwu %r10,%r0,%r6 | 107 | mulhwu %r10,%r0,%r6 |
108 | lwz %r9,0(%r3) | 108 | lwz %r9,0(%r3) |
109 | addc %r8,%r7,%r9 | 109 | addc %r8,%r7,%r9 |
110 | addi %r3,%r3,-4 /* adjust res_ptr */ | 110 | addi %r3,%r3,-4 /* adjust res_ptr */ |
111 | bdz 1f | 111 | bdz 1f |
112 | 112 | ||
113 | 0: lwzu %r0,4(%r4) | 113 | 0: lwzu %r0,4(%r4) |
114 | stwu %r8,4(%r3) | 114 | stwu %r8,4(%r3) |
115 | mullw %r8,%r0,%r6 | 115 | mullw %r8,%r0,%r6 |
116 | adde %r7,%r8,%r10 | 116 | adde %r7,%r8,%r10 |
117 | mulhwu %r10,%r0,%r6 | 117 | mulhwu %r10,%r0,%r6 |
118 | lwz %r9,4(%r3) | 118 | lwz %r9,4(%r3) |
119 | addze %r10,%r10 | 119 | addze %r10,%r10 |
120 | addc %r8,%r7,%r9 | 120 | addc %r8,%r7,%r9 |
121 | bdnz 0b | 121 | bdnz 0b |
122 | 122 | ||
123 | 1: stw %r8,4(%r3) | 123 | 1: stw %r8,4(%r3) |
124 | addze %r3,%r10 | 124 | addze %r3,%r10 |
125 | blr | 125 | blr |
126 | END(_gcry_mpih_addmul_1) | 126 | END(_gcry_mpih_addmul_1) |
127 | #endif | 127 | #endif |
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul3.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul3.S index 3db9d7b..c410dbb 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul3.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul3.S | |||
@@ -1,130 +1,130 @@ | |||
1 | /* PowerPC-32 submul_1 -- Multiply a limb vector with a limb and subtract | 1 | /* PowerPC-32 submul_1 -- Multiply a limb vector with a limb and subtract |
2 | * the result from a second limb vector. | 2 | * the result from a second limb vector. |
3 | * | 3 | * |
4 | * Copyright (C) 1995, 1998, 2002 Free Software Foundation, Inc. | 4 | * Copyright (C) 1995, 1998, 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 | 22 | ||
23 | #include "sysdep.h" | 23 | #include "sysdep.h" |
24 | #include "asm-syntax.h" | 24 | #include "asm-syntax.h" |
25 | 25 | ||
26 | 26 | ||
27 | #ifndef USE_PPC_PATCHES | 27 | #ifndef USE_PPC_PATCHES |
28 | 28 | ||
29 | /******************* | 29 | /******************* |
30 | * mpi_limb_t | 30 | * mpi_limb_t |
31 | * _gcry_mpih_submul_1( mpi_ptr_t res_ptr, (r3) | 31 | * _gcry_mpih_submul_1( mpi_ptr_t res_ptr, (r3) |
32 | * mpi_ptr_t s1_ptr, (r4) | 32 | * mpi_ptr_t s1_ptr, (r4) |
33 | * mpi_size_t s1_size, (r5) | 33 | * mpi_size_t s1_size, (r5) |
34 | * mpi_limb_t s2_limb) (r6) | 34 | * mpi_limb_t s2_limb) (r6) |
35 | * | 35 | * |
36 | * This is a fairly straightforward implementation. The timing of the PC601 | 36 | * This is a fairly straightforward implementation. The timing of the PC601 |
37 | * is hard to understand, so I will wait to optimize this until I have some | 37 | * is hard to understand, so I will wait to optimize this until I have some |
38 | * hardware to play with. | 38 | * hardware to play with. |
39 | * | 39 | * |
40 | * The code trivially generalizes to 64 bit limbs for the PC620. | 40 | * The code trivially generalizes to 64 bit limbs for the PC620. |
41 | */ | 41 | */ |
42 | 42 | ||
43 | .toc | 43 | .toc |
44 | .csect ._gcry_mpih_submul_1[PR] | 44 | .csect ._gcry_mpih_submul_1[PR] |
45 | .align 2 | 45 | .align 2 |
46 | .globl _gcry_mpih_submul_1 | 46 | .globl _gcry_mpih_submul_1 |
47 | .globl ._gcry_mpih_submul_1 | 47 | .globl ._gcry_mpih_submul_1 |
48 | .csect _gcry_mpih_submul_1[DS] | 48 | .csect _gcry_mpih_submul_1[DS] |
49 | _gcry_mpih_submul_1: | 49 | _gcry_mpih_submul_1: |
50 | .long ._gcry_mpih_submul_1[PR], TOC[tc0], 0 | 50 | .long ._gcry_mpih_submul_1[PR], TOC[tc0], 0 |
51 | .csect ._gcry_mpih_submul_1[PR] | 51 | .csect ._gcry_mpih_submul_1[PR] |
52 | ._gcry_mpih_submul_1: | 52 | ._gcry_mpih_submul_1: |
53 | mtctr 5 | 53 | mtctr 5 |
54 | 54 | ||
55 | lwz 0,0(4) | 55 | lwz 0,0(4) |
56 | mullw 7,0,6 | 56 | mullw 7,0,6 |
57 | mulhwu 10,0,6 | 57 | mulhwu 10,0,6 |
58 | lwz 9,0(3) | 58 | lwz 9,0(3) |
59 | subfc 8,7,9 | 59 | subfc 8,7,9 |
60 | addc 7,7,8 # invert cy (r7 is junk) | 60 | addc 7,7,8 # invert cy (r7 is junk) |
61 | addi 3,3,-4 | 61 | addi 3,3,-4 |
62 | bdz Lend | 62 | bdz Lend |
63 | 63 | ||
64 | Loop: lwzu 0,4(4) | 64 | Loop: lwzu 0,4(4) |
65 | stwu 8,4(3) | 65 | stwu 8,4(3) |
66 | mullw 8,0,6 | 66 | mullw 8,0,6 |
67 | adde 7,8,10 | 67 | adde 7,8,10 |
68 | mulhwu 10,0,6 | 68 | mulhwu 10,0,6 |
69 | lwz 9,4(3) | 69 | lwz 9,4(3) |
70 | addze 10,10 | 70 | addze 10,10 |
71 | subfc 8,7,9 | 71 | subfc 8,7,9 |
72 | addc 7,7,8 # invert cy (r7 is junk) | 72 | addc 7,7,8 # invert cy (r7 is junk) |
73 | bdnz Loop | 73 | bdnz Loop |
74 | 74 | ||
75 | Lend: stw 8,4(3) | 75 | Lend: stw 8,4(3) |
76 | addze 3,10 | 76 | addze 3,10 |
77 | blr | 77 | blr |
78 | 78 | ||
79 | #else | 79 | #else |
80 | /* Multiply a limb vector by a single limb, for PowerPC. | 80 | /* Multiply a limb vector by a single limb, for PowerPC. |
81 | Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. | 81 | Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. |
82 | This file is part of the GNU C Library. | 82 | This file is part of the GNU C Library. |
83 | 83 | ||
84 | The GNU C Library is free software; you can redistribute it and/or | 84 | The GNU C Library is free software; you can redistribute it and/or |
85 | modify it under the terms of the GNU Library General Public License as | 85 | modify it under the terms of the GNU Library General Public License as |
86 | published by the Free Software Foundation; either version 2 of the | 86 | published by the Free Software Foundation; either version 2 of the |
87 | License, or (at your option) any later version. | 87 | License, or (at your option) any later version. |
88 | 88 | ||
89 | The GNU C Library is distributed in the hope that it will be useful, | 89 | The GNU C Library is distributed in the hope that it will be useful, |
90 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 90 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
91 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 91 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
92 | Library General Public License for more details. | 92 | Library General Public License for more details. |
93 | 93 | ||
94 | You should have received a copy of the GNU Library General Public | 94 | You should have received a copy of the GNU Library General Public |
95 | License along with the GNU C Library; see the file COPYING.LIB. If not, | 95 | License along with the GNU C Library; see the file COPYING.LIB. If not, |
96 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 96 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
97 | Boston, MA 02111-1307, USA. */ | 97 | Boston, MA 02111-1307, USA. */ |
98 | 98 | ||
99 | /* mp_limb_t mpn_submul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, | 99 | /* mp_limb_t mpn_submul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, |
100 | mp_size_t s1_size, mp_limb_t s2_limb) | 100 | mp_size_t s1_size, mp_limb_t s2_limb) |
101 | Calculate res-s1*s2 and put result back in res; return carry. */ | 101 | Calculate res-s1*s2 and put result back in res; return carry. */ |
102 | 102 | ||
103 | ENTRY(_gcry_mpih_submul_1) | 103 | ENTRY(_gcry_mpih_submul_1) |
104 | mtctr %r5 | 104 | mtctr %r5 |
105 | 105 | ||
106 | lwz %r0,0(%r4) | 106 | lwz %r0,0(%r4) |
107 | mullw %r7,%r0,%r6 | 107 | mullw %r7,%r0,%r6 |
108 | mulhwu %r10,%r0,%r6 | 108 | mulhwu %r10,%r0,%r6 |
109 | lwz %r9,0(%r3) | 109 | lwz %r9,0(%r3) |
110 | subf %r8,%r7,%r9 | 110 | subf %r8,%r7,%r9 |
111 | addc %r7,%r7,%r8 # invert cy (r7 is junk) | 111 | addc %r7,%r7,%r8 # invert cy (r7 is junk) |
112 | addi %r3,%r3,-4 # adjust res_ptr | 112 | addi %r3,%r3,-4 # adjust res_ptr |
113 | bdz 1f | 113 | bdz 1f |
114 | 114 | ||
115 | 0: lwzu %r0,4(%r4) | 115 | 0: lwzu %r0,4(%r4) |
116 | stwu %r8,4(%r3) | 116 | stwu %r8,4(%r3) |
117 | mullw %r8,%r0,%r6 | 117 | mullw %r8,%r0,%r6 |
118 | adde %r7,%r8,%r10 | 118 | adde %r7,%r8,%r10 |
119 | mulhwu %r10,%r0,%r6 | 119 | mulhwu %r10,%r0,%r6 |
120 | lwz %r9,4(%r3) | 120 | lwz %r9,4(%r3) |
121 | addze %r10,%r10 | 121 | addze %r10,%r10 |
122 | subf %r8,%r7,%r9 | 122 | subf %r8,%r7,%r9 |
123 | addc %r7,%r7,%r8 # invert cy (r7 is junk) | 123 | addc %r7,%r7,%r8 # invert cy (r7 is junk) |
124 | bdnz 0b | 124 | bdnz 0b |
125 | 125 | ||
126 | 1: stw %r8,4(%r3) | 126 | 1: stw %r8,4(%r3) |
127 | addze %r3,%r10 | 127 | addze %r3,%r10 |
128 | blr | 128 | blr |
129 | END(_gcry_mpih_submul_1) | 129 | END(_gcry_mpih_submul_1) |
130 | #endif | 130 | #endif |
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-rshift.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-rshift.S index 090d0b1..98349ed 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-rshift.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-rshift.S | |||
@@ -1,131 +1,131 @@ | |||
1 | /* PowerPC-32 rshift | 1 | /* PowerPC-32 rshift |
2 | * | 2 | * |
3 | * Copyright (C) 1995, 1998, 2002 Free Software Foundation, Inc. | 3 | * Copyright (C) 1995, 1998, 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 | 21 | ||
22 | 22 | ||
23 | #include "sysdep.h" | 23 | #include "sysdep.h" |
24 | #include "asm-syntax.h" | 24 | #include "asm-syntax.h" |
25 | 25 | ||
26 | 26 | ||
27 | #ifndef USE_PPC_PATCHES | 27 | #ifndef USE_PPC_PATCHES |
28 | 28 | ||
29 | /******************* | 29 | /******************* |
30 | * mpi_limb_t | 30 | * mpi_limb_t |
31 | * _gcry_mpih_rshift( mpi_ptr_t wp, (r3) | 31 | * _gcry_mpih_rshift( mpi_ptr_t wp, (r3) |
32 | * mpi_ptr_t up, (r4) | 32 | * mpi_ptr_t up, (r4) |
33 | * mpi_size_t usize, (r5) | 33 | * mpi_size_t usize, (r5) |
34 | * unsigned cnt) (r6) | 34 | * unsigned cnt) (r6) |
35 | */ | 35 | */ |
36 | 36 | ||
37 | .toc | 37 | .toc |
38 | .csect .text[PR] | 38 | .csect .text[PR] |
39 | .align 2 | 39 | .align 2 |
40 | .globl _gcry_mpih_rshift | 40 | .globl _gcry_mpih_rshift |
41 | .globl ._gcry_mpih_rshift | 41 | .globl ._gcry_mpih_rshift |
42 | .csect _gcry_mpih_rshift[DS] | 42 | .csect _gcry_mpih_rshift[DS] |
43 | _gcry_mpih_rshift: | 43 | _gcry_mpih_rshift: |
44 | .long ._gcry_mpih_rshift, TOC[tc0], 0 | 44 | .long ._gcry_mpih_rshift, TOC[tc0], 0 |
45 | .csect .text[PR] | 45 | .csect .text[PR] |
46 | ._gcry_mpih_rshift: | 46 | ._gcry_mpih_rshift: |
47 | mtctr 5 # copy size into CTR | 47 | mtctr 5 # copy size into CTR |
48 | addi 7,3,-4 # move adjusted res_ptr to free return reg | 48 | addi 7,3,-4 # move adjusted res_ptr to free return reg |
49 | subfic 8,6,32 | 49 | subfic 8,6,32 |
50 | lwz 11,0(4) # load first s1 limb | 50 | lwz 11,0(4) # load first s1 limb |
51 | slw 3,11,8 # compute function return value | 51 | slw 3,11,8 # compute function return value |
52 | bdz Lend1 | 52 | bdz Lend1 |
53 | 53 | ||
54 | Loop: lwzu 10,4(4) | 54 | Loop: lwzu 10,4(4) |
55 | srw 9,11,6 | 55 | srw 9,11,6 |
56 | slw 12,10,8 | 56 | slw 12,10,8 |
57 | or 9,9,12 | 57 | or 9,9,12 |
58 | stwu 9,4(7) | 58 | stwu 9,4(7) |
59 | bdz Lend2 | 59 | bdz Lend2 |
60 | lwzu 11,4(4) | 60 | lwzu 11,4(4) |
61 | srw 9,10,6 | 61 | srw 9,10,6 |
62 | slw 12,11,8 | 62 | slw 12,11,8 |
63 | or 9,9,12 | 63 | or 9,9,12 |
64 | stwu 9,4(7) | 64 | stwu 9,4(7) |
65 | bdnz Loop | 65 | bdnz Loop |
66 | 66 | ||
67 | Lend1: srw 0,11,6 | 67 | Lend1: srw 0,11,6 |
68 | stw 0,4(7) | 68 | stw 0,4(7) |
69 | blr | 69 | blr |
70 | 70 | ||
71 | Lend2: srw 0,10,6 | 71 | Lend2: srw 0,10,6 |
72 | stw 0,4(7) | 72 | stw 0,4(7) |
73 | blr | 73 | blr |
74 | 74 | ||
75 | #else | 75 | #else |
76 | /* Shift a limb right, low level routine. | 76 | /* Shift a limb right, low level routine. |
77 | Copyright (C) 1995, 1997 Free Software Foundation, Inc. | 77 | Copyright (C) 1995, 1997 Free Software Foundation, Inc. |
78 | This file is part of the GNU C Library. | 78 | This file is part of the GNU C Library. |
79 | 79 | ||
80 | The GNU C Library is free software; you can redistribute it and/or | 80 | The GNU C Library is free software; you can redistribute it and/or |
81 | modify it under the terms of the GNU Library General Public License as | 81 | modify it under the terms of the GNU Library General Public License as |
82 | published by the Free Software Foundation; either version 2 of the | 82 | published by the Free Software Foundation; either version 2 of the |
83 | License, or (at your option) any later version. | 83 | License, or (at your option) any later version. |
84 | 84 | ||
85 | The GNU C Library is distributed in the hope that it will be useful, | 85 | The GNU C Library is distributed in the hope that it will be useful, |
86 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 86 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
87 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 87 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
88 | Library General Public License for more details. | 88 | Library General Public License for more details. |
89 | 89 | ||
90 | You should have received a copy of the GNU Library General Public | 90 | You should have received a copy of the GNU Library General Public |
91 | License along with the GNU C Library; see the file COPYING.LIB. If not, | 91 | License along with the GNU C Library; see the file COPYING.LIB. If not, |
92 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 92 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
93 | Boston, MA 02111-1307, USA. */ | 93 | Boston, MA 02111-1307, USA. */ |
94 | 94 | ||
95 | 95 | ||
96 | /* INPUT PARAMETERS | 96 | /* INPUT PARAMETERS |
97 | res_ptr r3 | 97 | res_ptr r3 |
98 | s1_ptr r4 | 98 | s1_ptr r4 |
99 | size r5 | 99 | size r5 |
100 | cnt r6 */ | 100 | cnt r6 */ |
101 | 101 | ||
102 | ENTRY(_gcry_mpih_rshift) | 102 | ENTRY(_gcry_mpih_rshift) |
103 | mtctr 5 # copy size into CTR | 103 | mtctr 5 # copy size into CTR |
104 | addi 7,3,-4 # move adjusted res_ptr to free return reg | 104 | addi 7,3,-4 # move adjusted res_ptr to free return reg |
105 | subfic 8,6,32 | 105 | subfic 8,6,32 |
106 | lwz 11,0(4) # load first s1 limb | 106 | lwz 11,0(4) # load first s1 limb |
107 | slw 3,11,8 # compute function return value | 107 | slw 3,11,8 # compute function return value |
108 | bdz 1f | 108 | bdz 1f |
109 | 109 | ||
110 | 0: lwzu 10,4(4) | 110 | 0: lwzu 10,4(4) |
111 | srw 9,11,6 | 111 | srw 9,11,6 |
112 | slw 12,10,8 | 112 | slw 12,10,8 |
113 | or 9,9,12 | 113 | or 9,9,12 |
114 | stwu 9,4(7) | 114 | stwu 9,4(7) |
115 | bdz 2f | 115 | bdz 2f |
116 | lwzu 11,4(4) | 116 | lwzu 11,4(4) |
117 | srw 9,10,6 | 117 | srw 9,10,6 |
118 | slw 12,11,8 | 118 | slw 12,11,8 |
119 | or 9,9,12 | 119 | or 9,9,12 |
120 | stwu 9,4(7) | 120 | stwu 9,4(7) |
121 | bdnz 0b | 121 | bdnz 0b |
122 | 122 | ||
123 | 1: srw 0,11,6 | 123 | 1: srw 0,11,6 |
124 | stw 0,4(7) | 124 | stw 0,4(7) |
125 | blr | 125 | blr |
126 | 126 | ||
127 | 2: srw 0,10,6 | 127 | 2: srw 0,10,6 |
128 | stw 0,4(7) | 128 | stw 0,4(7) |
129 | blr | 129 | blr |
130 | END(_gcry_mpih_rshift) | 130 | END(_gcry_mpih_rshift) |
131 | #endif | 131 | #endif |
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-sub1.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-sub1.S index 0bee869..d612ea8 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-sub1.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-sub1.S | |||
@@ -1,133 +1,133 @@ | |||
1 | /* PowerPC-32 sub_n -- Subtract two limb vectors of the same length > 0 | 1 | /* PowerPC-32 sub_n -- Subtract two limb vectors of the same length > 0 |
2 | * and store difference in a third limb vector. | 2 | * and store difference in a third limb vector. |
3 | * | 3 | * |
4 | * Copyright (C) 1992, 1994, 1995, 1998, | 4 | * Copyright (C) 1992, 1994, 1995, 1998, |
5 | * 2002 Free Software Foundation, Inc. | 5 | * 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 | #include "sysdep.h" | 24 | #include "sysdep.h" |
25 | #include "asm-syntax.h" | 25 | #include "asm-syntax.h" |
26 | 26 | ||
27 | 27 | ||
28 | #ifndef USE_PPC_PATCHES | 28 | #ifndef USE_PPC_PATCHES |
29 | 29 | ||
30 | /******************* | 30 | /******************* |
31 | * mpi_limb_t | 31 | * mpi_limb_t |
32 | * _gcry_mpih_sub_n( mpi_ptr_t res_ptr, (r3) | 32 | * _gcry_mpih_sub_n( mpi_ptr_t res_ptr, (r3) |
33 | * mpi_ptr_t s1_ptr, (r4) | 33 | * mpi_ptr_t s1_ptr, (r4) |
34 | * mpi_ptr_t s2_ptr, (r5) | 34 | * mpi_ptr_t s2_ptr, (r5) |
35 | * mpi_size_t size) (r6) | 35 | * mpi_size_t size) (r6) |
36 | */ | 36 | */ |
37 | 37 | ||
38 | .toc | 38 | .toc |
39 | .extern _gcry_mpih_sub_n[DS] | 39 | .extern _gcry_mpih_sub_n[DS] |
40 | .extern ._gcry_mpih_sub_n | 40 | .extern ._gcry_mpih_sub_n |
41 | .csect [PR] | 41 | .csect [PR] |
42 | .align 2 | 42 | .align 2 |
43 | .globl _gcry_mpih_sub_n | 43 | .globl _gcry_mpih_sub_n |
44 | .globl ._gcry_mpih_sub_n | 44 | .globl ._gcry_mpih_sub_n |
45 | .csect _gcry_mpih_sub_n[DS] | 45 | .csect _gcry_mpih_sub_n[DS] |
46 | _gcry_mpih_sub_n: | 46 | _gcry_mpih_sub_n: |
47 | .long ._gcry_mpih_sub_n, TOC[tc0], 0 | 47 | .long ._gcry_mpih_sub_n, TOC[tc0], 0 |
48 | .csect [PR] | 48 | .csect [PR] |
49 | ._gcry_mpih_sub_n: | 49 | ._gcry_mpih_sub_n: |
50 | mtctr 6 # copy size into CTR | 50 | mtctr 6 # copy size into CTR |
51 | lwz 8,0(4) # load least significant s1 limb | 51 | lwz 8,0(4) # load least significant s1 limb |
52 | lwz 0,0(5) # load least significant s2 limb | 52 | lwz 0,0(5) # load least significant s2 limb |
53 | addi 3,3,-4 # offset res_ptr, it is updated before used | 53 | addi 3,3,-4 # offset res_ptr, it is updated before used |
54 | subfc 7,0,8 # add least significant limbs, set cy | 54 | subfc 7,0,8 # add least significant limbs, set cy |
55 | bdz Lend # If done, skip loop | 55 | bdz Lend # If done, skip loop |
56 | Loop: lwzu 8,4(4) # load s1 limb and update s1_ptr | 56 | Loop: lwzu 8,4(4) # load s1 limb and update s1_ptr |
57 | lwzu 0,4(5) # load s2 limb and update s2_ptr | 57 | lwzu 0,4(5) # load s2 limb and update s2_ptr |
58 | stwu 7,4(3) # store previous limb in load latency slot | 58 | stwu 7,4(3) # store previous limb in load latency slot |
59 | subfe 7,0,8 # add new limbs with cy, set cy | 59 | subfe 7,0,8 # add new limbs with cy, set cy |
60 | bdnz Loop # decrement CTR and loop back | 60 | bdnz Loop # decrement CTR and loop back |
61 | Lend: stw 7,4(3) # store ultimate result limb | 61 | Lend: stw 7,4(3) # store ultimate result limb |
62 | subfe 3,0,0 # load !cy into ... | 62 | subfe 3,0,0 # load !cy into ... |
63 | subfic 3,3,0 # ... return value register | 63 | subfic 3,3,0 # ... return value register |
64 | blr | 64 | blr |
65 | 65 | ||
66 | #else | 66 | #else |
67 | /* Subtract two limb vectors of equal, non-zero length for PowerPC. | 67 | /* Subtract two limb vectors of equal, non-zero length for PowerPC. |
68 | Copyright (C) 1997 Free Software Foundation, Inc. | 68 | Copyright (C) 1997 Free Software Foundation, Inc. |
69 | This file is part of the GNU C Library. | 69 | This file is part of the GNU C Library. |
70 | 70 | ||
71 | The GNU C Library is free software; you can redistribute it and/or | 71 | The GNU C Library is free software; you can redistribute it and/or |
72 | modify it under the terms of the GNU Library General Public License as | 72 | modify it under the terms of the GNU Library General Public License as |
73 | published by the Free Software Foundation; either version 2 of the | 73 | published by the Free Software Foundation; either version 2 of the |
74 | License, or (at your option) any later version. | 74 | License, or (at your option) any later version. |
75 | 75 | ||
76 | The GNU C Library is distributed in the hope that it will be useful, | 76 | The GNU C Library is distributed in the hope that it will be useful, |
77 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 77 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
78 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 78 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
79 | Library General Public License for more details. | 79 | Library General Public License for more details. |
80 | 80 | ||
81 | You should have received a copy of the GNU Library General Public | 81 | You should have received a copy of the GNU Library General Public |
82 | License along with the GNU C Library; see the file COPYING.LIB. If not, | 82 | License along with the GNU C Library; see the file COPYING.LIB. If not, |
83 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 83 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
84 | Boston, MA 02111-1307, USA. */ | 84 | Boston, MA 02111-1307, USA. */ |
85 | 85 | ||
86 | /* mp_limb_t mpn_sub_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, | 86 | /* mp_limb_t mpn_sub_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, |
87 | mp_size_t size) | 87 | mp_size_t size) |
88 | Calculate s1-s2 and put result in res_ptr; return borrow, 0 or 1. */ | 88 | Calculate s1-s2 and put result in res_ptr; return borrow, 0 or 1. */ |
89 | 89 | ||
90 | /* Note on optimisation: This code is optimal for the 601. Almost every other | 90 | /* Note on optimisation: This code is optimal for the 601. Almost every other |
91 | possible 2-unrolled inner loop will not be. Also, watch out for the | 91 | possible 2-unrolled inner loop will not be. Also, watch out for the |
92 | alignment... */ | 92 | alignment... */ |
93 | 93 | ||
94 | EALIGN(_gcry_mpih_sub_n,3,1) | 94 | EALIGN(_gcry_mpih_sub_n,3,1) |
95 | /* Set up for loop below. */ | 95 | /* Set up for loop below. */ |
96 | mtcrf 0x01,%r6 | 96 | mtcrf 0x01,%r6 |
97 | srwi. %r7,%r6,1 | 97 | srwi. %r7,%r6,1 |
98 | mtctr %r7 | 98 | mtctr %r7 |
99 | bt 31,2f | 99 | bt 31,2f |
100 | 100 | ||
101 | /* Set the carry (clear the borrow). */ | 101 | /* Set the carry (clear the borrow). */ |
102 | subfc %r0,%r0,%r0 | 102 | subfc %r0,%r0,%r0 |
103 | /* Adjust pointers for loop. */ | 103 | /* Adjust pointers for loop. */ |
104 | addi %r3,%r3,-4 | 104 | addi %r3,%r3,-4 |
105 | addi %r4,%r4,-4 | 105 | addi %r4,%r4,-4 |
106 | addi %r5,%r5,-4 | 106 | addi %r5,%r5,-4 |
107 | b 0f | 107 | b 0f |
108 | 108 | ||
109 | 2: lwz %r7,0(%r5) | 109 | 2: lwz %r7,0(%r5) |
110 | lwz %r6,0(%r4) | 110 | lwz %r6,0(%r4) |
111 | subfc %r6,%r7,%r6 | 111 | subfc %r6,%r7,%r6 |
112 | stw %r6,0(%r3) | 112 | stw %r6,0(%r3) |
113 | beq 1f | 113 | beq 1f |
114 | 114 | ||
115 | /* Align start of loop to an odd word boundary to guarantee that the | 115 | /* Align start of loop to an odd word boundary to guarantee that the |
116 | last two words can be fetched in one access (for 601). This turns | 116 | last two words can be fetched in one access (for 601). This turns |
117 | out to be important. */ | 117 | out to be important. */ |
118 | 0: | 118 | 0: |
119 | lwz %r9,4(%r4) | 119 | lwz %r9,4(%r4) |
120 | lwz %r8,4(%r5) | 120 | lwz %r8,4(%r5) |
121 | lwzu %r6,8(%r4) | 121 | lwzu %r6,8(%r4) |
122 | lwzu %r7,8(%r5) | 122 | lwzu %r7,8(%r5) |
123 | subfe %r8,%r8,%r9 | 123 | subfe %r8,%r8,%r9 |
124 | stw %r8,4(%r3) | 124 | stw %r8,4(%r3) |
125 | subfe %r6,%r7,%r6 | 125 | subfe %r6,%r7,%r6 |
126 | stwu %r6,8(%r3) | 126 | stwu %r6,8(%r3) |
127 | bdnz 0b | 127 | bdnz 0b |
128 | /* Return the borrow. */ | 128 | /* Return the borrow. */ |
129 | 1: subfe %r3,%r3,%r3 | 129 | 1: subfe %r3,%r3,%r3 |
130 | neg %r3,%r3 | 130 | neg %r3,%r3 |
131 | blr | 131 | blr |
132 | END(_gcry_mpih_sub_n) | 132 | END(_gcry_mpih_sub_n) |
133 | #endif | 133 | #endif |
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/syntax.h b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/syntax.h index 515190f..5d4af9f 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/syntax.h +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/syntax.h | |||
@@ -1,75 +1,75 @@ | |||
1 | /* gmp2-2.0.2-ppc/mpn/powerpc-linux/syntax.h Tue Oct 6 19:27:01 1998 */ | 1 | /* gmp2-2.0.2-ppc/mpn/powerpc-linux/syntax.h Tue Oct 6 19:27:01 1998 */ |
2 | /* From glibc's sysdeps/unix/sysv/linux/powerpc/sysdep.h */ | 2 | /* From glibc's sysdeps/unix/sysv/linux/powerpc/sysdep.h */ |
3 | 3 | ||
4 | /* Copyright (C) 1992, 1997, 1998 Free Software Foundation, Inc. | 4 | /* Copyright (C) 1992, 1997, 1998 Free Software Foundation, Inc. |
5 | This file is part of the GNU C Library. | 5 | This file is part of the GNU C Library. |
6 | 6 | ||
7 | The GNU C Library is free software; you can redistribute it and/or | 7 | The GNU C Library is free software; you can redistribute it and/or |
8 | modify it under the terms of the GNU Library General Public License as | 8 | modify it under the terms of the GNU Library General Public License as |
9 | published by the Free Software Foundation; either version 2 of the | 9 | published by the Free Software Foundation; either version 2 of the |
10 | License, or (at your option) any later version. | 10 | License, or (at your option) any later version. |
11 | 11 | ||
12 | The GNU C Library is distributed in the hope that it will be useful, | 12 | The GNU C Library 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 GNU | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | Library General Public License for more details. | 15 | Library General Public License for more details. |
16 | 16 | ||
17 | You should have received a copy of the GNU Library General Public | 17 | You should have received a copy of the GNU Library General Public |
18 | License along with the GNU C Library; see the file COPYING.LIB. If not, | 18 | License along with the GNU C Library; see the file COPYING.LIB. If not, |
19 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 19 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 | Boston, MA 02111-1307, USA. */ | 20 | Boston, MA 02111-1307, USA. */ |
21 | 21 | ||
22 | 22 | ||
23 | #define USE_PPC_PATCHES 1 | 23 | #define USE_PPC_PATCHES 1 |
24 | 24 | ||
25 | /* This seems to always be the case on PPC. */ | 25 | /* This seems to always be the case on PPC. */ |
26 | #define ALIGNARG(log2) log2 | 26 | #define ALIGNARG(log2) log2 |
27 | /* For ELF we need the `.type' directive to make shared libs work right. */ | 27 | /* For ELF we need the `.type' directive to make shared libs work right. */ |
28 | #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg; | 28 | #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg; |
29 | #define ASM_SIZE_DIRECTIVE(name) .size name,.-name | 29 | #define ASM_SIZE_DIRECTIVE(name) .size name,.-name |
30 | #define ASM_GLOBAL_DIRECTIVE .globl | 30 | #define ASM_GLOBAL_DIRECTIVE .globl |
31 | 31 | ||
32 | #ifdef __STDC__ | 32 | #ifdef __STDC__ |
33 | #define C_LABEL(name) C_SYMBOL_NAME(name)##: | 33 | #define C_LABEL(name) C_SYMBOL_NAME(name)##: |
34 | #else | 34 | #else |
35 | #define C_LABEL(name) C_SYMBOL_NAME(name)/**/: | 35 | #define C_LABEL(name) C_SYMBOL_NAME(name)/**/: |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #ifdef __STDC__ | 38 | #ifdef __STDC__ |
39 | #define L(body) .L##body | 39 | #define L(body) .L##body |
40 | #else | 40 | #else |
41 | #define L(body) .L/**/body | 41 | #define L(body) .L/**/body |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | /* No profiling of gmp's assembly for now... */ | 44 | /* No profiling of gmp's assembly for now... */ |
45 | #define CALL_MCOUNT /* no profiling */ | 45 | #define CALL_MCOUNT /* no profiling */ |
46 | 46 | ||
47 | #define ENTRY(name) \ | 47 | #define ENTRY(name) \ |
48 | ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ | 48 | ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ |
49 | ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ | 49 | ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ |
50 | .align ALIGNARG(2); \ | 50 | .align ALIGNARG(2); \ |
51 | C_LABEL(name) \ | 51 | C_LABEL(name) \ |
52 | CALL_MCOUNT | 52 | CALL_MCOUNT |
53 | 53 | ||
54 | #define EALIGN_W_0 /* No words to insert. */ | 54 | #define EALIGN_W_0 /* No words to insert. */ |
55 | #define EALIGN_W_1 nop | 55 | #define EALIGN_W_1 nop |
56 | #define EALIGN_W_2 nop;nop | 56 | #define EALIGN_W_2 nop;nop |
57 | #define EALIGN_W_3 nop;nop;nop | 57 | #define EALIGN_W_3 nop;nop;nop |
58 | #define EALIGN_W_4 EALIGN_W_3;nop | 58 | #define EALIGN_W_4 EALIGN_W_3;nop |
59 | #define EALIGN_W_5 EALIGN_W_4;nop | 59 | #define EALIGN_W_5 EALIGN_W_4;nop |
60 | #define EALIGN_W_6 EALIGN_W_5;nop | 60 | #define EALIGN_W_6 EALIGN_W_5;nop |
61 | #define EALIGN_W_7 EALIGN_W_6;nop | 61 | #define EALIGN_W_7 EALIGN_W_6;nop |
62 | 62 | ||
63 | /* EALIGN is like ENTRY, but does alignment to 'words'*4 bytes | 63 | /* EALIGN is like ENTRY, but does alignment to 'words'*4 bytes |
64 | past a 2^align boundary. */ | 64 | past a 2^align boundary. */ |
65 | #define EALIGN(name, alignt, words) \ | 65 | #define EALIGN(name, alignt, words) \ |
66 | ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ | 66 | ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \ |
67 | ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ | 67 | ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \ |
68 | .align ALIGNARG(alignt); \ | 68 | .align ALIGNARG(alignt); \ |
69 | EALIGN_W_##words; \ | 69 | EALIGN_W_##words; \ |
70 | C_LABEL(name) | 70 | C_LABEL(name) |
71 | 71 | ||
72 | #undef END | 72 | #undef END |
73 | #define END(name) \ | 73 | #define END(name) \ |
74 | ASM_SIZE_DIRECTIVE(name) | 74 | ASM_SIZE_DIRECTIVE(name) |
75 | 75 | ||