aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul3.S
diff options
context:
space:
mode:
authorDavid Walter Seikel2011-06-27 15:59:06 +1000
committerDavid Walter Seikel2011-06-27 15:59:06 +1000
commit92bd9b2503e7dd927f416cb9b17f169ea925fa56 (patch)
treef0f3776cfc0c6e6224db66f5678387c580095f16 /linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul3.S
parentMake use of the new packaging stuff from upstream. (diff)
downloadmeta-impy-92bd9b2503e7dd927f416cb9b17f169ea925fa56.zip
meta-impy-92bd9b2503e7dd927f416cb9b17f169ea925fa56.tar.gz
meta-impy-92bd9b2503e7dd927f416cb9b17f169ea925fa56.tar.bz2
meta-impy-92bd9b2503e7dd927f416cb9b17f169ea925fa56.tar.xz
Clean up line endings, execute bits, and other bits of errant nonsense from Windows.
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul3.S')
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-mul3.S260
1 files changed, 130 insertions, 130 deletions
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
64Loop: lwzu 0,4(4) 64Loop: 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
75Lend: stw 8,4(3) 75Lend: 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
103ENTRY(_gcry_mpih_submul_1) 103ENTRY(_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
1150: lwzu %r0,4(%r4) 1150: 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
1261: stw %r8,4(%r3) 1261: stw %r8,4(%r3)
127 addze %r3,%r10 127 addze %r3,%r10
128 blr 128 blr
129END(_gcry_mpih_submul_1) 129END(_gcry_mpih_submul_1)
130#endif 130#endif