diff options
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/sparc32/mpih-lshift.S')
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/sparc32/mpih-lshift.S | 194 |
1 files changed, 97 insertions, 97 deletions
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/sparc32/mpih-lshift.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/sparc32/mpih-lshift.S index 15460ca..3422ab0 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/sparc32/mpih-lshift.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/sparc32/mpih-lshift.S | |||
@@ -1,97 +1,97 @@ | |||
1 | /* sparc lshift | 1 | /* sparc lshift |
2 | * | 2 | * |
3 | * Copyright (C) 1995, 1996, 1998, | 3 | * Copyright (C) 1995, 1996, 1998, |
4 | * 2001, 2002 Free Software Foundation, Inc. | 4 | * 2001, 2002 Free Software Foundation, Inc. |
5 | * | 5 | * |
6 | * This file is part of Libgcrypt. | 6 | * This file is part of Libgcrypt. |
7 | * | 7 | * |
8 | * Libgcrypt is free software; you can redistribute it and/or modify | 8 | * Libgcrypt is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU Lesser General Public License as | 9 | * it under the terms of the GNU Lesser General Public License as |
10 | * published by the Free Software Foundation; either version 2.1 of | 10 | * published by the Free Software Foundation; either version 2.1 of |
11 | * the License, or (at your option) any later version. | 11 | * the License, or (at your option) any later version. |
12 | * | 12 | * |
13 | * Libgcrypt is distributed in the hope that it will be useful, | 13 | * Libgcrypt is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU Lesser General Public License for more details. | 16 | * GNU Lesser General Public License for more details. |
17 | * | 17 | * |
18 | * You should have received a copy of the GNU Lesser General Public | 18 | * You should have received a copy of the GNU Lesser General Public |
19 | * License along with this program; if not, write to the Free Software | 19 | * License along with this program; if not, write to the Free Software |
20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
21 | */ | 21 | */ |
22 | 22 | ||
23 | 23 | ||
24 | ! INPUT PARAMETERS | 24 | ! INPUT PARAMETERS |
25 | ! res_ptr %o0 | 25 | ! res_ptr %o0 |
26 | ! src_ptr %o1 | 26 | ! src_ptr %o1 |
27 | ! size %o2 | 27 | ! size %o2 |
28 | ! cnt %o3 | 28 | ! cnt %o3 |
29 | 29 | ||
30 | #include "sysdep.h" | 30 | #include "sysdep.h" |
31 | 31 | ||
32 | .text | 32 | .text |
33 | .align 4 | 33 | .align 4 |
34 | .global C_SYMBOL_NAME(_gcry_mpih_lshift) | 34 | .global C_SYMBOL_NAME(_gcry_mpih_lshift) |
35 | C_SYMBOL_NAME(_gcry_mpih_lshift): | 35 | C_SYMBOL_NAME(_gcry_mpih_lshift): |
36 | sll %o2,2,%g1 | 36 | sll %o2,2,%g1 |
37 | add %o1,%g1,%o1 ! make %o1 point at end of src | 37 | add %o1,%g1,%o1 ! make %o1 point at end of src |
38 | ld [%o1-4],%g2 ! load first limb | 38 | ld [%o1-4],%g2 ! load first limb |
39 | sub %g0,%o3,%o5 ! negate shift count | 39 | sub %g0,%o3,%o5 ! negate shift count |
40 | add %o0,%g1,%o0 ! make %o0 point at end of res | 40 | add %o0,%g1,%o0 ! make %o0 point at end of res |
41 | add %o2,-1,%o2 | 41 | add %o2,-1,%o2 |
42 | andcc %o2,4-1,%g4 ! number of limbs in first loop | 42 | andcc %o2,4-1,%g4 ! number of limbs in first loop |
43 | srl %g2,%o5,%g1 ! compute function result | 43 | srl %g2,%o5,%g1 ! compute function result |
44 | be L0 ! if multiple of 4 limbs, skip first loop | 44 | be L0 ! if multiple of 4 limbs, skip first loop |
45 | st %g1,[%sp+80] | 45 | st %g1,[%sp+80] |
46 | 46 | ||
47 | sub %o2,%g4,%o2 ! adjust count for main loop | 47 | sub %o2,%g4,%o2 ! adjust count for main loop |
48 | 48 | ||
49 | Loop0: ld [%o1-8],%g3 | 49 | Loop0: ld [%o1-8],%g3 |
50 | add %o0,-4,%o0 | 50 | add %o0,-4,%o0 |
51 | add %o1,-4,%o1 | 51 | add %o1,-4,%o1 |
52 | addcc %g4,-1,%g4 | 52 | addcc %g4,-1,%g4 |
53 | sll %g2,%o3,%o4 | 53 | sll %g2,%o3,%o4 |
54 | srl %g3,%o5,%g1 | 54 | srl %g3,%o5,%g1 |
55 | mov %g3,%g2 | 55 | mov %g3,%g2 |
56 | or %o4,%g1,%o4 | 56 | or %o4,%g1,%o4 |
57 | bne Loop0 | 57 | bne Loop0 |
58 | st %o4,[%o0+0] | 58 | st %o4,[%o0+0] |
59 | 59 | ||
60 | L0: tst %o2 | 60 | L0: tst %o2 |
61 | be Lend | 61 | be Lend |
62 | nop | 62 | nop |
63 | 63 | ||
64 | Loop: ld [%o1-8],%g3 | 64 | Loop: ld [%o1-8],%g3 |
65 | add %o0,-16,%o0 | 65 | add %o0,-16,%o0 |
66 | addcc %o2,-4,%o2 | 66 | addcc %o2,-4,%o2 |
67 | sll %g2,%o3,%o4 | 67 | sll %g2,%o3,%o4 |
68 | srl %g3,%o5,%g1 | 68 | srl %g3,%o5,%g1 |
69 | 69 | ||
70 | ld [%o1-12],%g2 | 70 | ld [%o1-12],%g2 |
71 | sll %g3,%o3,%g4 | 71 | sll %g3,%o3,%g4 |
72 | or %o4,%g1,%o4 | 72 | or %o4,%g1,%o4 |
73 | st %o4,[%o0+12] | 73 | st %o4,[%o0+12] |
74 | srl %g2,%o5,%g1 | 74 | srl %g2,%o5,%g1 |
75 | 75 | ||
76 | ld [%o1-16],%g3 | 76 | ld [%o1-16],%g3 |
77 | sll %g2,%o3,%o4 | 77 | sll %g2,%o3,%o4 |
78 | or %g4,%g1,%g4 | 78 | or %g4,%g1,%g4 |
79 | st %g4,[%o0+8] | 79 | st %g4,[%o0+8] |
80 | srl %g3,%o5,%g1 | 80 | srl %g3,%o5,%g1 |
81 | 81 | ||
82 | ld [%o1-20],%g2 | 82 | ld [%o1-20],%g2 |
83 | sll %g3,%o3,%g4 | 83 | sll %g3,%o3,%g4 |
84 | or %o4,%g1,%o4 | 84 | or %o4,%g1,%o4 |
85 | st %o4,[%o0+4] | 85 | st %o4,[%o0+4] |
86 | srl %g2,%o5,%g1 | 86 | srl %g2,%o5,%g1 |
87 | 87 | ||
88 | add %o1,-16,%o1 | 88 | add %o1,-16,%o1 |
89 | or %g4,%g1,%g4 | 89 | or %g4,%g1,%g4 |
90 | bne Loop | 90 | bne Loop |
91 | st %g4,[%o0+0] | 91 | st %g4,[%o0+0] |
92 | 92 | ||
93 | Lend: sll %g2,%o3,%g2 | 93 | Lend: sll %g2,%o3,%g2 |
94 | st %g2,[%o0-4] | 94 | st %g2,[%o0-4] |
95 | retl | 95 | retl |
96 | ld [%sp+80],%o0 | 96 | ld [%sp+80],%o0 |
97 | 97 | ||