diff options
author | David Walter Seikel | 2011-06-27 15:59:06 +1000 |
---|---|---|
committer | David Walter Seikel | 2011-06-27 15:59:06 +1000 |
commit | 92bd9b2503e7dd927f416cb9b17f169ea925fa56 (patch) | |
tree | f0f3776cfc0c6e6224db66f5678387c580095f16 /linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul1.S | |
parent | Make use of the new packaging stuff from upstream. (diff) | |
download | meta-impy-92bd9b2503e7dd927f416cb9b17f169ea925fa56.zip meta-impy-92bd9b2503e7dd927f416cb9b17f169ea925fa56.tar.gz meta-impy-92bd9b2503e7dd927f416cb9b17f169ea925fa56.tar.bz2 meta-impy-92bd9b2503e7dd927f416cb9b17f169ea925fa56.tar.xz |
Clean up line endings, execute bits, and other bits of errant nonsense from Windows.
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul1.S')
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul1.S | 240 |
1 files changed, 120 insertions, 120 deletions
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 |