diff options
Diffstat (limited to 'linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/power/mpih-mul3.S')
-rw-r--r--[-rwxr-xr-x] | linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/power/mpih-mul3.S | 270 |
1 files changed, 135 insertions, 135 deletions
diff --git a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/power/mpih-mul3.S b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/power/mpih-mul3.S index df3a2ed..8bc317b 100755..100644 --- a/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/power/mpih-mul3.S +++ b/linden/indra/libgcrypt/libgcrypt-1.2.2/mpi/power/mpih-mul3.S | |||
@@ -1,135 +1,135 @@ | |||
1 | /* IBM POWER submul_1 -- Multiply a limb vector with a limb and subtract | 1 | /* IBM POWER 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) 1992, 1994, 1999, 2002 Free Software Foundation, Inc. | 4 | * Copyright (C) 1992, 1994, 1999, 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 | /* | 27 | /* |
28 | 28 | ||
29 | # INPUT PARAMETERS | 29 | # INPUT PARAMETERS |
30 | # res_ptr r3 | 30 | # res_ptr r3 |
31 | # s1_ptr r4 | 31 | # s1_ptr r4 |
32 | # size r5 | 32 | # size r5 |
33 | # s2_limb r6 | 33 | # s2_limb r6 |
34 | 34 | ||
35 | # The RS/6000 has no unsigned 32x32->64 bit multiplication instruction. To | 35 | # The RS/6000 has no unsigned 32x32->64 bit multiplication instruction. To |
36 | # obtain that operation, we have to use the 32x32->64 signed multiplication | 36 | # obtain that operation, we have to use the 32x32->64 signed multiplication |
37 | # instruction, and add the appropriate compensation to the high limb of the | 37 | # instruction, and add the appropriate compensation to the high limb of the |
38 | # result. We add the multiplicand if the multiplier has its most significant | 38 | # result. We add the multiplicand if the multiplier has its most significant |
39 | # bit set, and we add the multiplier if the multiplicand has its most | 39 | # bit set, and we add the multiplier if the multiplicand has its most |
40 | # significant bit set. We need to preserve the carry flag between each | 40 | # significant bit set. We need to preserve the carry flag between each |
41 | # iteration, so we have to compute the compensation carefully (the natural, | 41 | # iteration, so we have to compute the compensation carefully (the natural, |
42 | # srai+and doesn't work). Since the POWER architecture has a branch unit | 42 | # srai+and doesn't work). Since the POWER architecture has a branch unit |
43 | # we can branch in zero cycles, so that's how we perform the additions. | 43 | # we can branch in zero cycles, so that's how we perform the additions. |
44 | */ | 44 | */ |
45 | 45 | ||
46 | .toc | 46 | .toc |
47 | .csect ._gcry_mpih_submul_1[PR] | 47 | .csect ._gcry_mpih_submul_1[PR] |
48 | .align 2 | 48 | .align 2 |
49 | .globl _gcry_mpih_submul_1 | 49 | .globl _gcry_mpih_submul_1 |
50 | .globl ._gcry_mpih_submul_1 | 50 | .globl ._gcry_mpih_submul_1 |
51 | .csect _gcry_mpih_submul_1[DS] | 51 | .csect _gcry_mpih_submul_1[DS] |
52 | _gcry_mpih_submul_1: | 52 | _gcry_mpih_submul_1: |
53 | .long ._gcry_mpih_submul_1[PR], TOC[tc0], 0 | 53 | .long ._gcry_mpih_submul_1[PR], TOC[tc0], 0 |
54 | .csect ._gcry_mpih_submul_1[PR] | 54 | .csect ._gcry_mpih_submul_1[PR] |
55 | ._gcry_mpih_submul_1: | 55 | ._gcry_mpih_submul_1: |
56 | 56 | ||
57 | cal 3,-4(3) | 57 | cal 3,-4(3) |
58 | l 0,0(4) | 58 | l 0,0(4) |
59 | cmpi 0,6,0 | 59 | cmpi 0,6,0 |
60 | mtctr 5 | 60 | mtctr 5 |
61 | mul 9,0,6 | 61 | mul 9,0,6 |
62 | srai 7,0,31 | 62 | srai 7,0,31 |
63 | and 7,7,6 | 63 | and 7,7,6 |
64 | mfmq 11 | 64 | mfmq 11 |
65 | cax 9,9,7 | 65 | cax 9,9,7 |
66 | l 7,4(3) | 66 | l 7,4(3) |
67 | sf 8,11,7 # add res_limb | 67 | sf 8,11,7 # add res_limb |
68 | a 11,8,11 # invert cy (r11 is junk) | 68 | a 11,8,11 # invert cy (r11 is junk) |
69 | blt Lneg | 69 | blt Lneg |
70 | Lpos: bdz Lend | 70 | Lpos: bdz Lend |
71 | 71 | ||
72 | Lploop: lu 0,4(4) | 72 | Lploop: lu 0,4(4) |
73 | stu 8,4(3) | 73 | stu 8,4(3) |
74 | cmpi 0,0,0 | 74 | cmpi 0,0,0 |
75 | mul 10,0,6 | 75 | mul 10,0,6 |
76 | mfmq 0 | 76 | mfmq 0 |
77 | ae 11,0,9 # low limb + old_cy_limb + old cy | 77 | ae 11,0,9 # low limb + old_cy_limb + old cy |
78 | l 7,4(3) | 78 | l 7,4(3) |
79 | aze 10,10 # propagate cy to new cy_limb | 79 | aze 10,10 # propagate cy to new cy_limb |
80 | sf 8,11,7 # add res_limb | 80 | sf 8,11,7 # add res_limb |
81 | a 11,8,11 # invert cy (r11 is junk) | 81 | a 11,8,11 # invert cy (r11 is junk) |
82 | bge Lp0 | 82 | bge Lp0 |
83 | cax 10,10,6 # adjust high limb for negative limb from s1 | 83 | cax 10,10,6 # adjust high limb for negative limb from s1 |
84 | Lp0: bdz Lend0 | 84 | Lp0: bdz Lend0 |
85 | lu 0,4(4) | 85 | lu 0,4(4) |
86 | stu 8,4(3) | 86 | stu 8,4(3) |
87 | cmpi 0,0,0 | 87 | cmpi 0,0,0 |
88 | mul 9,0,6 | 88 | mul 9,0,6 |
89 | mfmq 0 | 89 | mfmq 0 |
90 | ae 11,0,10 | 90 | ae 11,0,10 |
91 | l 7,4(3) | 91 | l 7,4(3) |
92 | aze 9,9 | 92 | aze 9,9 |
93 | sf 8,11,7 | 93 | sf 8,11,7 |
94 | a 11,8,11 # invert cy (r11 is junk) | 94 | a 11,8,11 # invert cy (r11 is junk) |
95 | bge Lp1 | 95 | bge Lp1 |
96 | cax 9,9,6 # adjust high limb for negative limb from s1 | 96 | cax 9,9,6 # adjust high limb for negative limb from s1 |
97 | Lp1: bdn Lploop | 97 | Lp1: bdn Lploop |
98 | 98 | ||
99 | b Lend | 99 | b Lend |
100 | 100 | ||
101 | Lneg: cax 9,9,0 | 101 | Lneg: cax 9,9,0 |
102 | bdz Lend | 102 | bdz Lend |
103 | Lnloop: lu 0,4(4) | 103 | Lnloop: lu 0,4(4) |
104 | stu 8,4(3) | 104 | stu 8,4(3) |
105 | cmpi 0,0,0 | 105 | cmpi 0,0,0 |
106 | mul 10,0,6 | 106 | mul 10,0,6 |
107 | mfmq 7 | 107 | mfmq 7 |
108 | ae 11,7,9 | 108 | ae 11,7,9 |
109 | l 7,4(3) | 109 | l 7,4(3) |
110 | ae 10,10,0 # propagate cy to new cy_limb | 110 | ae 10,10,0 # propagate cy to new cy_limb |
111 | sf 8,11,7 # add res_limb | 111 | sf 8,11,7 # add res_limb |
112 | a 11,8,11 # invert cy (r11 is junk) | 112 | a 11,8,11 # invert cy (r11 is junk) |
113 | bge Ln0 | 113 | bge Ln0 |
114 | cax 10,10,6 # adjust high limb for negative limb from s1 | 114 | cax 10,10,6 # adjust high limb for negative limb from s1 |
115 | Ln0: bdz Lend0 | 115 | Ln0: bdz Lend0 |
116 | lu 0,4(4) | 116 | lu 0,4(4) |
117 | stu 8,4(3) | 117 | stu 8,4(3) |
118 | cmpi 0,0,0 | 118 | cmpi 0,0,0 |
119 | mul 9,0,6 | 119 | mul 9,0,6 |
120 | mfmq 7 | 120 | mfmq 7 |
121 | ae 11,7,10 | 121 | ae 11,7,10 |
122 | l 7,4(3) | 122 | l 7,4(3) |
123 | ae 9,9,0 # propagate cy to new cy_limb | 123 | ae 9,9,0 # propagate cy to new cy_limb |
124 | sf 8,11,7 # add res_limb | 124 | sf 8,11,7 # add res_limb |
125 | a 11,8,11 # invert cy (r11 is junk) | 125 | a 11,8,11 # invert cy (r11 is junk) |
126 | bge Ln1 | 126 | bge Ln1 |
127 | cax 9,9,6 # adjust high limb for negative limb from s1 | 127 | cax 9,9,6 # adjust high limb for negative limb from s1 |
128 | Ln1: bdn Lnloop | 128 | Ln1: bdn Lnloop |
129 | b Lend | 129 | b Lend |
130 | 130 | ||
131 | Lend0: cal 9,0(10) | 131 | Lend0: cal 9,0(10) |
132 | Lend: st 8,4(3) | 132 | Lend: st 8,4(3) |
133 | aze 3,9 | 133 | aze 3,9 |
134 | br | 134 | br |
135 | 135 | ||