aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-rshift.S
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-rshift.S')
-rw-r--r--[-rwxr-xr-x]linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/powerpc32/mpih-rshift.S262
1 files changed, 131 insertions, 131 deletions
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
54Loop: lwzu 10,4(4) 54Loop: 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
67Lend1: srw 0,11,6 67Lend1: srw 0,11,6
68 stw 0,4(7) 68 stw 0,4(7)
69 blr 69 blr
70 70
71Lend2: srw 0,10,6 71Lend2: 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
102ENTRY(_gcry_mpih_rshift) 102ENTRY(_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
1100: lwzu 10,4(4) 1100: 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
1231: srw 0,11,6 1231: srw 0,11,6
124 stw 0,4(7) 124 stw 0,4(7)
125 blr 125 blr
126 126
1272: srw 0,10,6 1272: srw 0,10,6
128 stw 0,4(7) 128 stw 0,4(7)
129 blr 129 blr
130END(_gcry_mpih_rshift) 130END(_gcry_mpih_rshift)
131#endif 131#endif