diff options
Diffstat (limited to 'src/lib/libcrypto/bn/asm')
-rw-r--r-- | src/lib/libcrypto/bn/asm/alpha.s | 1860 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/alpha.s.works | 533 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/bn-586.pl | 84 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/bn-alpha.pl | 571 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/bn-win32.asm | 1441 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/bn86unix.cpp | 752 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/ca.pl | 33 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/co-586.pl | 286 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/co-alpha.pl | 116 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/mips1.s | 539 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/mips3.s | 2138 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/sparc.s | 462 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/sparcv8.S | 1458 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/sparcv8plus.S | 1535 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/vms.mar | 6695 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/x86.pl | 28 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/x86w16.asm | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/bn/asm/x86w32.asm | 34 |
18 files changed, 17172 insertions, 1399 deletions
diff --git a/src/lib/libcrypto/bn/asm/alpha.s b/src/lib/libcrypto/bn/asm/alpha.s index 1d17b1d619..a351694ca2 100644 --- a/src/lib/libcrypto/bn/asm/alpha.s +++ b/src/lib/libcrypto/bn/asm/alpha.s | |||
@@ -1,8 +1,14 @@ | |||
1 | # DEC Alpha assember | 1 | # DEC Alpha assember |
2 | # The bn_div64 is actually gcc output but the other parts are hand done. | 2 | # The bn_div_words is actually gcc output but the other parts are hand done. |
3 | # Thanks to tzeruch@ceddec.com for sending me the gcc output for | 3 | # Thanks to tzeruch@ceddec.com for sending me the gcc output for |
4 | # bn_div64. | 4 | # bn_div_words. |
5 | .file 1 "bn_mulw.c" | 5 | # I've gone back and re-done most of routines. |
6 | # The key thing to remeber for the 164 CPU is that while a | ||
7 | # multiply operation takes 8 cycles, another one can only be issued | ||
8 | # after 4 cycles have elapsed. I've done modification to help | ||
9 | # improve this. Also, normally, a ld instruction will not be available | ||
10 | # for about 3 cycles. | ||
11 | .file 1 "bn_asm.c" | ||
6 | .set noat | 12 | .set noat |
7 | gcc2_compiled.: | 13 | gcc2_compiled.: |
8 | __gnu_compiled_c: | 14 | __gnu_compiled_c: |
@@ -14,65 +20,91 @@ bn_mul_add_words: | |||
14 | bn_mul_add_words..ng: | 20 | bn_mul_add_words..ng: |
15 | .frame $30,0,$26,0 | 21 | .frame $30,0,$26,0 |
16 | .prologue 0 | 22 | .prologue 0 |
17 | subq $18,2,$25 # num=-2 | ||
18 | bis $31,$31,$0 | ||
19 | blt $25,$42 | ||
20 | .align 5 | 23 | .align 5 |
21 | $142: | 24 | subq $18,4,$18 |
22 | subq $18,2,$18 # num-=2 | 25 | bis $31,$31,$0 |
23 | subq $25,2,$25 # num-=2 | 26 | blt $18,$43 # if we are -1, -2, -3 or -4 goto tail code |
24 | 27 | ldq $20,0($17) # 1 1 | |
25 | ldq $1,0($17) # a[0] | 28 | ldq $1,0($16) # 1 1 |
26 | ldq $2,8($17) # a[1] | 29 | .align 3 |
27 | 30 | $42: | |
28 | mulq $19,$1,$3 # a[0]*w low part r3 | 31 | mulq $20,$19,$5 # 1 2 1 ###### |
29 | umulh $19,$1,$1 # a[0]*w high part r1 | 32 | ldq $21,8($17) # 2 1 |
30 | mulq $19,$2,$4 # a[1]*w low part r4 | 33 | ldq $2,8($16) # 2 1 |
31 | umulh $19,$2,$2 # a[1]*w high part r2 | 34 | umulh $20,$19,$20 # 1 2 ###### |
32 | 35 | ldq $27,16($17) # 3 1 | |
33 | ldq $22,0($16) # r[0] r22 | 36 | ldq $3,16($16) # 3 1 |
34 | ldq $23,8($16) # r[1] r23 | 37 | mulq $21,$19,$6 # 2 2 1 ###### |
35 | 38 | ldq $28,24($17) # 4 1 | |
36 | addq $3,$22,$3 # a0 low part + r[0] | 39 | addq $1,$5,$1 # 1 2 2 |
37 | addq $4,$23,$4 # a1 low part + r[1] | 40 | ldq $4,24($16) # 4 1 |
38 | cmpult $3,$22,$5 # overflow? | 41 | umulh $21,$19,$21 # 2 2 ###### |
39 | cmpult $4,$23,$6 # overflow? | 42 | cmpult $1,$5,$22 # 1 2 3 1 |
40 | addq $5,$1,$1 # high part + overflow | 43 | addq $20,$22,$20 # 1 3 1 |
41 | addq $6,$2,$2 # high part + overflow | 44 | addq $1,$0,$1 # 1 2 3 1 |
42 | 45 | mulq $27,$19,$7 # 3 2 1 ###### | |
43 | addq $3,$0,$3 # add c | 46 | cmpult $1,$0,$0 # 1 2 3 2 |
44 | cmpult $3,$0,$5 # overflow? | 47 | addq $2,$6,$2 # 2 2 2 |
45 | stq $3,0($16) | 48 | addq $20,$0,$0 # 1 3 2 |
46 | addq $5,$1,$0 # c=high part + overflow | 49 | cmpult $2,$6,$23 # 2 2 3 1 |
47 | 50 | addq $21,$23,$21 # 2 3 1 | |
48 | addq $4,$0,$4 # add c | 51 | umulh $27,$19,$27 # 3 2 ###### |
49 | cmpult $4,$0,$5 # overflow? | 52 | addq $2,$0,$2 # 2 2 3 1 |
50 | stq $4,8($16) | 53 | cmpult $2,$0,$0 # 2 2 3 2 |
51 | addq $5,$2,$0 # c=high part + overflow | 54 | subq $18,4,$18 |
55 | mulq $28,$19,$8 # 4 2 1 ###### | ||
56 | addq $21,$0,$0 # 2 3 2 | ||
57 | addq $3,$7,$3 # 3 2 2 | ||
58 | addq $16,32,$16 | ||
59 | cmpult $3,$7,$24 # 3 2 3 1 | ||
60 | stq $1,-32($16) # 1 2 4 | ||
61 | umulh $28,$19,$28 # 4 2 ###### | ||
62 | addq $27,$24,$27 # 3 3 1 | ||
63 | addq $3,$0,$3 # 3 2 3 1 | ||
64 | stq $2,-24($16) # 2 2 4 | ||
65 | cmpult $3,$0,$0 # 3 2 3 2 | ||
66 | stq $3,-16($16) # 3 2 4 | ||
67 | addq $4,$8,$4 # 4 2 2 | ||
68 | addq $27,$0,$0 # 3 3 2 | ||
69 | cmpult $4,$8,$25 # 4 2 3 1 | ||
70 | addq $17,32,$17 | ||
71 | addq $28,$25,$28 # 4 3 1 | ||
72 | addq $4,$0,$4 # 4 2 3 1 | ||
73 | cmpult $4,$0,$0 # 4 2 3 2 | ||
74 | stq $4,-8($16) # 4 2 4 | ||
75 | addq $28,$0,$0 # 4 3 2 | ||
76 | blt $18,$43 | ||
52 | 77 | ||
53 | ble $18,$43 | 78 | ldq $20,0($17) # 1 1 |
79 | ldq $1,0($16) # 1 1 | ||
54 | 80 | ||
55 | addq $16,16,$16 | 81 | br $42 |
56 | addq $17,16,$17 | ||
57 | blt $25,$42 | ||
58 | 82 | ||
59 | br $31,$142 | 83 | .align 4 |
60 | $42: | 84 | $45: |
61 | ldq $1,0($17) # a[0] | 85 | ldq $20,0($17) # 4 1 |
62 | umulh $19,$1,$3 # a[0]*w high part | 86 | ldq $1,0($16) # 4 1 |
63 | mulq $19,$1,$1 # a[0]*w low part | 87 | mulq $20,$19,$5 # 4 2 1 |
64 | ldq $2,0($16) # r[0] | 88 | subq $18,1,$18 |
65 | addq $1,$2,$1 # low part + r[0] | 89 | addq $16,8,$16 |
66 | cmpult $1,$2,$4 # overflow? | 90 | addq $17,8,$17 |
67 | addq $4,$3,$3 # high part + overflow | 91 | umulh $20,$19,$20 # 4 2 |
68 | addq $1,$0,$1 # add c | 92 | addq $1,$5,$1 # 4 2 2 |
69 | cmpult $1,$0,$4 # overflow? | 93 | cmpult $1,$5,$22 # 4 2 3 1 |
70 | addq $4,$3,$0 # c=high part + overflow | 94 | addq $20,$22,$20 # 4 3 1 |
71 | stq $1,0($16) | 95 | addq $1,$0,$1 # 4 2 3 1 |
96 | cmpult $1,$0,$0 # 4 2 3 2 | ||
97 | addq $20,$0,$0 # 4 3 2 | ||
98 | stq $1,-8($16) # 4 2 4 | ||
99 | bgt $18,$45 | ||
100 | ret $31,($26),1 # else exit | ||
72 | 101 | ||
73 | .align 4 | 102 | .align 4 |
74 | $43: | 103 | $43: |
75 | ret $31,($26),1 | 104 | addq $18,4,$18 |
105 | bgt $18,$45 # goto tail code | ||
106 | ret $31,($26),1 # else exit | ||
107 | |||
76 | .end bn_mul_add_words | 108 | .end bn_mul_add_words |
77 | .align 3 | 109 | .align 3 |
78 | .globl bn_mul_words | 110 | .globl bn_mul_words |
@@ -81,49 +113,75 @@ bn_mul_words: | |||
81 | bn_mul_words..ng: | 113 | bn_mul_words..ng: |
82 | .frame $30,0,$26,0 | 114 | .frame $30,0,$26,0 |
83 | .prologue 0 | 115 | .prologue 0 |
84 | subq $18,2,$25 # num=-2 | ||
85 | bis $31,$31,$0 | ||
86 | blt $25,$242 | ||
87 | .align 5 | 116 | .align 5 |
88 | $342: | 117 | subq $18,4,$18 |
89 | subq $18,2,$18 # num-=2 | 118 | bis $31,$31,$0 |
90 | subq $25,2,$25 # num-=2 | 119 | blt $18,$143 # if we are -1, -2, -3 or -4 goto tail code |
91 | 120 | ldq $20,0($17) # 1 1 | |
92 | ldq $1,0($17) # a[0] | 121 | .align 3 |
93 | ldq $2,8($17) # a[1] | 122 | $142: |
94 | 123 | ||
95 | mulq $19,$1,$3 # a[0]*w low part r3 | 124 | mulq $20,$19,$5 # 1 2 1 ##### |
96 | umulh $19,$1,$1 # a[0]*w high part r1 | 125 | ldq $21,8($17) # 2 1 |
97 | mulq $19,$2,$4 # a[1]*w low part r4 | 126 | ldq $27,16($17) # 3 1 |
98 | umulh $19,$2,$2 # a[1]*w high part r2 | 127 | umulh $20,$19,$20 # 1 2 ##### |
99 | 128 | ldq $28,24($17) # 4 1 | |
100 | addq $3,$0,$3 # add c | 129 | mulq $21,$19,$6 # 2 2 1 ##### |
101 | cmpult $3,$0,$5 # overflow? | 130 | addq $5,$0,$5 # 1 2 3 1 |
102 | stq $3,0($16) | 131 | subq $18,4,$18 |
103 | addq $5,$1,$0 # c=high part + overflow | 132 | cmpult $5,$0,$0 # 1 2 3 2 |
104 | 133 | umulh $21,$19,$21 # 2 2 ##### | |
105 | addq $4,$0,$4 # add c | 134 | addq $20,$0,$0 # 1 3 2 |
106 | cmpult $4,$0,$5 # overflow? | 135 | addq $17,32,$17 |
107 | stq $4,8($16) | 136 | addq $6,$0,$6 # 2 2 3 1 |
108 | addq $5,$2,$0 # c=high part + overflow | 137 | mulq $27,$19,$7 # 3 2 1 ##### |
109 | 138 | cmpult $6,$0,$0 # 2 2 3 2 | |
110 | ble $18,$243 | 139 | addq $21,$0,$0 # 2 3 2 |
111 | 140 | addq $16,32,$16 | |
112 | addq $16,16,$16 | 141 | umulh $27,$19,$27 # 3 2 ##### |
113 | addq $17,16,$17 | 142 | stq $5,-32($16) # 1 2 4 |
114 | blt $25,$242 | 143 | mulq $28,$19,$8 # 4 2 1 ##### |
115 | 144 | addq $7,$0,$7 # 3 2 3 1 | |
116 | br $31,$342 | 145 | stq $6,-24($16) # 2 2 4 |
117 | $242: | 146 | cmpult $7,$0,$0 # 3 2 3 2 |
118 | ldq $1,0($17) # a[0] | 147 | umulh $28,$19,$28 # 4 2 ##### |
119 | umulh $19,$1,$3 # a[0]*w high part | 148 | addq $27,$0,$0 # 3 3 2 |
120 | mulq $19,$1,$1 # a[0]*w low part | 149 | stq $7,-16($16) # 3 2 4 |
121 | addq $1,$0,$1 # add c | 150 | addq $8,$0,$8 # 4 2 3 1 |
122 | cmpult $1,$0,$4 # overflow? | 151 | cmpult $8,$0,$0 # 4 2 3 2 |
123 | addq $4,$3,$0 # c=high part + overflow | 152 | |
124 | stq $1,0($16) | 153 | addq $28,$0,$0 # 4 3 2 |
125 | $243: | 154 | |
126 | ret $31,($26),1 | 155 | stq $8,-8($16) # 4 2 4 |
156 | |||
157 | blt $18,$143 | ||
158 | |||
159 | ldq $20,0($17) # 1 1 | ||
160 | |||
161 | br $142 | ||
162 | |||
163 | .align 4 | ||
164 | $145: | ||
165 | ldq $20,0($17) # 4 1 | ||
166 | mulq $20,$19,$5 # 4 2 1 | ||
167 | subq $18,1,$18 | ||
168 | umulh $20,$19,$20 # 4 2 | ||
169 | addq $5,$0,$5 # 4 2 3 1 | ||
170 | addq $16,8,$16 | ||
171 | cmpult $5,$0,$0 # 4 2 3 2 | ||
172 | addq $17,8,$17 | ||
173 | addq $20,$0,$0 # 4 3 2 | ||
174 | stq $5,-8($16) # 4 2 4 | ||
175 | |||
176 | bgt $18,$145 | ||
177 | ret $31,($26),1 # else exit | ||
178 | |||
179 | .align 4 | ||
180 | $143: | ||
181 | addq $18,4,$18 | ||
182 | bgt $18,$145 # goto tail code | ||
183 | ret $31,($26),1 # else exit | ||
184 | |||
127 | .end bn_mul_words | 185 | .end bn_mul_words |
128 | .align 3 | 186 | .align 3 |
129 | .globl bn_sqr_words | 187 | .globl bn_sqr_words |
@@ -132,44 +190,58 @@ bn_sqr_words: | |||
132 | bn_sqr_words..ng: | 190 | bn_sqr_words..ng: |
133 | .frame $30,0,$26,0 | 191 | .frame $30,0,$26,0 |
134 | .prologue 0 | 192 | .prologue 0 |
135 | |||
136 | subq $18,2,$25 # num=-2 | ||
137 | blt $25,$442 | ||
138 | .align 5 | ||
139 | $542: | ||
140 | subq $18,2,$18 # num-=2 | ||
141 | subq $25,2,$25 # num-=2 | ||
142 | |||
143 | ldq $1,0($17) # a[0] | ||
144 | ldq $4,8($17) # a[1] | ||
145 | 193 | ||
146 | mulq $1,$1,$2 # a[0]*w low part r2 | 194 | subq $18,4,$18 |
147 | umulh $1,$1,$3 # a[0]*w high part r3 | 195 | blt $18,$543 # if we are -1, -2, -3 or -4 goto tail code |
148 | mulq $4,$4,$5 # a[1]*w low part r5 | 196 | ldq $20,0($17) # 1 1 |
149 | umulh $4,$4,$6 # a[1]*w high part r6 | 197 | .align 3 |
150 | 198 | $542: | |
151 | stq $2,0($16) # r[0] | 199 | mulq $20,$20,$5 ###### |
152 | stq $3,8($16) # r[1] | 200 | ldq $21,8($17) # 1 1 |
153 | stq $5,16($16) # r[3] | 201 | subq $18,4 |
154 | stq $6,24($16) # r[4] | 202 | umulh $20,$20,$1 ###### |
203 | ldq $27,16($17) # 1 1 | ||
204 | mulq $21,$21,$6 ###### | ||
205 | ldq $28,24($17) # 1 1 | ||
206 | stq $5,0($16) # r[0] | ||
207 | umulh $21,$21,$2 ###### | ||
208 | stq $1,8($16) # r[1] | ||
209 | mulq $27,$27,$7 ###### | ||
210 | stq $6,16($16) # r[0] | ||
211 | umulh $27,$27,$3 ###### | ||
212 | stq $2,24($16) # r[1] | ||
213 | mulq $28,$28,$8 ###### | ||
214 | stq $7,32($16) # r[0] | ||
215 | umulh $28,$28,$4 ###### | ||
216 | stq $3,40($16) # r[1] | ||
155 | 217 | ||
156 | ble $18,$443 | 218 | addq $16,64,$16 |
219 | addq $17,32,$17 | ||
220 | stq $8,-16($16) # r[0] | ||
221 | stq $4,-8($16) # r[1] | ||
157 | 222 | ||
158 | addq $16,32,$16 | 223 | blt $18,$543 |
159 | addq $17,16,$17 | 224 | ldq $20,0($17) # 1 1 |
160 | blt $25,$442 | 225 | br $542 |
161 | br $31,$542 | ||
162 | 226 | ||
163 | $442: | 227 | $442: |
164 | ldq $1,0($17) # a[0] | 228 | ldq $20,0($17) # a[0] |
165 | mulq $1,$1,$2 # a[0]*w low part r2 | 229 | mulq $20,$20,$5 # a[0]*w low part r2 |
166 | umulh $1,$1,$3 # a[0]*w high part r3 | 230 | addq $16,16,$16 |
167 | stq $2,0($16) # r[0] | 231 | addq $17,8,$17 |
168 | stq $3,8($16) # r[1] | 232 | subq $18,1,$18 |
233 | umulh $20,$20,$1 # a[0]*w high part r3 | ||
234 | stq $5,-16($16) # r[0] | ||
235 | stq $1,-8($16) # r[1] | ||
236 | |||
237 | bgt $18,$442 | ||
238 | ret $31,($26),1 # else exit | ||
169 | 239 | ||
170 | .align 4 | 240 | .align 4 |
171 | $443: | 241 | $543: |
172 | ret $31,($26),1 | 242 | addq $18,4,$18 |
243 | bgt $18,$442 # goto tail code | ||
244 | ret $31,($26),1 # else exit | ||
173 | .end bn_sqr_words | 245 | .end bn_sqr_words |
174 | 246 | ||
175 | .align 3 | 247 | .align 3 |
@@ -180,31 +252,74 @@ bn_add_words..ng: | |||
180 | .frame $30,0,$26,0 | 252 | .frame $30,0,$26,0 |
181 | .prologue 0 | 253 | .prologue 0 |
182 | 254 | ||
183 | bis $31,$31,$8 # carry = 0 | 255 | subq $19,4,$19 |
184 | ble $19,$900 | 256 | bis $31,$31,$0 # carry = 0 |
257 | blt $19,$900 | ||
258 | ldq $5,0($17) # a[0] | ||
259 | ldq $1,0($18) # b[1] | ||
260 | .align 3 | ||
185 | $901: | 261 | $901: |
186 | ldq $0,0($17) # a[0] | 262 | addq $1,$5,$1 # r=a+b; |
187 | ldq $1,0($18) # a[1] | 263 | ldq $6,8($17) # a[1] |
264 | cmpult $1,$5,$22 # did we overflow? | ||
265 | ldq $2,8($18) # b[1] | ||
266 | addq $1,$0,$1 # c+= overflow | ||
267 | ldq $7,16($17) # a[2] | ||
268 | cmpult $1,$0,$0 # overflow? | ||
269 | ldq $3,16($18) # b[2] | ||
270 | addq $0,$22,$0 | ||
271 | ldq $8,24($17) # a[3] | ||
272 | addq $2,$6,$2 # r=a+b; | ||
273 | ldq $4,24($18) # b[3] | ||
274 | cmpult $2,$6,$23 # did we overflow? | ||
275 | addq $3,$7,$3 # r=a+b; | ||
276 | addq $2,$0,$2 # c+= overflow | ||
277 | cmpult $3,$7,$24 # did we overflow? | ||
278 | cmpult $2,$0,$0 # overflow? | ||
279 | addq $4,$8,$4 # r=a+b; | ||
280 | addq $0,$23,$0 | ||
281 | cmpult $4,$8,$25 # did we overflow? | ||
282 | addq $3,$0,$3 # c+= overflow | ||
283 | stq $1,0($16) # r[0]=c | ||
284 | cmpult $3,$0,$0 # overflow? | ||
285 | stq $2,8($16) # r[1]=c | ||
286 | addq $0,$24,$0 | ||
287 | stq $3,16($16) # r[2]=c | ||
288 | addq $4,$0,$4 # c+= overflow | ||
289 | subq $19,4,$19 # loop-- | ||
290 | cmpult $4,$0,$0 # overflow? | ||
291 | addq $17,32,$17 # a++ | ||
292 | addq $0,$25,$0 | ||
293 | stq $4,24($16) # r[3]=c | ||
294 | addq $18,32,$18 # b++ | ||
295 | addq $16,32,$16 # r++ | ||
188 | 296 | ||
189 | addq $0,$1,$3 # c=a+b; | 297 | blt $19,$900 |
298 | ldq $5,0($17) # a[0] | ||
299 | ldq $1,0($18) # b[1] | ||
300 | br $901 | ||
301 | .align 4 | ||
302 | $945: | ||
303 | ldq $5,0($17) # a[0] | ||
304 | ldq $1,0($18) # b[1] | ||
305 | addq $1,$5,$1 # r=a+b; | ||
306 | subq $19,1,$19 # loop-- | ||
307 | addq $1,$0,$1 # c+= overflow | ||
190 | addq $17,8,$17 # a++ | 308 | addq $17,8,$17 # a++ |
309 | cmpult $1,$5,$22 # did we overflow? | ||
310 | cmpult $1,$0,$0 # overflow? | ||
311 | addq $18,8,$18 # b++ | ||
312 | stq $1,0($16) # r[0]=c | ||
313 | addq $0,$22,$0 | ||
314 | addq $16,8,$16 # r++ | ||
191 | 315 | ||
192 | cmpult $3,$1,$7 # did we overflow? | 316 | bgt $19,$945 |
193 | addq $18,8,$18 # b++ | 317 | ret $31,($26),1 # else exit |
194 | |||
195 | addq $8,$3,$3 # c+=carry | ||
196 | 318 | ||
197 | cmpult $3,$8,$8 # did we overflow? | ||
198 | stq $3,($16) # r[0]=c | ||
199 | |||
200 | addq $7,$8,$8 # add into overflow | ||
201 | subq $19,1,$19 # loop-- | ||
202 | |||
203 | addq $16,8,$16 # r++ | ||
204 | bgt $19,$901 | ||
205 | $900: | 319 | $900: |
206 | bis $8,$8,$0 # return carry | 320 | addq $19,4,$19 |
207 | ret $31,($26),1 | 321 | bgt $19,$945 # goto tail code |
322 | ret $31,($26),1 # else exit | ||
208 | .end bn_add_words | 323 | .end bn_add_words |
209 | 324 | ||
210 | # | 325 | # |
@@ -213,11 +328,11 @@ $900: | |||
213 | # | 328 | # |
214 | .text | 329 | .text |
215 | .align 3 | 330 | .align 3 |
216 | .globl bn_div64 | 331 | .globl bn_div_words |
217 | .ent bn_div64 | 332 | .ent bn_div_words |
218 | bn_div64: | 333 | bn_div_words: |
219 | ldgp $29,0($27) | 334 | ldgp $29,0($27) |
220 | bn_div64..ng: | 335 | bn_div_words..ng: |
221 | lda $30,-48($30) | 336 | lda $30,-48($30) |
222 | .frame $30,48,$26,0 | 337 | .frame $30,48,$26,0 |
223 | stq $26,0($30) | 338 | stq $26,0($30) |
@@ -338,7 +453,1446 @@ $136: | |||
338 | ldq $13,40($30) | 453 | ldq $13,40($30) |
339 | addq $30,48,$30 | 454 | addq $30,48,$30 |
340 | ret $31,($26),1 | 455 | ret $31,($26),1 |
341 | .end bn_div64 | 456 | .end bn_div_words |
342 | .ident "GCC: (GNU) 2.7.2.1" | 457 | |
458 | .set noat | ||
459 | .text | ||
460 | .align 3 | ||
461 | .globl bn_sub_words | ||
462 | .ent bn_sub_words | ||
463 | bn_sub_words: | ||
464 | bn_sub_words..ng: | ||
465 | .frame $30,0,$26,0 | ||
466 | .prologue 0 | ||
467 | |||
468 | subq $19, 4, $19 | ||
469 | bis $31, $31, $0 | ||
470 | blt $19, $100 | ||
471 | ldq $1, 0($17) | ||
472 | ldq $2, 0($18) | ||
473 | $101: | ||
474 | ldq $3, 8($17) | ||
475 | cmpult $1, $2, $4 | ||
476 | ldq $5, 8($18) | ||
477 | subq $1, $2, $1 | ||
478 | ldq $6, 16($17) | ||
479 | cmpult $1, $0, $2 | ||
480 | ldq $7, 16($18) | ||
481 | subq $1, $0, $23 | ||
482 | ldq $8, 24($17) | ||
483 | addq $2, $4, $0 | ||
484 | cmpult $3, $5, $24 | ||
485 | subq $3, $5, $3 | ||
486 | ldq $22, 24($18) | ||
487 | cmpult $3, $0, $5 | ||
488 | subq $3, $0, $25 | ||
489 | addq $5, $24, $0 | ||
490 | cmpult $6, $7, $27 | ||
491 | subq $6, $7, $6 | ||
492 | stq $23, 0($16) | ||
493 | cmpult $6, $0, $7 | ||
494 | subq $6, $0, $28 | ||
495 | addq $7, $27, $0 | ||
496 | cmpult $8, $22, $21 | ||
497 | subq $8, $22, $8 | ||
498 | stq $25, 8($16) | ||
499 | cmpult $8, $0, $22 | ||
500 | subq $8, $0, $20 | ||
501 | addq $22, $21, $0 | ||
502 | stq $28, 16($16) | ||
503 | subq $19, 4, $19 | ||
504 | stq $20, 24($16) | ||
505 | addq $17, 32, $17 | ||
506 | addq $18, 32, $18 | ||
507 | addq $16, 32, $16 | ||
508 | blt $19, $100 | ||
509 | ldq $1, 0($17) | ||
510 | ldq $2, 0($18) | ||
511 | br $101 | ||
512 | $102: | ||
513 | ldq $1, 0($17) | ||
514 | ldq $2, 0($18) | ||
515 | cmpult $1, $2, $27 | ||
516 | subq $1, $2, $1 | ||
517 | cmpult $1, $0, $2 | ||
518 | subq $1, $0, $1 | ||
519 | stq $1, 0($16) | ||
520 | addq $2, $27, $0 | ||
521 | addq $17, 8, $17 | ||
522 | addq $18, 8, $18 | ||
523 | addq $16, 8, $16 | ||
524 | subq $19, 1, $19 | ||
525 | bgt $19, $102 | ||
526 | ret $31,($26),1 | ||
527 | $100: | ||
528 | addq $19, 4, $19 | ||
529 | bgt $19, $102 | ||
530 | $103: | ||
531 | ret $31,($26),1 | ||
532 | .end bn_sub_words | ||
533 | .text | ||
534 | .align 3 | ||
535 | .globl bn_mul_comba4 | ||
536 | .ent bn_mul_comba4 | ||
537 | bn_mul_comba4: | ||
538 | bn_mul_comba4..ng: | ||
539 | .frame $30,0,$26,0 | ||
540 | .prologue 0 | ||
343 | 541 | ||
542 | ldq $0, 0($17) | ||
543 | ldq $1, 0($18) | ||
544 | ldq $2, 8($17) | ||
545 | ldq $3, 8($18) | ||
546 | ldq $4, 16($17) | ||
547 | ldq $5, 16($18) | ||
548 | ldq $6, 24($17) | ||
549 | ldq $7, 24($18) | ||
550 | bis $31, $31, $23 | ||
551 | mulq $0, $1, $8 | ||
552 | umulh $0, $1, $22 | ||
553 | stq $8, 0($16) | ||
554 | bis $31, $31, $8 | ||
555 | mulq $0, $3, $24 | ||
556 | umulh $0, $3, $25 | ||
557 | addq $22, $24, $22 | ||
558 | cmpult $22, $24, $27 | ||
559 | addq $27, $25, $25 | ||
560 | addq $23, $25, $23 | ||
561 | cmpult $23, $25, $28 | ||
562 | addq $8, $28, $8 | ||
563 | mulq $2, $1, $21 | ||
564 | umulh $2, $1, $20 | ||
565 | addq $22, $21, $22 | ||
566 | cmpult $22, $21, $19 | ||
567 | addq $19, $20, $20 | ||
568 | addq $23, $20, $23 | ||
569 | cmpult $23, $20, $17 | ||
570 | addq $8, $17, $8 | ||
571 | stq $22, 8($16) | ||
572 | bis $31, $31, $22 | ||
573 | mulq $2, $3, $18 | ||
574 | umulh $2, $3, $24 | ||
575 | addq $23, $18, $23 | ||
576 | cmpult $23, $18, $27 | ||
577 | addq $27, $24, $24 | ||
578 | addq $8, $24, $8 | ||
579 | cmpult $8, $24, $25 | ||
580 | addq $22, $25, $22 | ||
581 | mulq $0, $5, $28 | ||
582 | umulh $0, $5, $21 | ||
583 | addq $23, $28, $23 | ||
584 | cmpult $23, $28, $19 | ||
585 | addq $19, $21, $21 | ||
586 | addq $8, $21, $8 | ||
587 | cmpult $8, $21, $20 | ||
588 | addq $22, $20, $22 | ||
589 | mulq $4, $1, $17 | ||
590 | umulh $4, $1, $18 | ||
591 | addq $23, $17, $23 | ||
592 | cmpult $23, $17, $27 | ||
593 | addq $27, $18, $18 | ||
594 | addq $8, $18, $8 | ||
595 | cmpult $8, $18, $24 | ||
596 | addq $22, $24, $22 | ||
597 | stq $23, 16($16) | ||
598 | bis $31, $31, $23 | ||
599 | mulq $0, $7, $25 | ||
600 | umulh $0, $7, $28 | ||
601 | addq $8, $25, $8 | ||
602 | cmpult $8, $25, $19 | ||
603 | addq $19, $28, $28 | ||
604 | addq $22, $28, $22 | ||
605 | cmpult $22, $28, $21 | ||
606 | addq $23, $21, $23 | ||
607 | mulq $2, $5, $20 | ||
608 | umulh $2, $5, $17 | ||
609 | addq $8, $20, $8 | ||
610 | cmpult $8, $20, $27 | ||
611 | addq $27, $17, $17 | ||
612 | addq $22, $17, $22 | ||
613 | cmpult $22, $17, $18 | ||
614 | addq $23, $18, $23 | ||
615 | mulq $4, $3, $24 | ||
616 | umulh $4, $3, $25 | ||
617 | addq $8, $24, $8 | ||
618 | cmpult $8, $24, $19 | ||
619 | addq $19, $25, $25 | ||
620 | addq $22, $25, $22 | ||
621 | cmpult $22, $25, $28 | ||
622 | addq $23, $28, $23 | ||
623 | mulq $6, $1, $21 | ||
624 | umulh $6, $1, $0 | ||
625 | addq $8, $21, $8 | ||
626 | cmpult $8, $21, $20 | ||
627 | addq $20, $0, $0 | ||
628 | addq $22, $0, $22 | ||
629 | cmpult $22, $0, $27 | ||
630 | addq $23, $27, $23 | ||
631 | stq $8, 24($16) | ||
632 | bis $31, $31, $8 | ||
633 | mulq $2, $7, $17 | ||
634 | umulh $2, $7, $18 | ||
635 | addq $22, $17, $22 | ||
636 | cmpult $22, $17, $24 | ||
637 | addq $24, $18, $18 | ||
638 | addq $23, $18, $23 | ||
639 | cmpult $23, $18, $19 | ||
640 | addq $8, $19, $8 | ||
641 | mulq $4, $5, $25 | ||
642 | umulh $4, $5, $28 | ||
643 | addq $22, $25, $22 | ||
644 | cmpult $22, $25, $21 | ||
645 | addq $21, $28, $28 | ||
646 | addq $23, $28, $23 | ||
647 | cmpult $23, $28, $20 | ||
648 | addq $8, $20, $8 | ||
649 | mulq $6, $3, $0 | ||
650 | umulh $6, $3, $27 | ||
651 | addq $22, $0, $22 | ||
652 | cmpult $22, $0, $1 | ||
653 | addq $1, $27, $27 | ||
654 | addq $23, $27, $23 | ||
655 | cmpult $23, $27, $17 | ||
656 | addq $8, $17, $8 | ||
657 | stq $22, 32($16) | ||
658 | bis $31, $31, $22 | ||
659 | mulq $4, $7, $24 | ||
660 | umulh $4, $7, $18 | ||
661 | addq $23, $24, $23 | ||
662 | cmpult $23, $24, $19 | ||
663 | addq $19, $18, $18 | ||
664 | addq $8, $18, $8 | ||
665 | cmpult $8, $18, $2 | ||
666 | addq $22, $2, $22 | ||
667 | mulq $6, $5, $25 | ||
668 | umulh $6, $5, $21 | ||
669 | addq $23, $25, $23 | ||
670 | cmpult $23, $25, $28 | ||
671 | addq $28, $21, $21 | ||
672 | addq $8, $21, $8 | ||
673 | cmpult $8, $21, $20 | ||
674 | addq $22, $20, $22 | ||
675 | stq $23, 40($16) | ||
676 | bis $31, $31, $23 | ||
677 | mulq $6, $7, $0 | ||
678 | umulh $6, $7, $1 | ||
679 | addq $8, $0, $8 | ||
680 | cmpult $8, $0, $27 | ||
681 | addq $27, $1, $1 | ||
682 | addq $22, $1, $22 | ||
683 | cmpult $22, $1, $17 | ||
684 | addq $23, $17, $23 | ||
685 | stq $8, 48($16) | ||
686 | stq $22, 56($16) | ||
687 | ret $31,($26),1 | ||
688 | .end bn_mul_comba4 | ||
689 | .text | ||
690 | .align 3 | ||
691 | .globl bn_mul_comba8 | ||
692 | .ent bn_mul_comba8 | ||
693 | bn_mul_comba8: | ||
694 | bn_mul_comba8..ng: | ||
695 | .frame $30,0,$26,0 | ||
696 | .prologue 0 | ||
697 | |||
698 | subq $30, 16, $30 | ||
699 | ldq $0, 0($17) | ||
700 | ldq $1, 0($18) | ||
701 | stq $9, 0($30) | ||
702 | stq $10, 8($30) | ||
703 | ldq $2, 8($17) | ||
704 | ldq $3, 8($18) | ||
705 | ldq $4, 16($17) | ||
706 | ldq $5, 16($18) | ||
707 | ldq $6, 24($17) | ||
708 | ldq $7, 24($18) | ||
709 | ldq $8, 8($17) | ||
710 | ldq $22, 8($18) | ||
711 | ldq $23, 8($17) | ||
712 | ldq $24, 8($18) | ||
713 | ldq $25, 8($17) | ||
714 | ldq $27, 8($18) | ||
715 | ldq $28, 8($17) | ||
716 | ldq $21, 8($18) | ||
717 | bis $31, $31, $9 | ||
718 | mulq $0, $1, $20 | ||
719 | umulh $0, $1, $19 | ||
720 | stq $20, 0($16) | ||
721 | bis $31, $31, $20 | ||
722 | mulq $0, $3, $10 | ||
723 | umulh $0, $3, $17 | ||
724 | addq $19, $10, $19 | ||
725 | cmpult $19, $10, $18 | ||
726 | addq $18, $17, $17 | ||
727 | addq $9, $17, $9 | ||
728 | cmpult $9, $17, $10 | ||
729 | addq $20, $10, $20 | ||
730 | mulq $2, $1, $18 | ||
731 | umulh $2, $1, $17 | ||
732 | addq $19, $18, $19 | ||
733 | cmpult $19, $18, $10 | ||
734 | addq $10, $17, $17 | ||
735 | addq $9, $17, $9 | ||
736 | cmpult $9, $17, $18 | ||
737 | addq $20, $18, $20 | ||
738 | stq $19, 8($16) | ||
739 | bis $31, $31, $19 | ||
740 | mulq $0, $5, $10 | ||
741 | umulh $0, $5, $17 | ||
742 | addq $9, $10, $9 | ||
743 | cmpult $9, $10, $18 | ||
744 | addq $18, $17, $17 | ||
745 | addq $20, $17, $20 | ||
746 | cmpult $20, $17, $10 | ||
747 | addq $19, $10, $19 | ||
748 | mulq $2, $3, $18 | ||
749 | umulh $2, $3, $17 | ||
750 | addq $9, $18, $9 | ||
751 | cmpult $9, $18, $10 | ||
752 | addq $10, $17, $17 | ||
753 | addq $20, $17, $20 | ||
754 | cmpult $20, $17, $18 | ||
755 | addq $19, $18, $19 | ||
756 | mulq $4, $1, $10 | ||
757 | umulh $4, $1, $17 | ||
758 | addq $9, $10, $9 | ||
759 | cmpult $9, $10, $18 | ||
760 | addq $18, $17, $17 | ||
761 | addq $20, $17, $20 | ||
762 | cmpult $20, $17, $10 | ||
763 | addq $19, $10, $19 | ||
764 | stq $9, 16($16) | ||
765 | bis $31, $31, $9 | ||
766 | mulq $0, $7, $18 | ||
767 | umulh $0, $7, $17 | ||
768 | addq $20, $18, $20 | ||
769 | cmpult $20, $18, $10 | ||
770 | addq $10, $17, $17 | ||
771 | addq $19, $17, $19 | ||
772 | cmpult $19, $17, $18 | ||
773 | addq $9, $18, $9 | ||
774 | mulq $2, $5, $10 | ||
775 | umulh $2, $5, $17 | ||
776 | addq $20, $10, $20 | ||
777 | cmpult $20, $10, $18 | ||
778 | addq $18, $17, $17 | ||
779 | addq $19, $17, $19 | ||
780 | cmpult $19, $17, $10 | ||
781 | addq $9, $10, $9 | ||
782 | mulq $4, $3, $18 | ||
783 | umulh $4, $3, $17 | ||
784 | addq $20, $18, $20 | ||
785 | cmpult $20, $18, $10 | ||
786 | addq $10, $17, $17 | ||
787 | addq $19, $17, $19 | ||
788 | cmpult $19, $17, $18 | ||
789 | addq $9, $18, $9 | ||
790 | mulq $6, $1, $10 | ||
791 | umulh $6, $1, $17 | ||
792 | addq $20, $10, $20 | ||
793 | cmpult $20, $10, $18 | ||
794 | addq $18, $17, $17 | ||
795 | addq $19, $17, $19 | ||
796 | cmpult $19, $17, $10 | ||
797 | addq $9, $10, $9 | ||
798 | stq $20, 24($16) | ||
799 | bis $31, $31, $20 | ||
800 | mulq $0, $22, $18 | ||
801 | umulh $0, $22, $17 | ||
802 | addq $19, $18, $19 | ||
803 | cmpult $19, $18, $10 | ||
804 | addq $10, $17, $17 | ||
805 | addq $9, $17, $9 | ||
806 | cmpult $9, $17, $18 | ||
807 | addq $20, $18, $20 | ||
808 | mulq $2, $7, $10 | ||
809 | umulh $2, $7, $17 | ||
810 | addq $19, $10, $19 | ||
811 | cmpult $19, $10, $18 | ||
812 | addq $18, $17, $17 | ||
813 | addq $9, $17, $9 | ||
814 | cmpult $9, $17, $10 | ||
815 | addq $20, $10, $20 | ||
816 | mulq $4, $5, $18 | ||
817 | umulh $4, $5, $17 | ||
818 | addq $19, $18, $19 | ||
819 | cmpult $19, $18, $10 | ||
820 | addq $10, $17, $17 | ||
821 | addq $9, $17, $9 | ||
822 | cmpult $9, $17, $18 | ||
823 | addq $20, $18, $20 | ||
824 | mulq $6, $3, $10 | ||
825 | umulh $6, $3, $17 | ||
826 | addq $19, $10, $19 | ||
827 | cmpult $19, $10, $18 | ||
828 | addq $18, $17, $17 | ||
829 | addq $9, $17, $9 | ||
830 | cmpult $9, $17, $10 | ||
831 | addq $20, $10, $20 | ||
832 | mulq $8, $1, $18 | ||
833 | umulh $8, $1, $17 | ||
834 | addq $19, $18, $19 | ||
835 | cmpult $19, $18, $10 | ||
836 | addq $10, $17, $17 | ||
837 | addq $9, $17, $9 | ||
838 | cmpult $9, $17, $18 | ||
839 | addq $20, $18, $20 | ||
840 | stq $19, 32($16) | ||
841 | bis $31, $31, $19 | ||
842 | mulq $0, $24, $10 | ||
843 | umulh $0, $24, $17 | ||
844 | addq $9, $10, $9 | ||
845 | cmpult $9, $10, $18 | ||
846 | addq $18, $17, $17 | ||
847 | addq $20, $17, $20 | ||
848 | cmpult $20, $17, $10 | ||
849 | addq $19, $10, $19 | ||
850 | mulq $2, $22, $18 | ||
851 | umulh $2, $22, $17 | ||
852 | addq $9, $18, $9 | ||
853 | cmpult $9, $18, $10 | ||
854 | addq $10, $17, $17 | ||
855 | addq $20, $17, $20 | ||
856 | cmpult $20, $17, $18 | ||
857 | addq $19, $18, $19 | ||
858 | mulq $4, $7, $10 | ||
859 | umulh $4, $7, $17 | ||
860 | addq $9, $10, $9 | ||
861 | cmpult $9, $10, $18 | ||
862 | addq $18, $17, $17 | ||
863 | addq $20, $17, $20 | ||
864 | cmpult $20, $17, $10 | ||
865 | addq $19, $10, $19 | ||
866 | mulq $6, $5, $18 | ||
867 | umulh $6, $5, $17 | ||
868 | addq $9, $18, $9 | ||
869 | cmpult $9, $18, $10 | ||
870 | addq $10, $17, $17 | ||
871 | addq $20, $17, $20 | ||
872 | cmpult $20, $17, $18 | ||
873 | addq $19, $18, $19 | ||
874 | mulq $8, $3, $10 | ||
875 | umulh $8, $3, $17 | ||
876 | addq $9, $10, $9 | ||
877 | cmpult $9, $10, $18 | ||
878 | addq $18, $17, $17 | ||
879 | addq $20, $17, $20 | ||
880 | cmpult $20, $17, $10 | ||
881 | addq $19, $10, $19 | ||
882 | mulq $23, $1, $18 | ||
883 | umulh $23, $1, $17 | ||
884 | addq $9, $18, $9 | ||
885 | cmpult $9, $18, $10 | ||
886 | addq $10, $17, $17 | ||
887 | addq $20, $17, $20 | ||
888 | cmpult $20, $17, $18 | ||
889 | addq $19, $18, $19 | ||
890 | stq $9, 40($16) | ||
891 | bis $31, $31, $9 | ||
892 | mulq $0, $27, $10 | ||
893 | umulh $0, $27, $17 | ||
894 | addq $20, $10, $20 | ||
895 | cmpult $20, $10, $18 | ||
896 | addq $18, $17, $17 | ||
897 | addq $19, $17, $19 | ||
898 | cmpult $19, $17, $10 | ||
899 | addq $9, $10, $9 | ||
900 | mulq $2, $24, $18 | ||
901 | umulh $2, $24, $17 | ||
902 | addq $20, $18, $20 | ||
903 | cmpult $20, $18, $10 | ||
904 | addq $10, $17, $17 | ||
905 | addq $19, $17, $19 | ||
906 | cmpult $19, $17, $18 | ||
907 | addq $9, $18, $9 | ||
908 | mulq $4, $22, $10 | ||
909 | umulh $4, $22, $17 | ||
910 | addq $20, $10, $20 | ||
911 | cmpult $20, $10, $18 | ||
912 | addq $18, $17, $17 | ||
913 | addq $19, $17, $19 | ||
914 | cmpult $19, $17, $10 | ||
915 | addq $9, $10, $9 | ||
916 | mulq $6, $7, $18 | ||
917 | umulh $6, $7, $17 | ||
918 | addq $20, $18, $20 | ||
919 | cmpult $20, $18, $10 | ||
920 | addq $10, $17, $17 | ||
921 | addq $19, $17, $19 | ||
922 | cmpult $19, $17, $18 | ||
923 | addq $9, $18, $9 | ||
924 | mulq $8, $5, $10 | ||
925 | umulh $8, $5, $17 | ||
926 | addq $20, $10, $20 | ||
927 | cmpult $20, $10, $18 | ||
928 | addq $18, $17, $17 | ||
929 | addq $19, $17, $19 | ||
930 | cmpult $19, $17, $10 | ||
931 | addq $9, $10, $9 | ||
932 | mulq $23, $3, $18 | ||
933 | umulh $23, $3, $17 | ||
934 | addq $20, $18, $20 | ||
935 | cmpult $20, $18, $10 | ||
936 | addq $10, $17, $17 | ||
937 | addq $19, $17, $19 | ||
938 | cmpult $19, $17, $18 | ||
939 | addq $9, $18, $9 | ||
940 | mulq $25, $1, $10 | ||
941 | umulh $25, $1, $17 | ||
942 | addq $20, $10, $20 | ||
943 | cmpult $20, $10, $18 | ||
944 | addq $18, $17, $17 | ||
945 | addq $19, $17, $19 | ||
946 | cmpult $19, $17, $10 | ||
947 | addq $9, $10, $9 | ||
948 | stq $20, 48($16) | ||
949 | bis $31, $31, $20 | ||
950 | mulq $0, $21, $18 | ||
951 | umulh $0, $21, $17 | ||
952 | addq $19, $18, $19 | ||
953 | cmpult $19, $18, $10 | ||
954 | addq $10, $17, $17 | ||
955 | addq $9, $17, $9 | ||
956 | cmpult $9, $17, $18 | ||
957 | addq $20, $18, $20 | ||
958 | mulq $2, $27, $10 | ||
959 | umulh $2, $27, $17 | ||
960 | addq $19, $10, $19 | ||
961 | cmpult $19, $10, $18 | ||
962 | addq $18, $17, $17 | ||
963 | addq $9, $17, $9 | ||
964 | cmpult $9, $17, $0 | ||
965 | addq $20, $0, $20 | ||
966 | mulq $4, $24, $10 | ||
967 | umulh $4, $24, $18 | ||
968 | addq $19, $10, $19 | ||
969 | cmpult $19, $10, $17 | ||
970 | addq $17, $18, $18 | ||
971 | addq $9, $18, $9 | ||
972 | cmpult $9, $18, $0 | ||
973 | addq $20, $0, $20 | ||
974 | mulq $6, $22, $10 | ||
975 | umulh $6, $22, $17 | ||
976 | addq $19, $10, $19 | ||
977 | cmpult $19, $10, $18 | ||
978 | addq $18, $17, $17 | ||
979 | addq $9, $17, $9 | ||
980 | cmpult $9, $17, $0 | ||
981 | addq $20, $0, $20 | ||
982 | mulq $8, $7, $10 | ||
983 | umulh $8, $7, $18 | ||
984 | addq $19, $10, $19 | ||
985 | cmpult $19, $10, $17 | ||
986 | addq $17, $18, $18 | ||
987 | addq $9, $18, $9 | ||
988 | cmpult $9, $18, $0 | ||
989 | addq $20, $0, $20 | ||
990 | mulq $23, $5, $10 | ||
991 | umulh $23, $5, $17 | ||
992 | addq $19, $10, $19 | ||
993 | cmpult $19, $10, $18 | ||
994 | addq $18, $17, $17 | ||
995 | addq $9, $17, $9 | ||
996 | cmpult $9, $17, $0 | ||
997 | addq $20, $0, $20 | ||
998 | mulq $25, $3, $10 | ||
999 | umulh $25, $3, $18 | ||
1000 | addq $19, $10, $19 | ||
1001 | cmpult $19, $10, $17 | ||
1002 | addq $17, $18, $18 | ||
1003 | addq $9, $18, $9 | ||
1004 | cmpult $9, $18, $0 | ||
1005 | addq $20, $0, $20 | ||
1006 | mulq $28, $1, $10 | ||
1007 | umulh $28, $1, $17 | ||
1008 | addq $19, $10, $19 | ||
1009 | cmpult $19, $10, $18 | ||
1010 | addq $18, $17, $17 | ||
1011 | addq $9, $17, $9 | ||
1012 | cmpult $9, $17, $0 | ||
1013 | addq $20, $0, $20 | ||
1014 | stq $19, 56($16) | ||
1015 | bis $31, $31, $19 | ||
1016 | mulq $2, $21, $10 | ||
1017 | umulh $2, $21, $18 | ||
1018 | addq $9, $10, $9 | ||
1019 | cmpult $9, $10, $17 | ||
1020 | addq $17, $18, $18 | ||
1021 | addq $20, $18, $20 | ||
1022 | cmpult $20, $18, $0 | ||
1023 | addq $19, $0, $19 | ||
1024 | mulq $4, $27, $1 | ||
1025 | umulh $4, $27, $10 | ||
1026 | addq $9, $1, $9 | ||
1027 | cmpult $9, $1, $17 | ||
1028 | addq $17, $10, $10 | ||
1029 | addq $20, $10, $20 | ||
1030 | cmpult $20, $10, $18 | ||
1031 | addq $19, $18, $19 | ||
1032 | mulq $6, $24, $0 | ||
1033 | umulh $6, $24, $2 | ||
1034 | addq $9, $0, $9 | ||
1035 | cmpult $9, $0, $1 | ||
1036 | addq $1, $2, $2 | ||
1037 | addq $20, $2, $20 | ||
1038 | cmpult $20, $2, $17 | ||
1039 | addq $19, $17, $19 | ||
1040 | mulq $8, $22, $10 | ||
1041 | umulh $8, $22, $18 | ||
1042 | addq $9, $10, $9 | ||
1043 | cmpult $9, $10, $0 | ||
1044 | addq $0, $18, $18 | ||
1045 | addq $20, $18, $20 | ||
1046 | cmpult $20, $18, $1 | ||
1047 | addq $19, $1, $19 | ||
1048 | mulq $23, $7, $2 | ||
1049 | umulh $23, $7, $17 | ||
1050 | addq $9, $2, $9 | ||
1051 | cmpult $9, $2, $10 | ||
1052 | addq $10, $17, $17 | ||
1053 | addq $20, $17, $20 | ||
1054 | cmpult $20, $17, $0 | ||
1055 | addq $19, $0, $19 | ||
1056 | mulq $25, $5, $18 | ||
1057 | umulh $25, $5, $1 | ||
1058 | addq $9, $18, $9 | ||
1059 | cmpult $9, $18, $2 | ||
1060 | addq $2, $1, $1 | ||
1061 | addq $20, $1, $20 | ||
1062 | cmpult $20, $1, $10 | ||
1063 | addq $19, $10, $19 | ||
1064 | mulq $28, $3, $17 | ||
1065 | umulh $28, $3, $0 | ||
1066 | addq $9, $17, $9 | ||
1067 | cmpult $9, $17, $18 | ||
1068 | addq $18, $0, $0 | ||
1069 | addq $20, $0, $20 | ||
1070 | cmpult $20, $0, $2 | ||
1071 | addq $19, $2, $19 | ||
1072 | stq $9, 64($16) | ||
1073 | bis $31, $31, $9 | ||
1074 | mulq $4, $21, $1 | ||
1075 | umulh $4, $21, $10 | ||
1076 | addq $20, $1, $20 | ||
1077 | cmpult $20, $1, $17 | ||
1078 | addq $17, $10, $10 | ||
1079 | addq $19, $10, $19 | ||
1080 | cmpult $19, $10, $18 | ||
1081 | addq $9, $18, $9 | ||
1082 | mulq $6, $27, $0 | ||
1083 | umulh $6, $27, $2 | ||
1084 | addq $20, $0, $20 | ||
1085 | cmpult $20, $0, $3 | ||
1086 | addq $3, $2, $2 | ||
1087 | addq $19, $2, $19 | ||
1088 | cmpult $19, $2, $1 | ||
1089 | addq $9, $1, $9 | ||
1090 | mulq $8, $24, $17 | ||
1091 | umulh $8, $24, $10 | ||
1092 | addq $20, $17, $20 | ||
1093 | cmpult $20, $17, $18 | ||
1094 | addq $18, $10, $10 | ||
1095 | addq $19, $10, $19 | ||
1096 | cmpult $19, $10, $4 | ||
1097 | addq $9, $4, $9 | ||
1098 | mulq $23, $22, $0 | ||
1099 | umulh $23, $22, $3 | ||
1100 | addq $20, $0, $20 | ||
1101 | cmpult $20, $0, $2 | ||
1102 | addq $2, $3, $3 | ||
1103 | addq $19, $3, $19 | ||
1104 | cmpult $19, $3, $1 | ||
1105 | addq $9, $1, $9 | ||
1106 | mulq $25, $7, $17 | ||
1107 | umulh $25, $7, $18 | ||
1108 | addq $20, $17, $20 | ||
1109 | cmpult $20, $17, $10 | ||
1110 | addq $10, $18, $18 | ||
1111 | addq $19, $18, $19 | ||
1112 | cmpult $19, $18, $4 | ||
1113 | addq $9, $4, $9 | ||
1114 | mulq $28, $5, $0 | ||
1115 | umulh $28, $5, $2 | ||
1116 | addq $20, $0, $20 | ||
1117 | cmpult $20, $0, $3 | ||
1118 | addq $3, $2, $2 | ||
1119 | addq $19, $2, $19 | ||
1120 | cmpult $19, $2, $1 | ||
1121 | addq $9, $1, $9 | ||
1122 | stq $20, 72($16) | ||
1123 | bis $31, $31, $20 | ||
1124 | mulq $6, $21, $17 | ||
1125 | umulh $6, $21, $10 | ||
1126 | addq $19, $17, $19 | ||
1127 | cmpult $19, $17, $18 | ||
1128 | addq $18, $10, $10 | ||
1129 | addq $9, $10, $9 | ||
1130 | cmpult $9, $10, $4 | ||
1131 | addq $20, $4, $20 | ||
1132 | mulq $8, $27, $0 | ||
1133 | umulh $8, $27, $3 | ||
1134 | addq $19, $0, $19 | ||
1135 | cmpult $19, $0, $2 | ||
1136 | addq $2, $3, $3 | ||
1137 | addq $9, $3, $9 | ||
1138 | cmpult $9, $3, $1 | ||
1139 | addq $20, $1, $20 | ||
1140 | mulq $23, $24, $5 | ||
1141 | umulh $23, $24, $17 | ||
1142 | addq $19, $5, $19 | ||
1143 | cmpult $19, $5, $18 | ||
1144 | addq $18, $17, $17 | ||
1145 | addq $9, $17, $9 | ||
1146 | cmpult $9, $17, $10 | ||
1147 | addq $20, $10, $20 | ||
1148 | mulq $25, $22, $4 | ||
1149 | umulh $25, $22, $6 | ||
1150 | addq $19, $4, $19 | ||
1151 | cmpult $19, $4, $0 | ||
1152 | addq $0, $6, $6 | ||
1153 | addq $9, $6, $9 | ||
1154 | cmpult $9, $6, $2 | ||
1155 | addq $20, $2, $20 | ||
1156 | mulq $28, $7, $3 | ||
1157 | umulh $28, $7, $1 | ||
1158 | addq $19, $3, $19 | ||
1159 | cmpult $19, $3, $5 | ||
1160 | addq $5, $1, $1 | ||
1161 | addq $9, $1, $9 | ||
1162 | cmpult $9, $1, $18 | ||
1163 | addq $20, $18, $20 | ||
1164 | stq $19, 80($16) | ||
1165 | bis $31, $31, $19 | ||
1166 | mulq $8, $21, $17 | ||
1167 | umulh $8, $21, $10 | ||
1168 | addq $9, $17, $9 | ||
1169 | cmpult $9, $17, $4 | ||
1170 | addq $4, $10, $10 | ||
1171 | addq $20, $10, $20 | ||
1172 | cmpult $20, $10, $0 | ||
1173 | addq $19, $0, $19 | ||
1174 | mulq $23, $27, $6 | ||
1175 | umulh $23, $27, $2 | ||
1176 | addq $9, $6, $9 | ||
1177 | cmpult $9, $6, $3 | ||
1178 | addq $3, $2, $2 | ||
1179 | addq $20, $2, $20 | ||
1180 | cmpult $20, $2, $5 | ||
1181 | addq $19, $5, $19 | ||
1182 | mulq $25, $24, $1 | ||
1183 | umulh $25, $24, $18 | ||
1184 | addq $9, $1, $9 | ||
1185 | cmpult $9, $1, $7 | ||
1186 | addq $7, $18, $18 | ||
1187 | addq $20, $18, $20 | ||
1188 | cmpult $20, $18, $17 | ||
1189 | addq $19, $17, $19 | ||
1190 | mulq $28, $22, $4 | ||
1191 | umulh $28, $22, $10 | ||
1192 | addq $9, $4, $9 | ||
1193 | cmpult $9, $4, $0 | ||
1194 | addq $0, $10, $10 | ||
1195 | addq $20, $10, $20 | ||
1196 | cmpult $20, $10, $8 | ||
1197 | addq $19, $8, $19 | ||
1198 | stq $9, 88($16) | ||
1199 | bis $31, $31, $9 | ||
1200 | mulq $23, $21, $6 | ||
1201 | umulh $23, $21, $3 | ||
1202 | addq $20, $6, $20 | ||
1203 | cmpult $20, $6, $2 | ||
1204 | addq $2, $3, $3 | ||
1205 | addq $19, $3, $19 | ||
1206 | cmpult $19, $3, $5 | ||
1207 | addq $9, $5, $9 | ||
1208 | mulq $25, $27, $1 | ||
1209 | umulh $25, $27, $7 | ||
1210 | addq $20, $1, $20 | ||
1211 | cmpult $20, $1, $18 | ||
1212 | addq $18, $7, $7 | ||
1213 | addq $19, $7, $19 | ||
1214 | cmpult $19, $7, $17 | ||
1215 | addq $9, $17, $9 | ||
1216 | mulq $28, $24, $4 | ||
1217 | umulh $28, $24, $0 | ||
1218 | addq $20, $4, $20 | ||
1219 | cmpult $20, $4, $10 | ||
1220 | addq $10, $0, $0 | ||
1221 | addq $19, $0, $19 | ||
1222 | cmpult $19, $0, $8 | ||
1223 | addq $9, $8, $9 | ||
1224 | stq $20, 96($16) | ||
1225 | bis $31, $31, $20 | ||
1226 | mulq $25, $21, $22 | ||
1227 | umulh $25, $21, $6 | ||
1228 | addq $19, $22, $19 | ||
1229 | cmpult $19, $22, $2 | ||
1230 | addq $2, $6, $6 | ||
1231 | addq $9, $6, $9 | ||
1232 | cmpult $9, $6, $3 | ||
1233 | addq $20, $3, $20 | ||
1234 | mulq $28, $27, $5 | ||
1235 | umulh $28, $27, $23 | ||
1236 | addq $19, $5, $19 | ||
1237 | cmpult $19, $5, $1 | ||
1238 | addq $1, $23, $23 | ||
1239 | addq $9, $23, $9 | ||
1240 | cmpult $9, $23, $18 | ||
1241 | addq $20, $18, $20 | ||
1242 | stq $19, 104($16) | ||
1243 | bis $31, $31, $19 | ||
1244 | mulq $28, $21, $7 | ||
1245 | umulh $28, $21, $17 | ||
1246 | addq $9, $7, $9 | ||
1247 | cmpult $9, $7, $4 | ||
1248 | addq $4, $17, $17 | ||
1249 | addq $20, $17, $20 | ||
1250 | cmpult $20, $17, $10 | ||
1251 | addq $19, $10, $19 | ||
1252 | stq $9, 112($16) | ||
1253 | stq $20, 120($16) | ||
1254 | ldq $9, 0($30) | ||
1255 | ldq $10, 8($30) | ||
1256 | addq $30, 16, $30 | ||
1257 | ret $31,($26),1 | ||
1258 | .end bn_mul_comba8 | ||
1259 | .text | ||
1260 | .align 3 | ||
1261 | .globl bn_sqr_comba4 | ||
1262 | .ent bn_sqr_comba4 | ||
1263 | bn_sqr_comba4: | ||
1264 | bn_sqr_comba4..ng: | ||
1265 | .frame $30,0,$26,0 | ||
1266 | .prologue 0 | ||
1267 | |||
1268 | ldq $0, 0($17) | ||
1269 | ldq $1, 8($17) | ||
1270 | ldq $2, 16($17) | ||
1271 | ldq $3, 24($17) | ||
1272 | bis $31, $31, $6 | ||
1273 | mulq $0, $0, $4 | ||
1274 | umulh $0, $0, $5 | ||
1275 | stq $4, 0($16) | ||
1276 | bis $31, $31, $4 | ||
1277 | mulq $0, $1, $7 | ||
1278 | umulh $0, $1, $8 | ||
1279 | cmplt $7, $31, $22 | ||
1280 | cmplt $8, $31, $23 | ||
1281 | addq $7, $7, $7 | ||
1282 | addq $8, $8, $8 | ||
1283 | addq $8, $22, $8 | ||
1284 | addq $4, $23, $4 | ||
1285 | addq $5, $7, $5 | ||
1286 | addq $6, $8, $6 | ||
1287 | cmpult $5, $7, $24 | ||
1288 | cmpult $6, $8, $25 | ||
1289 | addq $6, $24, $6 | ||
1290 | addq $4, $25, $4 | ||
1291 | stq $5, 8($16) | ||
1292 | bis $31, $31, $5 | ||
1293 | mulq $1, $1, $27 | ||
1294 | umulh $1, $1, $28 | ||
1295 | addq $6, $27, $6 | ||
1296 | addq $4, $28, $4 | ||
1297 | cmpult $6, $27, $21 | ||
1298 | cmpult $4, $28, $20 | ||
1299 | addq $4, $21, $4 | ||
1300 | addq $5, $20, $5 | ||
1301 | mulq $2, $0, $19 | ||
1302 | umulh $2, $0, $18 | ||
1303 | cmplt $19, $31, $17 | ||
1304 | cmplt $18, $31, $22 | ||
1305 | addq $19, $19, $19 | ||
1306 | addq $18, $18, $18 | ||
1307 | addq $18, $17, $18 | ||
1308 | addq $5, $22, $5 | ||
1309 | addq $6, $19, $6 | ||
1310 | addq $4, $18, $4 | ||
1311 | cmpult $6, $19, $23 | ||
1312 | cmpult $4, $18, $7 | ||
1313 | addq $4, $23, $4 | ||
1314 | addq $5, $7, $5 | ||
1315 | stq $6, 16($16) | ||
1316 | bis $31, $31, $6 | ||
1317 | mulq $3, $0, $8 | ||
1318 | umulh $3, $0, $24 | ||
1319 | cmplt $8, $31, $25 | ||
1320 | cmplt $24, $31, $27 | ||
1321 | addq $8, $8, $8 | ||
1322 | addq $24, $24, $24 | ||
1323 | addq $24, $25, $24 | ||
1324 | addq $6, $27, $6 | ||
1325 | addq $4, $8, $4 | ||
1326 | addq $5, $24, $5 | ||
1327 | cmpult $4, $8, $28 | ||
1328 | cmpult $5, $24, $21 | ||
1329 | addq $5, $28, $5 | ||
1330 | addq $6, $21, $6 | ||
1331 | mulq $2, $1, $20 | ||
1332 | umulh $2, $1, $17 | ||
1333 | cmplt $20, $31, $22 | ||
1334 | cmplt $17, $31, $19 | ||
1335 | addq $20, $20, $20 | ||
1336 | addq $17, $17, $17 | ||
1337 | addq $17, $22, $17 | ||
1338 | addq $6, $19, $6 | ||
1339 | addq $4, $20, $4 | ||
1340 | addq $5, $17, $5 | ||
1341 | cmpult $4, $20, $18 | ||
1342 | cmpult $5, $17, $23 | ||
1343 | addq $5, $18, $5 | ||
1344 | addq $6, $23, $6 | ||
1345 | stq $4, 24($16) | ||
1346 | bis $31, $31, $4 | ||
1347 | mulq $2, $2, $7 | ||
1348 | umulh $2, $2, $25 | ||
1349 | addq $5, $7, $5 | ||
1350 | addq $6, $25, $6 | ||
1351 | cmpult $5, $7, $27 | ||
1352 | cmpult $6, $25, $8 | ||
1353 | addq $6, $27, $6 | ||
1354 | addq $4, $8, $4 | ||
1355 | mulq $3, $1, $24 | ||
1356 | umulh $3, $1, $28 | ||
1357 | cmplt $24, $31, $21 | ||
1358 | cmplt $28, $31, $22 | ||
1359 | addq $24, $24, $24 | ||
1360 | addq $28, $28, $28 | ||
1361 | addq $28, $21, $28 | ||
1362 | addq $4, $22, $4 | ||
1363 | addq $5, $24, $5 | ||
1364 | addq $6, $28, $6 | ||
1365 | cmpult $5, $24, $19 | ||
1366 | cmpult $6, $28, $20 | ||
1367 | addq $6, $19, $6 | ||
1368 | addq $4, $20, $4 | ||
1369 | stq $5, 32($16) | ||
1370 | bis $31, $31, $5 | ||
1371 | mulq $3, $2, $17 | ||
1372 | umulh $3, $2, $18 | ||
1373 | cmplt $17, $31, $23 | ||
1374 | cmplt $18, $31, $7 | ||
1375 | addq $17, $17, $17 | ||
1376 | addq $18, $18, $18 | ||
1377 | addq $18, $23, $18 | ||
1378 | addq $5, $7, $5 | ||
1379 | addq $6, $17, $6 | ||
1380 | addq $4, $18, $4 | ||
1381 | cmpult $6, $17, $25 | ||
1382 | cmpult $4, $18, $27 | ||
1383 | addq $4, $25, $4 | ||
1384 | addq $5, $27, $5 | ||
1385 | stq $6, 40($16) | ||
1386 | bis $31, $31, $6 | ||
1387 | mulq $3, $3, $8 | ||
1388 | umulh $3, $3, $21 | ||
1389 | addq $4, $8, $4 | ||
1390 | addq $5, $21, $5 | ||
1391 | cmpult $4, $8, $22 | ||
1392 | cmpult $5, $21, $24 | ||
1393 | addq $5, $22, $5 | ||
1394 | addq $6, $24, $6 | ||
1395 | stq $4, 48($16) | ||
1396 | stq $5, 56($16) | ||
1397 | ret $31,($26),1 | ||
1398 | .end bn_sqr_comba4 | ||
1399 | .text | ||
1400 | .align 3 | ||
1401 | .globl bn_sqr_comba8 | ||
1402 | .ent bn_sqr_comba8 | ||
1403 | bn_sqr_comba8: | ||
1404 | bn_sqr_comba8..ng: | ||
1405 | .frame $30,0,$26,0 | ||
1406 | .prologue 0 | ||
344 | 1407 | ||
1408 | ldq $0, 0($17) | ||
1409 | ldq $1, 8($17) | ||
1410 | ldq $2, 16($17) | ||
1411 | ldq $3, 24($17) | ||
1412 | ldq $4, 32($17) | ||
1413 | ldq $5, 40($17) | ||
1414 | ldq $6, 48($17) | ||
1415 | ldq $7, 56($17) | ||
1416 | bis $31, $31, $23 | ||
1417 | mulq $0, $0, $8 | ||
1418 | umulh $0, $0, $22 | ||
1419 | stq $8, 0($16) | ||
1420 | bis $31, $31, $8 | ||
1421 | mulq $1, $0, $24 | ||
1422 | umulh $1, $0, $25 | ||
1423 | cmplt $24, $31, $27 | ||
1424 | cmplt $25, $31, $28 | ||
1425 | addq $24, $24, $24 | ||
1426 | addq $25, $25, $25 | ||
1427 | addq $25, $27, $25 | ||
1428 | addq $8, $28, $8 | ||
1429 | addq $22, $24, $22 | ||
1430 | addq $23, $25, $23 | ||
1431 | cmpult $22, $24, $21 | ||
1432 | cmpult $23, $25, $20 | ||
1433 | addq $23, $21, $23 | ||
1434 | addq $8, $20, $8 | ||
1435 | stq $22, 8($16) | ||
1436 | bis $31, $31, $22 | ||
1437 | mulq $1, $1, $19 | ||
1438 | umulh $1, $1, $18 | ||
1439 | addq $23, $19, $23 | ||
1440 | addq $8, $18, $8 | ||
1441 | cmpult $23, $19, $17 | ||
1442 | cmpult $8, $18, $27 | ||
1443 | addq $8, $17, $8 | ||
1444 | addq $22, $27, $22 | ||
1445 | mulq $2, $0, $28 | ||
1446 | umulh $2, $0, $24 | ||
1447 | cmplt $28, $31, $25 | ||
1448 | cmplt $24, $31, $21 | ||
1449 | addq $28, $28, $28 | ||
1450 | addq $24, $24, $24 | ||
1451 | addq $24, $25, $24 | ||
1452 | addq $22, $21, $22 | ||
1453 | addq $23, $28, $23 | ||
1454 | addq $8, $24, $8 | ||
1455 | cmpult $23, $28, $20 | ||
1456 | cmpult $8, $24, $19 | ||
1457 | addq $8, $20, $8 | ||
1458 | addq $22, $19, $22 | ||
1459 | stq $23, 16($16) | ||
1460 | bis $31, $31, $23 | ||
1461 | mulq $2, $1, $18 | ||
1462 | umulh $2, $1, $17 | ||
1463 | cmplt $18, $31, $27 | ||
1464 | cmplt $17, $31, $25 | ||
1465 | addq $18, $18, $18 | ||
1466 | addq $17, $17, $17 | ||
1467 | addq $17, $27, $17 | ||
1468 | addq $23, $25, $23 | ||
1469 | addq $8, $18, $8 | ||
1470 | addq $22, $17, $22 | ||
1471 | cmpult $8, $18, $21 | ||
1472 | cmpult $22, $17, $28 | ||
1473 | addq $22, $21, $22 | ||
1474 | addq $23, $28, $23 | ||
1475 | mulq $3, $0, $24 | ||
1476 | umulh $3, $0, $20 | ||
1477 | cmplt $24, $31, $19 | ||
1478 | cmplt $20, $31, $27 | ||
1479 | addq $24, $24, $24 | ||
1480 | addq $20, $20, $20 | ||
1481 | addq $20, $19, $20 | ||
1482 | addq $23, $27, $23 | ||
1483 | addq $8, $24, $8 | ||
1484 | addq $22, $20, $22 | ||
1485 | cmpult $8, $24, $25 | ||
1486 | cmpult $22, $20, $18 | ||
1487 | addq $22, $25, $22 | ||
1488 | addq $23, $18, $23 | ||
1489 | stq $8, 24($16) | ||
1490 | bis $31, $31, $8 | ||
1491 | mulq $2, $2, $17 | ||
1492 | umulh $2, $2, $21 | ||
1493 | addq $22, $17, $22 | ||
1494 | addq $23, $21, $23 | ||
1495 | cmpult $22, $17, $28 | ||
1496 | cmpult $23, $21, $19 | ||
1497 | addq $23, $28, $23 | ||
1498 | addq $8, $19, $8 | ||
1499 | mulq $3, $1, $27 | ||
1500 | umulh $3, $1, $24 | ||
1501 | cmplt $27, $31, $20 | ||
1502 | cmplt $24, $31, $25 | ||
1503 | addq $27, $27, $27 | ||
1504 | addq $24, $24, $24 | ||
1505 | addq $24, $20, $24 | ||
1506 | addq $8, $25, $8 | ||
1507 | addq $22, $27, $22 | ||
1508 | addq $23, $24, $23 | ||
1509 | cmpult $22, $27, $18 | ||
1510 | cmpult $23, $24, $17 | ||
1511 | addq $23, $18, $23 | ||
1512 | addq $8, $17, $8 | ||
1513 | mulq $4, $0, $21 | ||
1514 | umulh $4, $0, $28 | ||
1515 | cmplt $21, $31, $19 | ||
1516 | cmplt $28, $31, $20 | ||
1517 | addq $21, $21, $21 | ||
1518 | addq $28, $28, $28 | ||
1519 | addq $28, $19, $28 | ||
1520 | addq $8, $20, $8 | ||
1521 | addq $22, $21, $22 | ||
1522 | addq $23, $28, $23 | ||
1523 | cmpult $22, $21, $25 | ||
1524 | cmpult $23, $28, $27 | ||
1525 | addq $23, $25, $23 | ||
1526 | addq $8, $27, $8 | ||
1527 | stq $22, 32($16) | ||
1528 | bis $31, $31, $22 | ||
1529 | mulq $3, $2, $24 | ||
1530 | umulh $3, $2, $18 | ||
1531 | cmplt $24, $31, $17 | ||
1532 | cmplt $18, $31, $19 | ||
1533 | addq $24, $24, $24 | ||
1534 | addq $18, $18, $18 | ||
1535 | addq $18, $17, $18 | ||
1536 | addq $22, $19, $22 | ||
1537 | addq $23, $24, $23 | ||
1538 | addq $8, $18, $8 | ||
1539 | cmpult $23, $24, $20 | ||
1540 | cmpult $8, $18, $21 | ||
1541 | addq $8, $20, $8 | ||
1542 | addq $22, $21, $22 | ||
1543 | mulq $4, $1, $28 | ||
1544 | umulh $4, $1, $25 | ||
1545 | cmplt $28, $31, $27 | ||
1546 | cmplt $25, $31, $17 | ||
1547 | addq $28, $28, $28 | ||
1548 | addq $25, $25, $25 | ||
1549 | addq $25, $27, $25 | ||
1550 | addq $22, $17, $22 | ||
1551 | addq $23, $28, $23 | ||
1552 | addq $8, $25, $8 | ||
1553 | cmpult $23, $28, $19 | ||
1554 | cmpult $8, $25, $24 | ||
1555 | addq $8, $19, $8 | ||
1556 | addq $22, $24, $22 | ||
1557 | mulq $5, $0, $18 | ||
1558 | umulh $5, $0, $20 | ||
1559 | cmplt $18, $31, $21 | ||
1560 | cmplt $20, $31, $27 | ||
1561 | addq $18, $18, $18 | ||
1562 | addq $20, $20, $20 | ||
1563 | addq $20, $21, $20 | ||
1564 | addq $22, $27, $22 | ||
1565 | addq $23, $18, $23 | ||
1566 | addq $8, $20, $8 | ||
1567 | cmpult $23, $18, $17 | ||
1568 | cmpult $8, $20, $28 | ||
1569 | addq $8, $17, $8 | ||
1570 | addq $22, $28, $22 | ||
1571 | stq $23, 40($16) | ||
1572 | bis $31, $31, $23 | ||
1573 | mulq $3, $3, $25 | ||
1574 | umulh $3, $3, $19 | ||
1575 | addq $8, $25, $8 | ||
1576 | addq $22, $19, $22 | ||
1577 | cmpult $8, $25, $24 | ||
1578 | cmpult $22, $19, $21 | ||
1579 | addq $22, $24, $22 | ||
1580 | addq $23, $21, $23 | ||
1581 | mulq $4, $2, $27 | ||
1582 | umulh $4, $2, $18 | ||
1583 | cmplt $27, $31, $20 | ||
1584 | cmplt $18, $31, $17 | ||
1585 | addq $27, $27, $27 | ||
1586 | addq $18, $18, $18 | ||
1587 | addq $18, $20, $18 | ||
1588 | addq $23, $17, $23 | ||
1589 | addq $8, $27, $8 | ||
1590 | addq $22, $18, $22 | ||
1591 | cmpult $8, $27, $28 | ||
1592 | cmpult $22, $18, $25 | ||
1593 | addq $22, $28, $22 | ||
1594 | addq $23, $25, $23 | ||
1595 | mulq $5, $1, $19 | ||
1596 | umulh $5, $1, $24 | ||
1597 | cmplt $19, $31, $21 | ||
1598 | cmplt $24, $31, $20 | ||
1599 | addq $19, $19, $19 | ||
1600 | addq $24, $24, $24 | ||
1601 | addq $24, $21, $24 | ||
1602 | addq $23, $20, $23 | ||
1603 | addq $8, $19, $8 | ||
1604 | addq $22, $24, $22 | ||
1605 | cmpult $8, $19, $17 | ||
1606 | cmpult $22, $24, $27 | ||
1607 | addq $22, $17, $22 | ||
1608 | addq $23, $27, $23 | ||
1609 | mulq $6, $0, $18 | ||
1610 | umulh $6, $0, $28 | ||
1611 | cmplt $18, $31, $25 | ||
1612 | cmplt $28, $31, $21 | ||
1613 | addq $18, $18, $18 | ||
1614 | addq $28, $28, $28 | ||
1615 | addq $28, $25, $28 | ||
1616 | addq $23, $21, $23 | ||
1617 | addq $8, $18, $8 | ||
1618 | addq $22, $28, $22 | ||
1619 | cmpult $8, $18, $20 | ||
1620 | cmpult $22, $28, $19 | ||
1621 | addq $22, $20, $22 | ||
1622 | addq $23, $19, $23 | ||
1623 | stq $8, 48($16) | ||
1624 | bis $31, $31, $8 | ||
1625 | mulq $4, $3, $24 | ||
1626 | umulh $4, $3, $17 | ||
1627 | cmplt $24, $31, $27 | ||
1628 | cmplt $17, $31, $25 | ||
1629 | addq $24, $24, $24 | ||
1630 | addq $17, $17, $17 | ||
1631 | addq $17, $27, $17 | ||
1632 | addq $8, $25, $8 | ||
1633 | addq $22, $24, $22 | ||
1634 | addq $23, $17, $23 | ||
1635 | cmpult $22, $24, $21 | ||
1636 | cmpult $23, $17, $18 | ||
1637 | addq $23, $21, $23 | ||
1638 | addq $8, $18, $8 | ||
1639 | mulq $5, $2, $28 | ||
1640 | umulh $5, $2, $20 | ||
1641 | cmplt $28, $31, $19 | ||
1642 | cmplt $20, $31, $27 | ||
1643 | addq $28, $28, $28 | ||
1644 | addq $20, $20, $20 | ||
1645 | addq $20, $19, $20 | ||
1646 | addq $8, $27, $8 | ||
1647 | addq $22, $28, $22 | ||
1648 | addq $23, $20, $23 | ||
1649 | cmpult $22, $28, $25 | ||
1650 | cmpult $23, $20, $24 | ||
1651 | addq $23, $25, $23 | ||
1652 | addq $8, $24, $8 | ||
1653 | mulq $6, $1, $17 | ||
1654 | umulh $6, $1, $21 | ||
1655 | cmplt $17, $31, $18 | ||
1656 | cmplt $21, $31, $19 | ||
1657 | addq $17, $17, $17 | ||
1658 | addq $21, $21, $21 | ||
1659 | addq $21, $18, $21 | ||
1660 | addq $8, $19, $8 | ||
1661 | addq $22, $17, $22 | ||
1662 | addq $23, $21, $23 | ||
1663 | cmpult $22, $17, $27 | ||
1664 | cmpult $23, $21, $28 | ||
1665 | addq $23, $27, $23 | ||
1666 | addq $8, $28, $8 | ||
1667 | mulq $7, $0, $20 | ||
1668 | umulh $7, $0, $25 | ||
1669 | cmplt $20, $31, $24 | ||
1670 | cmplt $25, $31, $18 | ||
1671 | addq $20, $20, $20 | ||
1672 | addq $25, $25, $25 | ||
1673 | addq $25, $24, $25 | ||
1674 | addq $8, $18, $8 | ||
1675 | addq $22, $20, $22 | ||
1676 | addq $23, $25, $23 | ||
1677 | cmpult $22, $20, $19 | ||
1678 | cmpult $23, $25, $17 | ||
1679 | addq $23, $19, $23 | ||
1680 | addq $8, $17, $8 | ||
1681 | stq $22, 56($16) | ||
1682 | bis $31, $31, $22 | ||
1683 | mulq $4, $4, $21 | ||
1684 | umulh $4, $4, $27 | ||
1685 | addq $23, $21, $23 | ||
1686 | addq $8, $27, $8 | ||
1687 | cmpult $23, $21, $28 | ||
1688 | cmpult $8, $27, $24 | ||
1689 | addq $8, $28, $8 | ||
1690 | addq $22, $24, $22 | ||
1691 | mulq $5, $3, $18 | ||
1692 | umulh $5, $3, $20 | ||
1693 | cmplt $18, $31, $25 | ||
1694 | cmplt $20, $31, $19 | ||
1695 | addq $18, $18, $18 | ||
1696 | addq $20, $20, $20 | ||
1697 | addq $20, $25, $20 | ||
1698 | addq $22, $19, $22 | ||
1699 | addq $23, $18, $23 | ||
1700 | addq $8, $20, $8 | ||
1701 | cmpult $23, $18, $17 | ||
1702 | cmpult $8, $20, $21 | ||
1703 | addq $8, $17, $8 | ||
1704 | addq $22, $21, $22 | ||
1705 | mulq $6, $2, $27 | ||
1706 | umulh $6, $2, $28 | ||
1707 | cmplt $27, $31, $24 | ||
1708 | cmplt $28, $31, $25 | ||
1709 | addq $27, $27, $27 | ||
1710 | addq $28, $28, $28 | ||
1711 | addq $28, $24, $28 | ||
1712 | addq $22, $25, $22 | ||
1713 | addq $23, $27, $23 | ||
1714 | addq $8, $28, $8 | ||
1715 | cmpult $23, $27, $19 | ||
1716 | cmpult $8, $28, $18 | ||
1717 | addq $8, $19, $8 | ||
1718 | addq $22, $18, $22 | ||
1719 | mulq $7, $1, $20 | ||
1720 | umulh $7, $1, $17 | ||
1721 | cmplt $20, $31, $21 | ||
1722 | cmplt $17, $31, $24 | ||
1723 | addq $20, $20, $20 | ||
1724 | addq $17, $17, $17 | ||
1725 | addq $17, $21, $17 | ||
1726 | addq $22, $24, $22 | ||
1727 | addq $23, $20, $23 | ||
1728 | addq $8, $17, $8 | ||
1729 | cmpult $23, $20, $25 | ||
1730 | cmpult $8, $17, $27 | ||
1731 | addq $8, $25, $8 | ||
1732 | addq $22, $27, $22 | ||
1733 | stq $23, 64($16) | ||
1734 | bis $31, $31, $23 | ||
1735 | mulq $5, $4, $28 | ||
1736 | umulh $5, $4, $19 | ||
1737 | cmplt $28, $31, $18 | ||
1738 | cmplt $19, $31, $21 | ||
1739 | addq $28, $28, $28 | ||
1740 | addq $19, $19, $19 | ||
1741 | addq $19, $18, $19 | ||
1742 | addq $23, $21, $23 | ||
1743 | addq $8, $28, $8 | ||
1744 | addq $22, $19, $22 | ||
1745 | cmpult $8, $28, $24 | ||
1746 | cmpult $22, $19, $20 | ||
1747 | addq $22, $24, $22 | ||
1748 | addq $23, $20, $23 | ||
1749 | mulq $6, $3, $17 | ||
1750 | umulh $6, $3, $25 | ||
1751 | cmplt $17, $31, $27 | ||
1752 | cmplt $25, $31, $18 | ||
1753 | addq $17, $17, $17 | ||
1754 | addq $25, $25, $25 | ||
1755 | addq $25, $27, $25 | ||
1756 | addq $23, $18, $23 | ||
1757 | addq $8, $17, $8 | ||
1758 | addq $22, $25, $22 | ||
1759 | cmpult $8, $17, $21 | ||
1760 | cmpult $22, $25, $28 | ||
1761 | addq $22, $21, $22 | ||
1762 | addq $23, $28, $23 | ||
1763 | mulq $7, $2, $19 | ||
1764 | umulh $7, $2, $24 | ||
1765 | cmplt $19, $31, $20 | ||
1766 | cmplt $24, $31, $27 | ||
1767 | addq $19, $19, $19 | ||
1768 | addq $24, $24, $24 | ||
1769 | addq $24, $20, $24 | ||
1770 | addq $23, $27, $23 | ||
1771 | addq $8, $19, $8 | ||
1772 | addq $22, $24, $22 | ||
1773 | cmpult $8, $19, $18 | ||
1774 | cmpult $22, $24, $17 | ||
1775 | addq $22, $18, $22 | ||
1776 | addq $23, $17, $23 | ||
1777 | stq $8, 72($16) | ||
1778 | bis $31, $31, $8 | ||
1779 | mulq $5, $5, $25 | ||
1780 | umulh $5, $5, $21 | ||
1781 | addq $22, $25, $22 | ||
1782 | addq $23, $21, $23 | ||
1783 | cmpult $22, $25, $28 | ||
1784 | cmpult $23, $21, $20 | ||
1785 | addq $23, $28, $23 | ||
1786 | addq $8, $20, $8 | ||
1787 | mulq $6, $4, $27 | ||
1788 | umulh $6, $4, $19 | ||
1789 | cmplt $27, $31, $24 | ||
1790 | cmplt $19, $31, $18 | ||
1791 | addq $27, $27, $27 | ||
1792 | addq $19, $19, $19 | ||
1793 | addq $19, $24, $19 | ||
1794 | addq $8, $18, $8 | ||
1795 | addq $22, $27, $22 | ||
1796 | addq $23, $19, $23 | ||
1797 | cmpult $22, $27, $17 | ||
1798 | cmpult $23, $19, $25 | ||
1799 | addq $23, $17, $23 | ||
1800 | addq $8, $25, $8 | ||
1801 | mulq $7, $3, $21 | ||
1802 | umulh $7, $3, $28 | ||
1803 | cmplt $21, $31, $20 | ||
1804 | cmplt $28, $31, $24 | ||
1805 | addq $21, $21, $21 | ||
1806 | addq $28, $28, $28 | ||
1807 | addq $28, $20, $28 | ||
1808 | addq $8, $24, $8 | ||
1809 | addq $22, $21, $22 | ||
1810 | addq $23, $28, $23 | ||
1811 | cmpult $22, $21, $18 | ||
1812 | cmpult $23, $28, $27 | ||
1813 | addq $23, $18, $23 | ||
1814 | addq $8, $27, $8 | ||
1815 | stq $22, 80($16) | ||
1816 | bis $31, $31, $22 | ||
1817 | mulq $6, $5, $19 | ||
1818 | umulh $6, $5, $17 | ||
1819 | cmplt $19, $31, $25 | ||
1820 | cmplt $17, $31, $20 | ||
1821 | addq $19, $19, $19 | ||
1822 | addq $17, $17, $17 | ||
1823 | addq $17, $25, $17 | ||
1824 | addq $22, $20, $22 | ||
1825 | addq $23, $19, $23 | ||
1826 | addq $8, $17, $8 | ||
1827 | cmpult $23, $19, $24 | ||
1828 | cmpult $8, $17, $21 | ||
1829 | addq $8, $24, $8 | ||
1830 | addq $22, $21, $22 | ||
1831 | mulq $7, $4, $28 | ||
1832 | umulh $7, $4, $18 | ||
1833 | cmplt $28, $31, $27 | ||
1834 | cmplt $18, $31, $25 | ||
1835 | addq $28, $28, $28 | ||
1836 | addq $18, $18, $18 | ||
1837 | addq $18, $27, $18 | ||
1838 | addq $22, $25, $22 | ||
1839 | addq $23, $28, $23 | ||
1840 | addq $8, $18, $8 | ||
1841 | cmpult $23, $28, $20 | ||
1842 | cmpult $8, $18, $19 | ||
1843 | addq $8, $20, $8 | ||
1844 | addq $22, $19, $22 | ||
1845 | stq $23, 88($16) | ||
1846 | bis $31, $31, $23 | ||
1847 | mulq $6, $6, $17 | ||
1848 | umulh $6, $6, $24 | ||
1849 | addq $8, $17, $8 | ||
1850 | addq $22, $24, $22 | ||
1851 | cmpult $8, $17, $21 | ||
1852 | cmpult $22, $24, $27 | ||
1853 | addq $22, $21, $22 | ||
1854 | addq $23, $27, $23 | ||
1855 | mulq $7, $5, $25 | ||
1856 | umulh $7, $5, $28 | ||
1857 | cmplt $25, $31, $18 | ||
1858 | cmplt $28, $31, $20 | ||
1859 | addq $25, $25, $25 | ||
1860 | addq $28, $28, $28 | ||
1861 | addq $28, $18, $28 | ||
1862 | addq $23, $20, $23 | ||
1863 | addq $8, $25, $8 | ||
1864 | addq $22, $28, $22 | ||
1865 | cmpult $8, $25, $19 | ||
1866 | cmpult $22, $28, $17 | ||
1867 | addq $22, $19, $22 | ||
1868 | addq $23, $17, $23 | ||
1869 | stq $8, 96($16) | ||
1870 | bis $31, $31, $8 | ||
1871 | mulq $7, $6, $24 | ||
1872 | umulh $7, $6, $21 | ||
1873 | cmplt $24, $31, $27 | ||
1874 | cmplt $21, $31, $18 | ||
1875 | addq $24, $24, $24 | ||
1876 | addq $21, $21, $21 | ||
1877 | addq $21, $27, $21 | ||
1878 | addq $8, $18, $8 | ||
1879 | addq $22, $24, $22 | ||
1880 | addq $23, $21, $23 | ||
1881 | cmpult $22, $24, $20 | ||
1882 | cmpult $23, $21, $25 | ||
1883 | addq $23, $20, $23 | ||
1884 | addq $8, $25, $8 | ||
1885 | stq $22, 104($16) | ||
1886 | bis $31, $31, $22 | ||
1887 | mulq $7, $7, $28 | ||
1888 | umulh $7, $7, $19 | ||
1889 | addq $23, $28, $23 | ||
1890 | addq $8, $19, $8 | ||
1891 | cmpult $23, $28, $17 | ||
1892 | cmpult $8, $19, $27 | ||
1893 | addq $8, $17, $8 | ||
1894 | addq $22, $27, $22 | ||
1895 | stq $23, 112($16) | ||
1896 | stq $8, 120($16) | ||
1897 | ret $31,($26),1 | ||
1898 | .end bn_sqr_comba8 | ||
diff --git a/src/lib/libcrypto/bn/asm/alpha.s.works b/src/lib/libcrypto/bn/asm/alpha.s.works new file mode 100644 index 0000000000..ee6c587809 --- /dev/null +++ b/src/lib/libcrypto/bn/asm/alpha.s.works | |||
@@ -0,0 +1,533 @@ | |||
1 | |||
2 | # DEC Alpha assember | ||
3 | # The bn_div64 is actually gcc output but the other parts are hand done. | ||
4 | # Thanks to tzeruch@ceddec.com for sending me the gcc output for | ||
5 | # bn_div64. | ||
6 | # I've gone back and re-done most of routines. | ||
7 | # The key thing to remeber for the 164 CPU is that while a | ||
8 | # multiply operation takes 8 cycles, another one can only be issued | ||
9 | # after 4 cycles have elapsed. I've done modification to help | ||
10 | # improve this. Also, normally, a ld instruction will not be available | ||
11 | # for about 3 cycles. | ||
12 | .file 1 "bn_asm.c" | ||
13 | .set noat | ||
14 | gcc2_compiled.: | ||
15 | __gnu_compiled_c: | ||
16 | .text | ||
17 | .align 3 | ||
18 | .globl bn_mul_add_words | ||
19 | .ent bn_mul_add_words | ||
20 | bn_mul_add_words: | ||
21 | bn_mul_add_words..ng: | ||
22 | .frame $30,0,$26,0 | ||
23 | .prologue 0 | ||
24 | .align 5 | ||
25 | subq $18,4,$18 | ||
26 | bis $31,$31,$0 | ||
27 | blt $18,$43 # if we are -1, -2, -3 or -4 goto tail code | ||
28 | ldq $20,0($17) # 1 1 | ||
29 | ldq $1,0($16) # 1 1 | ||
30 | .align 3 | ||
31 | $42: | ||
32 | mulq $20,$19,$5 # 1 2 1 ###### | ||
33 | ldq $21,8($17) # 2 1 | ||
34 | ldq $2,8($16) # 2 1 | ||
35 | umulh $20,$19,$20 # 1 2 ###### | ||
36 | ldq $27,16($17) # 3 1 | ||
37 | ldq $3,16($16) # 3 1 | ||
38 | mulq $21,$19,$6 # 2 2 1 ###### | ||
39 | ldq $28,24($17) # 4 1 | ||
40 | addq $1,$5,$1 # 1 2 2 | ||
41 | ldq $4,24($16) # 4 1 | ||
42 | umulh $21,$19,$21 # 2 2 ###### | ||
43 | cmpult $1,$5,$22 # 1 2 3 1 | ||
44 | addq $20,$22,$20 # 1 3 1 | ||
45 | addq $1,$0,$1 # 1 2 3 1 | ||
46 | mulq $27,$19,$7 # 3 2 1 ###### | ||
47 | cmpult $1,$0,$0 # 1 2 3 2 | ||
48 | addq $2,$6,$2 # 2 2 2 | ||
49 | addq $20,$0,$0 # 1 3 2 | ||
50 | cmpult $2,$6,$23 # 2 2 3 1 | ||
51 | addq $21,$23,$21 # 2 3 1 | ||
52 | umulh $27,$19,$27 # 3 2 ###### | ||
53 | addq $2,$0,$2 # 2 2 3 1 | ||
54 | cmpult $2,$0,$0 # 2 2 3 2 | ||
55 | subq $18,4,$18 | ||
56 | mulq $28,$19,$8 # 4 2 1 ###### | ||
57 | addq $21,$0,$0 # 2 3 2 | ||
58 | addq $3,$7,$3 # 3 2 2 | ||
59 | addq $16,32,$16 | ||
60 | cmpult $3,$7,$24 # 3 2 3 1 | ||
61 | stq $1,-32($16) # 1 2 4 | ||
62 | umulh $28,$19,$28 # 4 2 ###### | ||
63 | addq $27,$24,$27 # 3 3 1 | ||
64 | addq $3,$0,$3 # 3 2 3 1 | ||
65 | stq $2,-24($16) # 2 2 4 | ||
66 | cmpult $3,$0,$0 # 3 2 3 2 | ||
67 | stq $3,-16($16) # 3 2 4 | ||
68 | addq $4,$8,$4 # 4 2 2 | ||
69 | addq $27,$0,$0 # 3 3 2 | ||
70 | cmpult $4,$8,$25 # 4 2 3 1 | ||
71 | addq $17,32,$17 | ||
72 | addq $28,$25,$28 # 4 3 1 | ||
73 | addq $4,$0,$4 # 4 2 3 1 | ||
74 | cmpult $4,$0,$0 # 4 2 3 2 | ||
75 | stq $4,-8($16) # 4 2 4 | ||
76 | addq $28,$0,$0 # 4 3 2 | ||
77 | blt $18,$43 | ||
78 | |||
79 | ldq $20,0($17) # 1 1 | ||
80 | ldq $1,0($16) # 1 1 | ||
81 | |||
82 | br $42 | ||
83 | |||
84 | .align 4 | ||
85 | $45: | ||
86 | ldq $20,0($17) # 4 1 | ||
87 | ldq $1,0($16) # 4 1 | ||
88 | mulq $20,$19,$5 # 4 2 1 | ||
89 | subq $18,1,$18 | ||
90 | addq $16,8,$16 | ||
91 | addq $17,8,$17 | ||
92 | umulh $20,$19,$20 # 4 2 | ||
93 | addq $1,$5,$1 # 4 2 2 | ||
94 | cmpult $1,$5,$22 # 4 2 3 1 | ||
95 | addq $20,$22,$20 # 4 3 1 | ||
96 | addq $1,$0,$1 # 4 2 3 1 | ||
97 | cmpult $1,$0,$0 # 4 2 3 2 | ||
98 | addq $20,$0,$0 # 4 3 2 | ||
99 | stq $1,-8($16) # 4 2 4 | ||
100 | bgt $18,$45 | ||
101 | ret $31,($26),1 # else exit | ||
102 | |||
103 | .align 4 | ||
104 | $43: | ||
105 | addq $18,4,$18 | ||
106 | bgt $18,$45 # goto tail code | ||
107 | ret $31,($26),1 # else exit | ||
108 | |||
109 | .end bn_mul_add_words | ||
110 | .align 3 | ||
111 | .globl bn_mul_words | ||
112 | .ent bn_mul_words | ||
113 | bn_mul_words: | ||
114 | bn_mul_words..ng: | ||
115 | .frame $30,0,$26,0 | ||
116 | .prologue 0 | ||
117 | .align 5 | ||
118 | subq $18,4,$18 | ||
119 | bis $31,$31,$0 | ||
120 | blt $18,$143 # if we are -1, -2, -3 or -4 goto tail code | ||
121 | ldq $20,0($17) # 1 1 | ||
122 | .align 3 | ||
123 | $142: | ||
124 | |||
125 | mulq $20,$19,$5 # 1 2 1 ##### | ||
126 | ldq $21,8($17) # 2 1 | ||
127 | ldq $27,16($17) # 3 1 | ||
128 | umulh $20,$19,$20 # 1 2 ##### | ||
129 | ldq $28,24($17) # 4 1 | ||
130 | mulq $21,$19,$6 # 2 2 1 ##### | ||
131 | addq $5,$0,$5 # 1 2 3 1 | ||
132 | subq $18,4,$18 | ||
133 | cmpult $5,$0,$0 # 1 2 3 2 | ||
134 | umulh $21,$19,$21 # 2 2 ##### | ||
135 | addq $20,$0,$0 # 1 3 2 | ||
136 | addq $17,32,$17 | ||
137 | addq $6,$0,$6 # 2 2 3 1 | ||
138 | mulq $27,$19,$7 # 3 2 1 ##### | ||
139 | cmpult $6,$0,$0 # 2 2 3 2 | ||
140 | addq $21,$0,$0 # 2 3 2 | ||
141 | addq $16,32,$16 | ||
142 | umulh $27,$19,$27 # 3 2 ##### | ||
143 | stq $5,-32($16) # 1 2 4 | ||
144 | mulq $28,$19,$8 # 4 2 1 ##### | ||
145 | addq $7,$0,$7 # 3 2 3 1 | ||
146 | stq $6,-24($16) # 2 2 4 | ||
147 | cmpult $7,$0,$0 # 3 2 3 2 | ||
148 | umulh $28,$19,$28 # 4 2 ##### | ||
149 | addq $27,$0,$0 # 3 3 2 | ||
150 | stq $7,-16($16) # 3 2 4 | ||
151 | addq $8,$0,$8 # 4 2 3 1 | ||
152 | cmpult $8,$0,$0 # 4 2 3 2 | ||
153 | |||
154 | addq $28,$0,$0 # 4 3 2 | ||
155 | |||
156 | stq $8,-8($16) # 4 2 4 | ||
157 | |||
158 | blt $18,$143 | ||
159 | |||
160 | ldq $20,0($17) # 1 1 | ||
161 | |||
162 | br $142 | ||
163 | |||
164 | .align 4 | ||
165 | $145: | ||
166 | ldq $20,0($17) # 4 1 | ||
167 | mulq $20,$19,$5 # 4 2 1 | ||
168 | subq $18,1,$18 | ||
169 | umulh $20,$19,$20 # 4 2 | ||
170 | addq $5,$0,$5 # 4 2 3 1 | ||
171 | addq $16,8,$16 | ||
172 | cmpult $5,$0,$0 # 4 2 3 2 | ||
173 | addq $17,8,$17 | ||
174 | addq $20,$0,$0 # 4 3 2 | ||
175 | stq $5,-8($16) # 4 2 4 | ||
176 | |||
177 | bgt $18,$145 | ||
178 | ret $31,($26),1 # else exit | ||
179 | |||
180 | .align 4 | ||
181 | $143: | ||
182 | addq $18,4,$18 | ||
183 | bgt $18,$145 # goto tail code | ||
184 | ret $31,($26),1 # else exit | ||
185 | |||
186 | .end bn_mul_words | ||
187 | .align 3 | ||
188 | .globl bn_sqr_words | ||
189 | .ent bn_sqr_words | ||
190 | bn_sqr_words: | ||
191 | bn_sqr_words..ng: | ||
192 | .frame $30,0,$26,0 | ||
193 | .prologue 0 | ||
194 | |||
195 | subq $18,4,$18 | ||
196 | blt $18,$543 # if we are -1, -2, -3 or -4 goto tail code | ||
197 | ldq $20,0($17) # 1 1 | ||
198 | .align 3 | ||
199 | $542: | ||
200 | mulq $20,$20,$5 ###### | ||
201 | ldq $21,8($17) # 1 1 | ||
202 | subq $18,4 | ||
203 | umulh $20,$20,$1 ###### | ||
204 | ldq $27,16($17) # 1 1 | ||
205 | mulq $21,$21,$6 ###### | ||
206 | ldq $28,24($17) # 1 1 | ||
207 | stq $5,0($16) # r[0] | ||
208 | umulh $21,$21,$2 ###### | ||
209 | stq $1,8($16) # r[1] | ||
210 | mulq $27,$27,$7 ###### | ||
211 | stq $6,16($16) # r[0] | ||
212 | umulh $27,$27,$3 ###### | ||
213 | stq $2,24($16) # r[1] | ||
214 | mulq $28,$28,$8 ###### | ||
215 | stq $7,32($16) # r[0] | ||
216 | umulh $28,$28,$4 ###### | ||
217 | stq $3,40($16) # r[1] | ||
218 | |||
219 | addq $16,64,$16 | ||
220 | addq $17,32,$17 | ||
221 | stq $8,-16($16) # r[0] | ||
222 | stq $4,-8($16) # r[1] | ||
223 | |||
224 | blt $18,$543 | ||
225 | ldq $20,0($17) # 1 1 | ||
226 | br $542 | ||
227 | |||
228 | $442: | ||
229 | ldq $20,0($17) # a[0] | ||
230 | mulq $20,$20,$5 # a[0]*w low part r2 | ||
231 | addq $16,16,$16 | ||
232 | addq $17,8,$17 | ||
233 | subq $18,1,$18 | ||
234 | umulh $20,$20,$1 # a[0]*w high part r3 | ||
235 | stq $5,-16($16) # r[0] | ||
236 | stq $1,-8($16) # r[1] | ||
237 | |||
238 | bgt $18,$442 | ||
239 | ret $31,($26),1 # else exit | ||
240 | |||
241 | .align 4 | ||
242 | $543: | ||
243 | addq $18,4,$18 | ||
244 | bgt $18,$442 # goto tail code | ||
245 | ret $31,($26),1 # else exit | ||
246 | .end bn_sqr_words | ||
247 | |||
248 | .align 3 | ||
249 | .globl bn_add_words | ||
250 | .ent bn_add_words | ||
251 | bn_add_words: | ||
252 | bn_add_words..ng: | ||
253 | .frame $30,0,$26,0 | ||
254 | .prologue 0 | ||
255 | |||
256 | subq $19,4,$19 | ||
257 | bis $31,$31,$0 # carry = 0 | ||
258 | blt $19,$900 | ||
259 | ldq $5,0($17) # a[0] | ||
260 | ldq $1,0($18) # b[1] | ||
261 | .align 3 | ||
262 | $901: | ||
263 | addq $1,$5,$1 # r=a+b; | ||
264 | ldq $6,8($17) # a[1] | ||
265 | cmpult $1,$5,$22 # did we overflow? | ||
266 | ldq $2,8($18) # b[1] | ||
267 | addq $1,$0,$1 # c+= overflow | ||
268 | ldq $7,16($17) # a[2] | ||
269 | cmpult $1,$0,$0 # overflow? | ||
270 | ldq $3,16($18) # b[2] | ||
271 | addq $0,$22,$0 | ||
272 | ldq $8,24($17) # a[3] | ||
273 | addq $2,$6,$2 # r=a+b; | ||
274 | ldq $4,24($18) # b[3] | ||
275 | cmpult $2,$6,$23 # did we overflow? | ||
276 | addq $3,$7,$3 # r=a+b; | ||
277 | addq $2,$0,$2 # c+= overflow | ||
278 | cmpult $3,$7,$24 # did we overflow? | ||
279 | cmpult $2,$0,$0 # overflow? | ||
280 | addq $4,$8,$4 # r=a+b; | ||
281 | addq $0,$23,$0 | ||
282 | cmpult $4,$8,$25 # did we overflow? | ||
283 | addq $3,$0,$3 # c+= overflow | ||
284 | stq $1,0($16) # r[0]=c | ||
285 | cmpult $3,$0,$0 # overflow? | ||
286 | stq $2,8($16) # r[1]=c | ||
287 | addq $0,$24,$0 | ||
288 | stq $3,16($16) # r[2]=c | ||
289 | addq $4,$0,$4 # c+= overflow | ||
290 | subq $19,4,$19 # loop-- | ||
291 | cmpult $4,$0,$0 # overflow? | ||
292 | addq $17,32,$17 # a++ | ||
293 | addq $0,$25,$0 | ||
294 | stq $4,24($16) # r[3]=c | ||
295 | addq $18,32,$18 # b++ | ||
296 | addq $16,32,$16 # r++ | ||
297 | |||
298 | blt $19,$900 | ||
299 | ldq $5,0($17) # a[0] | ||
300 | ldq $1,0($18) # b[1] | ||
301 | br $901 | ||
302 | .align 4 | ||
303 | $945: | ||
304 | ldq $5,0($17) # a[0] | ||
305 | ldq $1,0($18) # b[1] | ||
306 | addq $1,$5,$1 # r=a+b; | ||
307 | subq $19,1,$19 # loop-- | ||
308 | addq $1,$0,$1 # c+= overflow | ||
309 | addq $17,8,$17 # a++ | ||
310 | cmpult $1,$5,$22 # did we overflow? | ||
311 | cmpult $1,$0,$0 # overflow? | ||
312 | addq $18,8,$18 # b++ | ||
313 | stq $1,0($16) # r[0]=c | ||
314 | addq $0,$22,$0 | ||
315 | addq $16,8,$16 # r++ | ||
316 | |||
317 | bgt $19,$945 | ||
318 | ret $31,($26),1 # else exit | ||
319 | |||
320 | $900: | ||
321 | addq $19,4,$19 | ||
322 | bgt $19,$945 # goto tail code | ||
323 | ret $31,($26),1 # else exit | ||
324 | .end bn_add_words | ||
325 | |||
326 | # | ||
327 | # What follows was taken directly from the C compiler with a few | ||
328 | # hacks to redo the lables. | ||
329 | # | ||
330 | .text | ||
331 | .align 3 | ||
332 | .globl bn_div64 | ||
333 | .ent bn_div64 | ||
334 | bn_div64: | ||
335 | ldgp $29,0($27) | ||
336 | bn_div64..ng: | ||
337 | lda $30,-48($30) | ||
338 | .frame $30,48,$26,0 | ||
339 | stq $26,0($30) | ||
340 | stq $9,8($30) | ||
341 | stq $10,16($30) | ||
342 | stq $11,24($30) | ||
343 | stq $12,32($30) | ||
344 | stq $13,40($30) | ||
345 | .mask 0x4003e00,-48 | ||
346 | .prologue 1 | ||
347 | bis $16,$16,$9 | ||
348 | bis $17,$17,$10 | ||
349 | bis $18,$18,$11 | ||
350 | bis $31,$31,$13 | ||
351 | bis $31,2,$12 | ||
352 | bne $11,$119 | ||
353 | lda $0,-1 | ||
354 | br $31,$136 | ||
355 | .align 4 | ||
356 | $119: | ||
357 | bis $11,$11,$16 | ||
358 | jsr $26,BN_num_bits_word | ||
359 | ldgp $29,0($26) | ||
360 | subq $0,64,$1 | ||
361 | beq $1,$120 | ||
362 | bis $31,1,$1 | ||
363 | sll $1,$0,$1 | ||
364 | cmpule $9,$1,$1 | ||
365 | bne $1,$120 | ||
366 | # lda $16,_IO_stderr_ | ||
367 | # lda $17,$C32 | ||
368 | # bis $0,$0,$18 | ||
369 | # jsr $26,fprintf | ||
370 | # ldgp $29,0($26) | ||
371 | jsr $26,abort | ||
372 | ldgp $29,0($26) | ||
373 | .align 4 | ||
374 | $120: | ||
375 | bis $31,64,$3 | ||
376 | cmpult $9,$11,$2 | ||
377 | subq $3,$0,$1 | ||
378 | addl $1,$31,$0 | ||
379 | subq $9,$11,$1 | ||
380 | cmoveq $2,$1,$9 | ||
381 | beq $0,$122 | ||
382 | zapnot $0,15,$2 | ||
383 | subq $3,$0,$1 | ||
384 | sll $11,$2,$11 | ||
385 | sll $9,$2,$3 | ||
386 | srl $10,$1,$1 | ||
387 | sll $10,$2,$10 | ||
388 | bis $3,$1,$9 | ||
389 | $122: | ||
390 | srl $11,32,$5 | ||
391 | zapnot $11,15,$6 | ||
392 | lda $7,-1 | ||
393 | .align 5 | ||
394 | $123: | ||
395 | srl $9,32,$1 | ||
396 | subq $1,$5,$1 | ||
397 | bne $1,$126 | ||
398 | zapnot $7,15,$27 | ||
399 | br $31,$127 | ||
400 | .align 4 | ||
401 | $126: | ||
402 | bis $9,$9,$24 | ||
403 | bis $5,$5,$25 | ||
404 | divqu $24,$25,$27 | ||
405 | $127: | ||
406 | srl $10,32,$4 | ||
407 | .align 5 | ||
408 | $128: | ||
409 | mulq $27,$5,$1 | ||
410 | subq $9,$1,$3 | ||
411 | zapnot $3,240,$1 | ||
412 | bne $1,$129 | ||
413 | mulq $6,$27,$2 | ||
414 | sll $3,32,$1 | ||
415 | addq $1,$4,$1 | ||
416 | cmpule $2,$1,$2 | ||
417 | bne $2,$129 | ||
418 | subq $27,1,$27 | ||
419 | br $31,$128 | ||
420 | .align 4 | ||
421 | $129: | ||
422 | mulq $27,$6,$1 | ||
423 | mulq $27,$5,$4 | ||
424 | srl $1,32,$3 | ||
425 | sll $1,32,$1 | ||
426 | addq $4,$3,$4 | ||
427 | cmpult $10,$1,$2 | ||
428 | subq $10,$1,$10 | ||
429 | addq $2,$4,$2 | ||
430 | cmpult $9,$2,$1 | ||
431 | bis $2,$2,$4 | ||
432 | beq $1,$134 | ||
433 | addq $9,$11,$9 | ||
434 | subq $27,1,$27 | ||
435 | $134: | ||
436 | subl $12,1,$12 | ||
437 | subq $9,$4,$9 | ||
438 | beq $12,$124 | ||
439 | sll $27,32,$13 | ||
440 | sll $9,32,$2 | ||
441 | srl $10,32,$1 | ||
442 | sll $10,32,$10 | ||
443 | bis $2,$1,$9 | ||
444 | br $31,$123 | ||
445 | .align 4 | ||
446 | $124: | ||
447 | bis $13,$27,$0 | ||
448 | $136: | ||
449 | ldq $26,0($30) | ||
450 | ldq $9,8($30) | ||
451 | ldq $10,16($30) | ||
452 | ldq $11,24($30) | ||
453 | ldq $12,32($30) | ||
454 | ldq $13,40($30) | ||
455 | addq $30,48,$30 | ||
456 | ret $31,($26),1 | ||
457 | .end bn_div64 | ||
458 | |||
459 | .set noat | ||
460 | .text | ||
461 | .align 3 | ||
462 | .globl bn_sub_words | ||
463 | .ent bn_sub_words | ||
464 | bn_sub_words: | ||
465 | bn_sub_words..ng: | ||
466 | .frame $30,0,$26,0 | ||
467 | .prologue 0 | ||
468 | |||
469 | subq $19, 4, $19 | ||
470 | bis $31, $31, $0 | ||
471 | blt $19, $100 | ||
472 | ldq $1, 0($17) | ||
473 | ldq $2, 0($18) | ||
474 | $101: | ||
475 | ldq $3, 8($17) | ||
476 | cmpult $1, $2, $4 | ||
477 | ldq $5, 8($18) | ||
478 | subq $1, $2, $1 | ||
479 | ldq $6, 16($17) | ||
480 | cmpult $1, $0, $2 | ||
481 | ldq $7, 16($18) | ||
482 | subq $1, $0, $23 | ||
483 | ldq $8, 24($17) | ||
484 | addq $2, $4, $0 | ||
485 | cmpult $3, $5, $24 | ||
486 | subq $3, $5, $3 | ||
487 | ldq $22, 24($18) | ||
488 | cmpult $3, $0, $5 | ||
489 | subq $3, $0, $25 | ||
490 | addq $5, $24, $0 | ||
491 | cmpult $6, $7, $27 | ||
492 | subq $6, $7, $6 | ||
493 | stq $23, 0($16) | ||
494 | cmpult $6, $0, $7 | ||
495 | subq $6, $0, $28 | ||
496 | addq $7, $27, $0 | ||
497 | cmpult $8, $22, $21 | ||
498 | subq $8, $22, $8 | ||
499 | stq $25, 8($16) | ||
500 | cmpult $8, $0, $22 | ||
501 | subq $8, $0, $20 | ||
502 | addq $22, $21, $0 | ||
503 | stq $28, 16($16) | ||
504 | subq $19, 4, $19 | ||
505 | stq $20, 24($16) | ||
506 | addq $17, 32, $17 | ||
507 | addq $18, 32, $18 | ||
508 | addq $16, 32, $16 | ||
509 | blt $19, $100 | ||
510 | ldq $1, 0($17) | ||
511 | ldq $2, 0($18) | ||
512 | br $101 | ||
513 | $102: | ||
514 | ldq $1, 0($17) | ||
515 | ldq $2, 0($18) | ||
516 | cmpult $1, $2, $27 | ||
517 | subq $1, $2, $1 | ||
518 | cmpult $1, $0, $2 | ||
519 | subq $1, $0, $1 | ||
520 | stq $1, 0($16) | ||
521 | addq $2, $27, $0 | ||
522 | addq $17, 8, $17 | ||
523 | addq $18, 8, $18 | ||
524 | addq $16, 8, $16 | ||
525 | subq $19, 1, $19 | ||
526 | bgt $19, $102 | ||
527 | ret $31,($26),1 | ||
528 | $100: | ||
529 | addq $19, 4, $19 | ||
530 | bgt $19, $102 | ||
531 | $103: | ||
532 | ret $31,($26),1 | ||
533 | .end bn_sub_words | ||
diff --git a/src/lib/libcrypto/bn/asm/bn-586.pl b/src/lib/libcrypto/bn/asm/bn-586.pl index 19d425ee96..5191bed273 100644 --- a/src/lib/libcrypto/bn/asm/bn-586.pl +++ b/src/lib/libcrypto/bn/asm/bn-586.pl | |||
@@ -1,18 +1,16 @@ | |||
1 | #!/usr/bin/perl | ||
2 | # | ||
3 | |||
4 | #!/usr/local/bin/perl | 1 | #!/usr/local/bin/perl |
5 | 2 | ||
6 | push(@INC,"perlasm","../../perlasm"); | 3 | push(@INC,"perlasm","../../perlasm"); |
7 | require "x86asm.pl"; | 4 | require "x86asm.pl"; |
8 | 5 | ||
9 | &asm_init($ARGV[0],"bn-586.pl"); | 6 | &asm_init($ARGV[0],$0); |
10 | 7 | ||
11 | &bn_mul_add_words("bn_mul_add_words"); | 8 | &bn_mul_add_words("bn_mul_add_words"); |
12 | &bn_mul_words("bn_mul_words"); | 9 | &bn_mul_words("bn_mul_words"); |
13 | &bn_sqr_words("bn_sqr_words"); | 10 | &bn_sqr_words("bn_sqr_words"); |
14 | &bn_div64("bn_div64"); | 11 | &bn_div_words("bn_div_words"); |
15 | &bn_add_words("bn_add_words"); | 12 | &bn_add_words("bn_add_words"); |
13 | &bn_sub_words("bn_sub_words"); | ||
16 | 14 | ||
17 | &asm_finish(); | 15 | &asm_finish(); |
18 | 16 | ||
@@ -228,7 +226,7 @@ sub bn_sqr_words | |||
228 | &function_end($name); | 226 | &function_end($name); |
229 | } | 227 | } |
230 | 228 | ||
231 | sub bn_div64 | 229 | sub bn_div_words |
232 | { | 230 | { |
233 | local($name)=@_; | 231 | local($name)=@_; |
234 | 232 | ||
@@ -307,7 +305,79 @@ sub bn_add_words | |||
307 | } | 305 | } |
308 | &set_label("aw_end",0); | 306 | &set_label("aw_end",0); |
309 | 307 | ||
310 | &mov("eax",$c); | 308 | # &mov("eax",$c); # $c is "eax" |
309 | |||
310 | &function_end($name); | ||
311 | } | ||
312 | |||
313 | sub bn_sub_words | ||
314 | { | ||
315 | local($name)=@_; | ||
316 | |||
317 | &function_begin($name,""); | ||
318 | |||
319 | &comment(""); | ||
320 | $a="esi"; | ||
321 | $b="edi"; | ||
322 | $c="eax"; | ||
323 | $r="ebx"; | ||
324 | $tmp1="ecx"; | ||
325 | $tmp2="edx"; | ||
326 | $num="ebp"; | ||
327 | |||
328 | &mov($r,&wparam(0)); # get r | ||
329 | &mov($a,&wparam(1)); # get a | ||
330 | &mov($b,&wparam(2)); # get b | ||
331 | &mov($num,&wparam(3)); # get num | ||
332 | &xor($c,$c); # clear carry | ||
333 | &and($num,0xfffffff8); # num / 8 | ||
334 | |||
335 | &jz(&label("aw_finish")); | ||
336 | |||
337 | &set_label("aw_loop",0); | ||
338 | for ($i=0; $i<8; $i++) | ||
339 | { | ||
340 | &comment("Round $i"); | ||
341 | |||
342 | &mov($tmp1,&DWP($i*4,$a,"",0)); # *a | ||
343 | &mov($tmp2,&DWP($i*4,$b,"",0)); # *b | ||
344 | &sub($tmp1,$c); | ||
345 | &mov($c,0); | ||
346 | &adc($c,$c); | ||
347 | &sub($tmp1,$tmp2); | ||
348 | &adc($c,0); | ||
349 | &mov(&DWP($i*4,$r,"",0),$tmp1); # *r | ||
350 | } | ||
351 | |||
352 | &comment(""); | ||
353 | &add($a,32); | ||
354 | &add($b,32); | ||
355 | &add($r,32); | ||
356 | &sub($num,8); | ||
357 | &jnz(&label("aw_loop")); | ||
358 | |||
359 | &set_label("aw_finish",0); | ||
360 | &mov($num,&wparam(3)); # get num | ||
361 | &and($num,7); | ||
362 | &jz(&label("aw_end")); | ||
363 | |||
364 | for ($i=0; $i<7; $i++) | ||
365 | { | ||
366 | &comment("Tail Round $i"); | ||
367 | &mov($tmp1,&DWP($i*4,$a,"",0)); # *a | ||
368 | &mov($tmp2,&DWP($i*4,$b,"",0));# *b | ||
369 | &sub($tmp1,$c); | ||
370 | &mov($c,0); | ||
371 | &adc($c,$c); | ||
372 | &sub($tmp1,$tmp2); | ||
373 | &adc($c,0); | ||
374 | &dec($num) if ($i != 6); | ||
375 | &mov(&DWP($i*4,$r,"",0),$tmp1); # *a | ||
376 | &jz(&label("aw_end")) if ($i != 6); | ||
377 | } | ||
378 | &set_label("aw_end",0); | ||
379 | |||
380 | # &mov("eax",$c); # $c is "eax" | ||
311 | 381 | ||
312 | &function_end($name); | 382 | &function_end($name); |
313 | } | 383 | } |
diff --git a/src/lib/libcrypto/bn/asm/bn-alpha.pl b/src/lib/libcrypto/bn/asm/bn-alpha.pl new file mode 100644 index 0000000000..302edf2376 --- /dev/null +++ b/src/lib/libcrypto/bn/asm/bn-alpha.pl | |||
@@ -0,0 +1,571 @@ | |||
1 | #!/usr/local/bin/perl | ||
2 | # I have this in perl so I can use more usefull register names and then convert | ||
3 | # them into alpha registers. | ||
4 | # | ||
5 | |||
6 | $d=&data(); | ||
7 | $d =~ s/CC/0/g; | ||
8 | $d =~ s/R1/1/g; | ||
9 | $d =~ s/R2/2/g; | ||
10 | $d =~ s/R3/3/g; | ||
11 | $d =~ s/R4/4/g; | ||
12 | $d =~ s/L1/5/g; | ||
13 | $d =~ s/L2/6/g; | ||
14 | $d =~ s/L3/7/g; | ||
15 | $d =~ s/L4/8/g; | ||
16 | $d =~ s/O1/22/g; | ||
17 | $d =~ s/O2/23/g; | ||
18 | $d =~ s/O3/24/g; | ||
19 | $d =~ s/O4/25/g; | ||
20 | $d =~ s/A1/20/g; | ||
21 | $d =~ s/A2/21/g; | ||
22 | $d =~ s/A3/27/g; | ||
23 | $d =~ s/A4/28/g; | ||
24 | if (0){ | ||
25 | } | ||
26 | |||
27 | print $d; | ||
28 | |||
29 | sub data | ||
30 | { | ||
31 | local($data)=<<'EOF'; | ||
32 | |||
33 | # DEC Alpha assember | ||
34 | # The bn_div_words is actually gcc output but the other parts are hand done. | ||
35 | # Thanks to tzeruch@ceddec.com for sending me the gcc output for | ||
36 | # bn_div_words. | ||
37 | # I've gone back and re-done most of routines. | ||
38 | # The key thing to remeber for the 164 CPU is that while a | ||
39 | # multiply operation takes 8 cycles, another one can only be issued | ||
40 | # after 4 cycles have elapsed. I've done modification to help | ||
41 | # improve this. Also, normally, a ld instruction will not be available | ||
42 | # for about 3 cycles. | ||
43 | .file 1 "bn_asm.c" | ||
44 | .set noat | ||
45 | gcc2_compiled.: | ||
46 | __gnu_compiled_c: | ||
47 | .text | ||
48 | .align 3 | ||
49 | .globl bn_mul_add_words | ||
50 | .ent bn_mul_add_words | ||
51 | bn_mul_add_words: | ||
52 | bn_mul_add_words..ng: | ||
53 | .frame $30,0,$26,0 | ||
54 | .prologue 0 | ||
55 | .align 5 | ||
56 | subq $18,4,$18 | ||
57 | bis $31,$31,$CC | ||
58 | blt $18,$43 # if we are -1, -2, -3 or -4 goto tail code | ||
59 | ldq $A1,0($17) # 1 1 | ||
60 | ldq $R1,0($16) # 1 1 | ||
61 | .align 3 | ||
62 | $42: | ||
63 | mulq $A1,$19,$L1 # 1 2 1 ###### | ||
64 | ldq $A2,8($17) # 2 1 | ||
65 | ldq $R2,8($16) # 2 1 | ||
66 | umulh $A1,$19,$A1 # 1 2 ###### | ||
67 | ldq $A3,16($17) # 3 1 | ||
68 | ldq $R3,16($16) # 3 1 | ||
69 | mulq $A2,$19,$L2 # 2 2 1 ###### | ||
70 | ldq $A4,24($17) # 4 1 | ||
71 | addq $R1,$L1,$R1 # 1 2 2 | ||
72 | ldq $R4,24($16) # 4 1 | ||
73 | umulh $A2,$19,$A2 # 2 2 ###### | ||
74 | cmpult $R1,$L1,$O1 # 1 2 3 1 | ||
75 | addq $A1,$O1,$A1 # 1 3 1 | ||
76 | addq $R1,$CC,$R1 # 1 2 3 1 | ||
77 | mulq $A3,$19,$L3 # 3 2 1 ###### | ||
78 | cmpult $R1,$CC,$CC # 1 2 3 2 | ||
79 | addq $R2,$L2,$R2 # 2 2 2 | ||
80 | addq $A1,$CC,$CC # 1 3 2 | ||
81 | cmpult $R2,$L2,$O2 # 2 2 3 1 | ||
82 | addq $A2,$O2,$A2 # 2 3 1 | ||
83 | umulh $A3,$19,$A3 # 3 2 ###### | ||
84 | addq $R2,$CC,$R2 # 2 2 3 1 | ||
85 | cmpult $R2,$CC,$CC # 2 2 3 2 | ||
86 | subq $18,4,$18 | ||
87 | mulq $A4,$19,$L4 # 4 2 1 ###### | ||
88 | addq $A2,$CC,$CC # 2 3 2 | ||
89 | addq $R3,$L3,$R3 # 3 2 2 | ||
90 | addq $16,32,$16 | ||
91 | cmpult $R3,$L3,$O3 # 3 2 3 1 | ||
92 | stq $R1,-32($16) # 1 2 4 | ||
93 | umulh $A4,$19,$A4 # 4 2 ###### | ||
94 | addq $A3,$O3,$A3 # 3 3 1 | ||
95 | addq $R3,$CC,$R3 # 3 2 3 1 | ||
96 | stq $R2,-24($16) # 2 2 4 | ||
97 | cmpult $R3,$CC,$CC # 3 2 3 2 | ||
98 | stq $R3,-16($16) # 3 2 4 | ||
99 | addq $R4,$L4,$R4 # 4 2 2 | ||
100 | addq $A3,$CC,$CC # 3 3 2 | ||
101 | cmpult $R4,$L4,$O4 # 4 2 3 1 | ||
102 | addq $17,32,$17 | ||
103 | addq $A4,$O4,$A4 # 4 3 1 | ||
104 | addq $R4,$CC,$R4 # 4 2 3 1 | ||
105 | cmpult $R4,$CC,$CC # 4 2 3 2 | ||
106 | stq $R4,-8($16) # 4 2 4 | ||
107 | addq $A4,$CC,$CC # 4 3 2 | ||
108 | blt $18,$43 | ||
109 | |||
110 | ldq $A1,0($17) # 1 1 | ||
111 | ldq $R1,0($16) # 1 1 | ||
112 | |||
113 | br $42 | ||
114 | |||
115 | .align 4 | ||
116 | $45: | ||
117 | ldq $A1,0($17) # 4 1 | ||
118 | ldq $R1,0($16) # 4 1 | ||
119 | mulq $A1,$19,$L1 # 4 2 1 | ||
120 | subq $18,1,$18 | ||
121 | addq $16,8,$16 | ||
122 | addq $17,8,$17 | ||
123 | umulh $A1,$19,$A1 # 4 2 | ||
124 | addq $R1,$L1,$R1 # 4 2 2 | ||
125 | cmpult $R1,$L1,$O1 # 4 2 3 1 | ||
126 | addq $A1,$O1,$A1 # 4 3 1 | ||
127 | addq $R1,$CC,$R1 # 4 2 3 1 | ||
128 | cmpult $R1,$CC,$CC # 4 2 3 2 | ||
129 | addq $A1,$CC,$CC # 4 3 2 | ||
130 | stq $R1,-8($16) # 4 2 4 | ||
131 | bgt $18,$45 | ||
132 | ret $31,($26),1 # else exit | ||
133 | |||
134 | .align 4 | ||
135 | $43: | ||
136 | addq $18,4,$18 | ||
137 | bgt $18,$45 # goto tail code | ||
138 | ret $31,($26),1 # else exit | ||
139 | |||
140 | .end bn_mul_add_words | ||
141 | .align 3 | ||
142 | .globl bn_mul_words | ||
143 | .ent bn_mul_words | ||
144 | bn_mul_words: | ||
145 | bn_mul_words..ng: | ||
146 | .frame $30,0,$26,0 | ||
147 | .prologue 0 | ||
148 | .align 5 | ||
149 | subq $18,4,$18 | ||
150 | bis $31,$31,$CC | ||
151 | blt $18,$143 # if we are -1, -2, -3 or -4 goto tail code | ||
152 | ldq $A1,0($17) # 1 1 | ||
153 | .align 3 | ||
154 | $142: | ||
155 | |||
156 | mulq $A1,$19,$L1 # 1 2 1 ##### | ||
157 | ldq $A2,8($17) # 2 1 | ||
158 | ldq $A3,16($17) # 3 1 | ||
159 | umulh $A1,$19,$A1 # 1 2 ##### | ||
160 | ldq $A4,24($17) # 4 1 | ||
161 | mulq $A2,$19,$L2 # 2 2 1 ##### | ||
162 | addq $L1,$CC,$L1 # 1 2 3 1 | ||
163 | subq $18,4,$18 | ||
164 | cmpult $L1,$CC,$CC # 1 2 3 2 | ||
165 | umulh $A2,$19,$A2 # 2 2 ##### | ||
166 | addq $A1,$CC,$CC # 1 3 2 | ||
167 | addq $17,32,$17 | ||
168 | addq $L2,$CC,$L2 # 2 2 3 1 | ||
169 | mulq $A3,$19,$L3 # 3 2 1 ##### | ||
170 | cmpult $L2,$CC,$CC # 2 2 3 2 | ||
171 | addq $A2,$CC,$CC # 2 3 2 | ||
172 | addq $16,32,$16 | ||
173 | umulh $A3,$19,$A3 # 3 2 ##### | ||
174 | stq $L1,-32($16) # 1 2 4 | ||
175 | mulq $A4,$19,$L4 # 4 2 1 ##### | ||
176 | addq $L3,$CC,$L3 # 3 2 3 1 | ||
177 | stq $L2,-24($16) # 2 2 4 | ||
178 | cmpult $L3,$CC,$CC # 3 2 3 2 | ||
179 | umulh $A4,$19,$A4 # 4 2 ##### | ||
180 | addq $A3,$CC,$CC # 3 3 2 | ||
181 | stq $L3,-16($16) # 3 2 4 | ||
182 | addq $L4,$CC,$L4 # 4 2 3 1 | ||
183 | cmpult $L4,$CC,$CC # 4 2 3 2 | ||
184 | |||
185 | addq $A4,$CC,$CC # 4 3 2 | ||
186 | |||
187 | stq $L4,-8($16) # 4 2 4 | ||
188 | |||
189 | blt $18,$143 | ||
190 | |||
191 | ldq $A1,0($17) # 1 1 | ||
192 | |||
193 | br $142 | ||
194 | |||
195 | .align 4 | ||
196 | $145: | ||
197 | ldq $A1,0($17) # 4 1 | ||
198 | mulq $A1,$19,$L1 # 4 2 1 | ||
199 | subq $18,1,$18 | ||
200 | umulh $A1,$19,$A1 # 4 2 | ||
201 | addq $L1,$CC,$L1 # 4 2 3 1 | ||
202 | addq $16,8,$16 | ||
203 | cmpult $L1,$CC,$CC # 4 2 3 2 | ||
204 | addq $17,8,$17 | ||
205 | addq $A1,$CC,$CC # 4 3 2 | ||
206 | stq $L1,-8($16) # 4 2 4 | ||
207 | |||
208 | bgt $18,$145 | ||
209 | ret $31,($26),1 # else exit | ||
210 | |||
211 | .align 4 | ||
212 | $143: | ||
213 | addq $18,4,$18 | ||
214 | bgt $18,$145 # goto tail code | ||
215 | ret $31,($26),1 # else exit | ||
216 | |||
217 | .end bn_mul_words | ||
218 | .align 3 | ||
219 | .globl bn_sqr_words | ||
220 | .ent bn_sqr_words | ||
221 | bn_sqr_words: | ||
222 | bn_sqr_words..ng: | ||
223 | .frame $30,0,$26,0 | ||
224 | .prologue 0 | ||
225 | |||
226 | subq $18,4,$18 | ||
227 | blt $18,$543 # if we are -1, -2, -3 or -4 goto tail code | ||
228 | ldq $A1,0($17) # 1 1 | ||
229 | .align 3 | ||
230 | $542: | ||
231 | mulq $A1,$A1,$L1 ###### | ||
232 | ldq $A2,8($17) # 1 1 | ||
233 | subq $18,4 | ||
234 | umulh $A1,$A1,$R1 ###### | ||
235 | ldq $A3,16($17) # 1 1 | ||
236 | mulq $A2,$A2,$L2 ###### | ||
237 | ldq $A4,24($17) # 1 1 | ||
238 | stq $L1,0($16) # r[0] | ||
239 | umulh $A2,$A2,$R2 ###### | ||
240 | stq $R1,8($16) # r[1] | ||
241 | mulq $A3,$A3,$L3 ###### | ||
242 | stq $L2,16($16) # r[0] | ||
243 | umulh $A3,$A3,$R3 ###### | ||
244 | stq $R2,24($16) # r[1] | ||
245 | mulq $A4,$A4,$L4 ###### | ||
246 | stq $L3,32($16) # r[0] | ||
247 | umulh $A4,$A4,$R4 ###### | ||
248 | stq $R3,40($16) # r[1] | ||
249 | |||
250 | addq $16,64,$16 | ||
251 | addq $17,32,$17 | ||
252 | stq $L4,-16($16) # r[0] | ||
253 | stq $R4,-8($16) # r[1] | ||
254 | |||
255 | blt $18,$543 | ||
256 | ldq $A1,0($17) # 1 1 | ||
257 | br $542 | ||
258 | |||
259 | $442: | ||
260 | ldq $A1,0($17) # a[0] | ||
261 | mulq $A1,$A1,$L1 # a[0]*w low part r2 | ||
262 | addq $16,16,$16 | ||
263 | addq $17,8,$17 | ||
264 | subq $18,1,$18 | ||
265 | umulh $A1,$A1,$R1 # a[0]*w high part r3 | ||
266 | stq $L1,-16($16) # r[0] | ||
267 | stq $R1,-8($16) # r[1] | ||
268 | |||
269 | bgt $18,$442 | ||
270 | ret $31,($26),1 # else exit | ||
271 | |||
272 | .align 4 | ||
273 | $543: | ||
274 | addq $18,4,$18 | ||
275 | bgt $18,$442 # goto tail code | ||
276 | ret $31,($26),1 # else exit | ||
277 | .end bn_sqr_words | ||
278 | |||
279 | .align 3 | ||
280 | .globl bn_add_words | ||
281 | .ent bn_add_words | ||
282 | bn_add_words: | ||
283 | bn_add_words..ng: | ||
284 | .frame $30,0,$26,0 | ||
285 | .prologue 0 | ||
286 | |||
287 | subq $19,4,$19 | ||
288 | bis $31,$31,$CC # carry = 0 | ||
289 | blt $19,$900 | ||
290 | ldq $L1,0($17) # a[0] | ||
291 | ldq $R1,0($18) # b[1] | ||
292 | .align 3 | ||
293 | $901: | ||
294 | addq $R1,$L1,$R1 # r=a+b; | ||
295 | ldq $L2,8($17) # a[1] | ||
296 | cmpult $R1,$L1,$O1 # did we overflow? | ||
297 | ldq $R2,8($18) # b[1] | ||
298 | addq $R1,$CC,$R1 # c+= overflow | ||
299 | ldq $L3,16($17) # a[2] | ||
300 | cmpult $R1,$CC,$CC # overflow? | ||
301 | ldq $R3,16($18) # b[2] | ||
302 | addq $CC,$O1,$CC | ||
303 | ldq $L4,24($17) # a[3] | ||
304 | addq $R2,$L2,$R2 # r=a+b; | ||
305 | ldq $R4,24($18) # b[3] | ||
306 | cmpult $R2,$L2,$O2 # did we overflow? | ||
307 | addq $R3,$L3,$R3 # r=a+b; | ||
308 | addq $R2,$CC,$R2 # c+= overflow | ||
309 | cmpult $R3,$L3,$O3 # did we overflow? | ||
310 | cmpult $R2,$CC,$CC # overflow? | ||
311 | addq $R4,$L4,$R4 # r=a+b; | ||
312 | addq $CC,$O2,$CC | ||
313 | cmpult $R4,$L4,$O4 # did we overflow? | ||
314 | addq $R3,$CC,$R3 # c+= overflow | ||
315 | stq $R1,0($16) # r[0]=c | ||
316 | cmpult $R3,$CC,$CC # overflow? | ||
317 | stq $R2,8($16) # r[1]=c | ||
318 | addq $CC,$O3,$CC | ||
319 | stq $R3,16($16) # r[2]=c | ||
320 | addq $R4,$CC,$R4 # c+= overflow | ||
321 | subq $19,4,$19 # loop-- | ||
322 | cmpult $R4,$CC,$CC # overflow? | ||
323 | addq $17,32,$17 # a++ | ||
324 | addq $CC,$O4,$CC | ||
325 | stq $R4,24($16) # r[3]=c | ||
326 | addq $18,32,$18 # b++ | ||
327 | addq $16,32,$16 # r++ | ||
328 | |||
329 | blt $19,$900 | ||
330 | ldq $L1,0($17) # a[0] | ||
331 | ldq $R1,0($18) # b[1] | ||
332 | br $901 | ||
333 | .align 4 | ||
334 | $945: | ||
335 | ldq $L1,0($17) # a[0] | ||
336 | ldq $R1,0($18) # b[1] | ||
337 | addq $R1,$L1,$R1 # r=a+b; | ||
338 | subq $19,1,$19 # loop-- | ||
339 | addq $R1,$CC,$R1 # c+= overflow | ||
340 | addq $17,8,$17 # a++ | ||
341 | cmpult $R1,$L1,$O1 # did we overflow? | ||
342 | cmpult $R1,$CC,$CC # overflow? | ||
343 | addq $18,8,$18 # b++ | ||
344 | stq $R1,0($16) # r[0]=c | ||
345 | addq $CC,$O1,$CC | ||
346 | addq $16,8,$16 # r++ | ||
347 | |||
348 | bgt $19,$945 | ||
349 | ret $31,($26),1 # else exit | ||
350 | |||
351 | $900: | ||
352 | addq $19,4,$19 | ||
353 | bgt $19,$945 # goto tail code | ||
354 | ret $31,($26),1 # else exit | ||
355 | .end bn_add_words | ||
356 | |||
357 | .align 3 | ||
358 | .globl bn_sub_words | ||
359 | .ent bn_sub_words | ||
360 | bn_sub_words: | ||
361 | bn_sub_words..ng: | ||
362 | .frame $30,0,$26,0 | ||
363 | .prologue 0 | ||
364 | |||
365 | subq $19,4,$19 | ||
366 | bis $31,$31,$CC # carry = 0 | ||
367 | br $800 | ||
368 | blt $19,$800 | ||
369 | ldq $L1,0($17) # a[0] | ||
370 | ldq $R1,0($18) # b[1] | ||
371 | .align 3 | ||
372 | $801: | ||
373 | addq $R1,$L1,$R1 # r=a+b; | ||
374 | ldq $L2,8($17) # a[1] | ||
375 | cmpult $R1,$L1,$O1 # did we overflow? | ||
376 | ldq $R2,8($18) # b[1] | ||
377 | addq $R1,$CC,$R1 # c+= overflow | ||
378 | ldq $L3,16($17) # a[2] | ||
379 | cmpult $R1,$CC,$CC # overflow? | ||
380 | ldq $R3,16($18) # b[2] | ||
381 | addq $CC,$O1,$CC | ||
382 | ldq $L4,24($17) # a[3] | ||
383 | addq $R2,$L2,$R2 # r=a+b; | ||
384 | ldq $R4,24($18) # b[3] | ||
385 | cmpult $R2,$L2,$O2 # did we overflow? | ||
386 | addq $R3,$L3,$R3 # r=a+b; | ||
387 | addq $R2,$CC,$R2 # c+= overflow | ||
388 | cmpult $R3,$L3,$O3 # did we overflow? | ||
389 | cmpult $R2,$CC,$CC # overflow? | ||
390 | addq $R4,$L4,$R4 # r=a+b; | ||
391 | addq $CC,$O2,$CC | ||
392 | cmpult $R4,$L4,$O4 # did we overflow? | ||
393 | addq $R3,$CC,$R3 # c+= overflow | ||
394 | stq $R1,0($16) # r[0]=c | ||
395 | cmpult $R3,$CC,$CC # overflow? | ||
396 | stq $R2,8($16) # r[1]=c | ||
397 | addq $CC,$O3,$CC | ||
398 | stq $R3,16($16) # r[2]=c | ||
399 | addq $R4,$CC,$R4 # c+= overflow | ||
400 | subq $19,4,$19 # loop-- | ||
401 | cmpult $R4,$CC,$CC # overflow? | ||
402 | addq $17,32,$17 # a++ | ||
403 | addq $CC,$O4,$CC | ||
404 | stq $R4,24($16) # r[3]=c | ||
405 | addq $18,32,$18 # b++ | ||
406 | addq $16,32,$16 # r++ | ||
407 | |||
408 | blt $19,$800 | ||
409 | ldq $L1,0($17) # a[0] | ||
410 | ldq $R1,0($18) # b[1] | ||
411 | br $801 | ||
412 | .align 4 | ||
413 | $845: | ||
414 | ldq $L1,0($17) # a[0] | ||
415 | ldq $R1,0($18) # b[1] | ||
416 | cmpult $L1,$R1,$O1 # will we borrow? | ||
417 | subq $L1,$R1,$R1 # r=a-b; | ||
418 | subq $19,1,$19 # loop-- | ||
419 | cmpult $R1,$CC,$O2 # will we borrow? | ||
420 | subq $R1,$CC,$R1 # c+= overflow | ||
421 | addq $17,8,$17 # a++ | ||
422 | addq $18,8,$18 # b++ | ||
423 | stq $R1,0($16) # r[0]=c | ||
424 | addq $O2,$O1,$CC | ||
425 | addq $16,8,$16 # r++ | ||
426 | |||
427 | bgt $19,$845 | ||
428 | ret $31,($26),1 # else exit | ||
429 | |||
430 | $800: | ||
431 | addq $19,4,$19 | ||
432 | bgt $19,$845 # goto tail code | ||
433 | ret $31,($26),1 # else exit | ||
434 | .end bn_sub_words | ||
435 | |||
436 | # | ||
437 | # What follows was taken directly from the C compiler with a few | ||
438 | # hacks to redo the lables. | ||
439 | # | ||
440 | .text | ||
441 | .align 3 | ||
442 | .globl bn_div_words | ||
443 | .ent bn_div_words | ||
444 | bn_div_words: | ||
445 | ldgp $29,0($27) | ||
446 | bn_div_words..ng: | ||
447 | lda $30,-48($30) | ||
448 | .frame $30,48,$26,0 | ||
449 | stq $26,0($30) | ||
450 | stq $9,8($30) | ||
451 | stq $10,16($30) | ||
452 | stq $11,24($30) | ||
453 | stq $12,32($30) | ||
454 | stq $13,40($30) | ||
455 | .mask 0x4003e00,-48 | ||
456 | .prologue 1 | ||
457 | bis $16,$16,$9 | ||
458 | bis $17,$17,$10 | ||
459 | bis $18,$18,$11 | ||
460 | bis $31,$31,$13 | ||
461 | bis $31,2,$12 | ||
462 | bne $11,$119 | ||
463 | lda $0,-1 | ||
464 | br $31,$136 | ||
465 | .align 4 | ||
466 | $119: | ||
467 | bis $11,$11,$16 | ||
468 | jsr $26,BN_num_bits_word | ||
469 | ldgp $29,0($26) | ||
470 | subq $0,64,$1 | ||
471 | beq $1,$120 | ||
472 | bis $31,1,$1 | ||
473 | sll $1,$0,$1 | ||
474 | cmpule $9,$1,$1 | ||
475 | bne $1,$120 | ||
476 | # lda $16,_IO_stderr_ | ||
477 | # lda $17,$C32 | ||
478 | # bis $0,$0,$18 | ||
479 | # jsr $26,fprintf | ||
480 | # ldgp $29,0($26) | ||
481 | jsr $26,abort | ||
482 | ldgp $29,0($26) | ||
483 | .align 4 | ||
484 | $120: | ||
485 | bis $31,64,$3 | ||
486 | cmpult $9,$11,$2 | ||
487 | subq $3,$0,$1 | ||
488 | addl $1,$31,$0 | ||
489 | subq $9,$11,$1 | ||
490 | cmoveq $2,$1,$9 | ||
491 | beq $0,$122 | ||
492 | zapnot $0,15,$2 | ||
493 | subq $3,$0,$1 | ||
494 | sll $11,$2,$11 | ||
495 | sll $9,$2,$3 | ||
496 | srl $10,$1,$1 | ||
497 | sll $10,$2,$10 | ||
498 | bis $3,$1,$9 | ||
499 | $122: | ||
500 | srl $11,32,$5 | ||
501 | zapnot $11,15,$6 | ||
502 | lda $7,-1 | ||
503 | .align 5 | ||
504 | $123: | ||
505 | srl $9,32,$1 | ||
506 | subq $1,$5,$1 | ||
507 | bne $1,$126 | ||
508 | zapnot $7,15,$27 | ||
509 | br $31,$127 | ||
510 | .align 4 | ||
511 | $126: | ||
512 | bis $9,$9,$24 | ||
513 | bis $5,$5,$25 | ||
514 | divqu $24,$25,$27 | ||
515 | $127: | ||
516 | srl $10,32,$4 | ||
517 | .align 5 | ||
518 | $128: | ||
519 | mulq $27,$5,$1 | ||
520 | subq $9,$1,$3 | ||
521 | zapnot $3,240,$1 | ||
522 | bne $1,$129 | ||
523 | mulq $6,$27,$2 | ||
524 | sll $3,32,$1 | ||
525 | addq $1,$4,$1 | ||
526 | cmpule $2,$1,$2 | ||
527 | bne $2,$129 | ||
528 | subq $27,1,$27 | ||
529 | br $31,$128 | ||
530 | .align 4 | ||
531 | $129: | ||
532 | mulq $27,$6,$1 | ||
533 | mulq $27,$5,$4 | ||
534 | srl $1,32,$3 | ||
535 | sll $1,32,$1 | ||
536 | addq $4,$3,$4 | ||
537 | cmpult $10,$1,$2 | ||
538 | subq $10,$1,$10 | ||
539 | addq $2,$4,$2 | ||
540 | cmpult $9,$2,$1 | ||
541 | bis $2,$2,$4 | ||
542 | beq $1,$134 | ||
543 | addq $9,$11,$9 | ||
544 | subq $27,1,$27 | ||
545 | $134: | ||
546 | subl $12,1,$12 | ||
547 | subq $9,$4,$9 | ||
548 | beq $12,$124 | ||
549 | sll $27,32,$13 | ||
550 | sll $9,32,$2 | ||
551 | srl $10,32,$1 | ||
552 | sll $10,32,$10 | ||
553 | bis $2,$1,$9 | ||
554 | br $31,$123 | ||
555 | .align 4 | ||
556 | $124: | ||
557 | bis $13,$27,$0 | ||
558 | $136: | ||
559 | ldq $26,0($30) | ||
560 | ldq $9,8($30) | ||
561 | ldq $10,16($30) | ||
562 | ldq $11,24($30) | ||
563 | ldq $12,32($30) | ||
564 | ldq $13,40($30) | ||
565 | addq $30,48,$30 | ||
566 | ret $31,($26),1 | ||
567 | .end bn_div_words | ||
568 | EOF | ||
569 | return($data); | ||
570 | } | ||
571 | |||
diff --git a/src/lib/libcrypto/bn/asm/bn-win32.asm b/src/lib/libcrypto/bn/asm/bn-win32.asm index 017ea462b0..871bd88d77 100644 --- a/src/lib/libcrypto/bn/asm/bn-win32.asm +++ b/src/lib/libcrypto/bn/asm/bn-win32.asm | |||
@@ -485,9 +485,9 @@ $L010sw_end: | |||
485 | _bn_sqr_words ENDP | 485 | _bn_sqr_words ENDP |
486 | _TEXT ENDS | 486 | _TEXT ENDS |
487 | _TEXT SEGMENT | 487 | _TEXT SEGMENT |
488 | PUBLIC _bn_div64 | 488 | PUBLIC _bn_div_words |
489 | 489 | ||
490 | _bn_div64 PROC NEAR | 490 | _bn_div_words PROC NEAR |
491 | push ebp | 491 | push ebp |
492 | push ebx | 492 | push ebx |
493 | push esi | 493 | push esi |
@@ -501,7 +501,7 @@ _bn_div64 PROC NEAR | |||
501 | pop ebx | 501 | pop ebx |
502 | pop ebp | 502 | pop ebp |
503 | ret | 503 | ret |
504 | _bn_div64 ENDP | 504 | _bn_div_words ENDP |
505 | _TEXT ENDS | 505 | _TEXT ENDS |
506 | _TEXT SEGMENT | 506 | _TEXT SEGMENT |
507 | PUBLIC _bn_add_words | 507 | PUBLIC _bn_add_words |
@@ -678,7 +678,6 @@ $L011aw_finish: | |||
678 | adc eax, 0 | 678 | adc eax, 0 |
679 | mov DWORD PTR 24[ebx],ecx | 679 | mov DWORD PTR 24[ebx],ecx |
680 | $L013aw_end: | 680 | $L013aw_end: |
681 | mov eax, eax | ||
682 | pop edi | 681 | pop edi |
683 | pop esi | 682 | pop esi |
684 | pop ebx | 683 | pop ebx |
@@ -686,4 +685,1438 @@ $L013aw_end: | |||
686 | ret | 685 | ret |
687 | _bn_add_words ENDP | 686 | _bn_add_words ENDP |
688 | _TEXT ENDS | 687 | _TEXT ENDS |
688 | _TEXT SEGMENT | ||
689 | PUBLIC _bn_sub_words | ||
690 | |||
691 | _bn_sub_words PROC NEAR | ||
692 | push ebp | ||
693 | push ebx | ||
694 | push esi | ||
695 | push edi | ||
696 | ; | ||
697 | mov ebx, DWORD PTR 20[esp] | ||
698 | mov esi, DWORD PTR 24[esp] | ||
699 | mov edi, DWORD PTR 28[esp] | ||
700 | mov ebp, DWORD PTR 32[esp] | ||
701 | xor eax, eax | ||
702 | and ebp, 4294967288 | ||
703 | jz $L014aw_finish | ||
704 | L015aw_loop: | ||
705 | ; Round 0 | ||
706 | mov ecx, DWORD PTR [esi] | ||
707 | mov edx, DWORD PTR [edi] | ||
708 | sub ecx, eax | ||
709 | mov eax, 0 | ||
710 | adc eax, eax | ||
711 | sub ecx, edx | ||
712 | adc eax, 0 | ||
713 | mov DWORD PTR [ebx],ecx | ||
714 | ; Round 1 | ||
715 | mov ecx, DWORD PTR 4[esi] | ||
716 | mov edx, DWORD PTR 4[edi] | ||
717 | sub ecx, eax | ||
718 | mov eax, 0 | ||
719 | adc eax, eax | ||
720 | sub ecx, edx | ||
721 | adc eax, 0 | ||
722 | mov DWORD PTR 4[ebx],ecx | ||
723 | ; Round 2 | ||
724 | mov ecx, DWORD PTR 8[esi] | ||
725 | mov edx, DWORD PTR 8[edi] | ||
726 | sub ecx, eax | ||
727 | mov eax, 0 | ||
728 | adc eax, eax | ||
729 | sub ecx, edx | ||
730 | adc eax, 0 | ||
731 | mov DWORD PTR 8[ebx],ecx | ||
732 | ; Round 3 | ||
733 | mov ecx, DWORD PTR 12[esi] | ||
734 | mov edx, DWORD PTR 12[edi] | ||
735 | sub ecx, eax | ||
736 | mov eax, 0 | ||
737 | adc eax, eax | ||
738 | sub ecx, edx | ||
739 | adc eax, 0 | ||
740 | mov DWORD PTR 12[ebx],ecx | ||
741 | ; Round 4 | ||
742 | mov ecx, DWORD PTR 16[esi] | ||
743 | mov edx, DWORD PTR 16[edi] | ||
744 | sub ecx, eax | ||
745 | mov eax, 0 | ||
746 | adc eax, eax | ||
747 | sub ecx, edx | ||
748 | adc eax, 0 | ||
749 | mov DWORD PTR 16[ebx],ecx | ||
750 | ; Round 5 | ||
751 | mov ecx, DWORD PTR 20[esi] | ||
752 | mov edx, DWORD PTR 20[edi] | ||
753 | sub ecx, eax | ||
754 | mov eax, 0 | ||
755 | adc eax, eax | ||
756 | sub ecx, edx | ||
757 | adc eax, 0 | ||
758 | mov DWORD PTR 20[ebx],ecx | ||
759 | ; Round 6 | ||
760 | mov ecx, DWORD PTR 24[esi] | ||
761 | mov edx, DWORD PTR 24[edi] | ||
762 | sub ecx, eax | ||
763 | mov eax, 0 | ||
764 | adc eax, eax | ||
765 | sub ecx, edx | ||
766 | adc eax, 0 | ||
767 | mov DWORD PTR 24[ebx],ecx | ||
768 | ; Round 7 | ||
769 | mov ecx, DWORD PTR 28[esi] | ||
770 | mov edx, DWORD PTR 28[edi] | ||
771 | sub ecx, eax | ||
772 | mov eax, 0 | ||
773 | adc eax, eax | ||
774 | sub ecx, edx | ||
775 | adc eax, 0 | ||
776 | mov DWORD PTR 28[ebx],ecx | ||
777 | ; | ||
778 | add esi, 32 | ||
779 | add edi, 32 | ||
780 | add ebx, 32 | ||
781 | sub ebp, 8 | ||
782 | jnz L015aw_loop | ||
783 | $L014aw_finish: | ||
784 | mov ebp, DWORD PTR 32[esp] | ||
785 | and ebp, 7 | ||
786 | jz $L016aw_end | ||
787 | ; Tail Round 0 | ||
788 | mov ecx, DWORD PTR [esi] | ||
789 | mov edx, DWORD PTR [edi] | ||
790 | sub ecx, eax | ||
791 | mov eax, 0 | ||
792 | adc eax, eax | ||
793 | sub ecx, edx | ||
794 | adc eax, 0 | ||
795 | dec ebp | ||
796 | mov DWORD PTR [ebx],ecx | ||
797 | jz $L016aw_end | ||
798 | ; Tail Round 1 | ||
799 | mov ecx, DWORD PTR 4[esi] | ||
800 | mov edx, DWORD PTR 4[edi] | ||
801 | sub ecx, eax | ||
802 | mov eax, 0 | ||
803 | adc eax, eax | ||
804 | sub ecx, edx | ||
805 | adc eax, 0 | ||
806 | dec ebp | ||
807 | mov DWORD PTR 4[ebx],ecx | ||
808 | jz $L016aw_end | ||
809 | ; Tail Round 2 | ||
810 | mov ecx, DWORD PTR 8[esi] | ||
811 | mov edx, DWORD PTR 8[edi] | ||
812 | sub ecx, eax | ||
813 | mov eax, 0 | ||
814 | adc eax, eax | ||
815 | sub ecx, edx | ||
816 | adc eax, 0 | ||
817 | dec ebp | ||
818 | mov DWORD PTR 8[ebx],ecx | ||
819 | jz $L016aw_end | ||
820 | ; Tail Round 3 | ||
821 | mov ecx, DWORD PTR 12[esi] | ||
822 | mov edx, DWORD PTR 12[edi] | ||
823 | sub ecx, eax | ||
824 | mov eax, 0 | ||
825 | adc eax, eax | ||
826 | sub ecx, edx | ||
827 | adc eax, 0 | ||
828 | dec ebp | ||
829 | mov DWORD PTR 12[ebx],ecx | ||
830 | jz $L016aw_end | ||
831 | ; Tail Round 4 | ||
832 | mov ecx, DWORD PTR 16[esi] | ||
833 | mov edx, DWORD PTR 16[edi] | ||
834 | sub ecx, eax | ||
835 | mov eax, 0 | ||
836 | adc eax, eax | ||
837 | sub ecx, edx | ||
838 | adc eax, 0 | ||
839 | dec ebp | ||
840 | mov DWORD PTR 16[ebx],ecx | ||
841 | jz $L016aw_end | ||
842 | ; Tail Round 5 | ||
843 | mov ecx, DWORD PTR 20[esi] | ||
844 | mov edx, DWORD PTR 20[edi] | ||
845 | sub ecx, eax | ||
846 | mov eax, 0 | ||
847 | adc eax, eax | ||
848 | sub ecx, edx | ||
849 | adc eax, 0 | ||
850 | dec ebp | ||
851 | mov DWORD PTR 20[ebx],ecx | ||
852 | jz $L016aw_end | ||
853 | ; Tail Round 6 | ||
854 | mov ecx, DWORD PTR 24[esi] | ||
855 | mov edx, DWORD PTR 24[edi] | ||
856 | sub ecx, eax | ||
857 | mov eax, 0 | ||
858 | adc eax, eax | ||
859 | sub ecx, edx | ||
860 | adc eax, 0 | ||
861 | mov DWORD PTR 24[ebx],ecx | ||
862 | $L016aw_end: | ||
863 | pop edi | ||
864 | pop esi | ||
865 | pop ebx | ||
866 | pop ebp | ||
867 | ret | ||
868 | _bn_sub_words ENDP | ||
869 | _TEXT ENDS | ||
870 | _TEXT SEGMENT | ||
871 | PUBLIC _bn_mul_comba8 | ||
872 | |||
873 | _bn_mul_comba8 PROC NEAR | ||
874 | push esi | ||
875 | mov esi, DWORD PTR 12[esp] | ||
876 | push edi | ||
877 | mov edi, DWORD PTR 20[esp] | ||
878 | push ebp | ||
879 | push ebx | ||
880 | xor ebx, ebx | ||
881 | mov eax, DWORD PTR [esi] | ||
882 | xor ecx, ecx | ||
883 | mov edx, DWORD PTR [edi] | ||
884 | ; ################## Calculate word 0 | ||
885 | xor ebp, ebp | ||
886 | ; mul a[0]*b[0] | ||
887 | mul edx | ||
888 | add ebx, eax | ||
889 | mov eax, DWORD PTR 20[esp] | ||
890 | adc ecx, edx | ||
891 | mov edx, DWORD PTR [edi] | ||
892 | adc ebp, 0 | ||
893 | mov DWORD PTR [eax],ebx | ||
894 | mov eax, DWORD PTR 4[esi] | ||
895 | ; saved r[0] | ||
896 | ; ################## Calculate word 1 | ||
897 | xor ebx, ebx | ||
898 | ; mul a[1]*b[0] | ||
899 | mul edx | ||
900 | add ecx, eax | ||
901 | mov eax, DWORD PTR [esi] | ||
902 | adc ebp, edx | ||
903 | mov edx, DWORD PTR 4[edi] | ||
904 | adc ebx, 0 | ||
905 | ; mul a[0]*b[1] | ||
906 | mul edx | ||
907 | add ecx, eax | ||
908 | mov eax, DWORD PTR 20[esp] | ||
909 | adc ebp, edx | ||
910 | mov edx, DWORD PTR [edi] | ||
911 | adc ebx, 0 | ||
912 | mov DWORD PTR 4[eax],ecx | ||
913 | mov eax, DWORD PTR 8[esi] | ||
914 | ; saved r[1] | ||
915 | ; ################## Calculate word 2 | ||
916 | xor ecx, ecx | ||
917 | ; mul a[2]*b[0] | ||
918 | mul edx | ||
919 | add ebp, eax | ||
920 | mov eax, DWORD PTR 4[esi] | ||
921 | adc ebx, edx | ||
922 | mov edx, DWORD PTR 4[edi] | ||
923 | adc ecx, 0 | ||
924 | ; mul a[1]*b[1] | ||
925 | mul edx | ||
926 | add ebp, eax | ||
927 | mov eax, DWORD PTR [esi] | ||
928 | adc ebx, edx | ||
929 | mov edx, DWORD PTR 8[edi] | ||
930 | adc ecx, 0 | ||
931 | ; mul a[0]*b[2] | ||
932 | mul edx | ||
933 | add ebp, eax | ||
934 | mov eax, DWORD PTR 20[esp] | ||
935 | adc ebx, edx | ||
936 | mov edx, DWORD PTR [edi] | ||
937 | adc ecx, 0 | ||
938 | mov DWORD PTR 8[eax],ebp | ||
939 | mov eax, DWORD PTR 12[esi] | ||
940 | ; saved r[2] | ||
941 | ; ################## Calculate word 3 | ||
942 | xor ebp, ebp | ||
943 | ; mul a[3]*b[0] | ||
944 | mul edx | ||
945 | add ebx, eax | ||
946 | mov eax, DWORD PTR 8[esi] | ||
947 | adc ecx, edx | ||
948 | mov edx, DWORD PTR 4[edi] | ||
949 | adc ebp, 0 | ||
950 | ; mul a[2]*b[1] | ||
951 | mul edx | ||
952 | add ebx, eax | ||
953 | mov eax, DWORD PTR 4[esi] | ||
954 | adc ecx, edx | ||
955 | mov edx, DWORD PTR 8[edi] | ||
956 | adc ebp, 0 | ||
957 | ; mul a[1]*b[2] | ||
958 | mul edx | ||
959 | add ebx, eax | ||
960 | mov eax, DWORD PTR [esi] | ||
961 | adc ecx, edx | ||
962 | mov edx, DWORD PTR 12[edi] | ||
963 | adc ebp, 0 | ||
964 | ; mul a[0]*b[3] | ||
965 | mul edx | ||
966 | add ebx, eax | ||
967 | mov eax, DWORD PTR 20[esp] | ||
968 | adc ecx, edx | ||
969 | mov edx, DWORD PTR [edi] | ||
970 | adc ebp, 0 | ||
971 | mov DWORD PTR 12[eax],ebx | ||
972 | mov eax, DWORD PTR 16[esi] | ||
973 | ; saved r[3] | ||
974 | ; ################## Calculate word 4 | ||
975 | xor ebx, ebx | ||
976 | ; mul a[4]*b[0] | ||
977 | mul edx | ||
978 | add ecx, eax | ||
979 | mov eax, DWORD PTR 12[esi] | ||
980 | adc ebp, edx | ||
981 | mov edx, DWORD PTR 4[edi] | ||
982 | adc ebx, 0 | ||
983 | ; mul a[3]*b[1] | ||
984 | mul edx | ||
985 | add ecx, eax | ||
986 | mov eax, DWORD PTR 8[esi] | ||
987 | adc ebp, edx | ||
988 | mov edx, DWORD PTR 8[edi] | ||
989 | adc ebx, 0 | ||
990 | ; mul a[2]*b[2] | ||
991 | mul edx | ||
992 | add ecx, eax | ||
993 | mov eax, DWORD PTR 4[esi] | ||
994 | adc ebp, edx | ||
995 | mov edx, DWORD PTR 12[edi] | ||
996 | adc ebx, 0 | ||
997 | ; mul a[1]*b[3] | ||
998 | mul edx | ||
999 | add ecx, eax | ||
1000 | mov eax, DWORD PTR [esi] | ||
1001 | adc ebp, edx | ||
1002 | mov edx, DWORD PTR 16[edi] | ||
1003 | adc ebx, 0 | ||
1004 | ; mul a[0]*b[4] | ||
1005 | mul edx | ||
1006 | add ecx, eax | ||
1007 | mov eax, DWORD PTR 20[esp] | ||
1008 | adc ebp, edx | ||
1009 | mov edx, DWORD PTR [edi] | ||
1010 | adc ebx, 0 | ||
1011 | mov DWORD PTR 16[eax],ecx | ||
1012 | mov eax, DWORD PTR 20[esi] | ||
1013 | ; saved r[4] | ||
1014 | ; ################## Calculate word 5 | ||
1015 | xor ecx, ecx | ||
1016 | ; mul a[5]*b[0] | ||
1017 | mul edx | ||
1018 | add ebp, eax | ||
1019 | mov eax, DWORD PTR 16[esi] | ||
1020 | adc ebx, edx | ||
1021 | mov edx, DWORD PTR 4[edi] | ||
1022 | adc ecx, 0 | ||
1023 | ; mul a[4]*b[1] | ||
1024 | mul edx | ||
1025 | add ebp, eax | ||
1026 | mov eax, DWORD PTR 12[esi] | ||
1027 | adc ebx, edx | ||
1028 | mov edx, DWORD PTR 8[edi] | ||
1029 | adc ecx, 0 | ||
1030 | ; mul a[3]*b[2] | ||
1031 | mul edx | ||
1032 | add ebp, eax | ||
1033 | mov eax, DWORD PTR 8[esi] | ||
1034 | adc ebx, edx | ||
1035 | mov edx, DWORD PTR 12[edi] | ||
1036 | adc ecx, 0 | ||
1037 | ; mul a[2]*b[3] | ||
1038 | mul edx | ||
1039 | add ebp, eax | ||
1040 | mov eax, DWORD PTR 4[esi] | ||
1041 | adc ebx, edx | ||
1042 | mov edx, DWORD PTR 16[edi] | ||
1043 | adc ecx, 0 | ||
1044 | ; mul a[1]*b[4] | ||
1045 | mul edx | ||
1046 | add ebp, eax | ||
1047 | mov eax, DWORD PTR [esi] | ||
1048 | adc ebx, edx | ||
1049 | mov edx, DWORD PTR 20[edi] | ||
1050 | adc ecx, 0 | ||
1051 | ; mul a[0]*b[5] | ||
1052 | mul edx | ||
1053 | add ebp, eax | ||
1054 | mov eax, DWORD PTR 20[esp] | ||
1055 | adc ebx, edx | ||
1056 | mov edx, DWORD PTR [edi] | ||
1057 | adc ecx, 0 | ||
1058 | mov DWORD PTR 20[eax],ebp | ||
1059 | mov eax, DWORD PTR 24[esi] | ||
1060 | ; saved r[5] | ||
1061 | ; ################## Calculate word 6 | ||
1062 | xor ebp, ebp | ||
1063 | ; mul a[6]*b[0] | ||
1064 | mul edx | ||
1065 | add ebx, eax | ||
1066 | mov eax, DWORD PTR 20[esi] | ||
1067 | adc ecx, edx | ||
1068 | mov edx, DWORD PTR 4[edi] | ||
1069 | adc ebp, 0 | ||
1070 | ; mul a[5]*b[1] | ||
1071 | mul edx | ||
1072 | add ebx, eax | ||
1073 | mov eax, DWORD PTR 16[esi] | ||
1074 | adc ecx, edx | ||
1075 | mov edx, DWORD PTR 8[edi] | ||
1076 | adc ebp, 0 | ||
1077 | ; mul a[4]*b[2] | ||
1078 | mul edx | ||
1079 | add ebx, eax | ||
1080 | mov eax, DWORD PTR 12[esi] | ||
1081 | adc ecx, edx | ||
1082 | mov edx, DWORD PTR 12[edi] | ||
1083 | adc ebp, 0 | ||
1084 | ; mul a[3]*b[3] | ||
1085 | mul edx | ||
1086 | add ebx, eax | ||
1087 | mov eax, DWORD PTR 8[esi] | ||
1088 | adc ecx, edx | ||
1089 | mov edx, DWORD PTR 16[edi] | ||
1090 | adc ebp, 0 | ||
1091 | ; mul a[2]*b[4] | ||
1092 | mul edx | ||
1093 | add ebx, eax | ||
1094 | mov eax, DWORD PTR 4[esi] | ||
1095 | adc ecx, edx | ||
1096 | mov edx, DWORD PTR 20[edi] | ||
1097 | adc ebp, 0 | ||
1098 | ; mul a[1]*b[5] | ||
1099 | mul edx | ||
1100 | add ebx, eax | ||
1101 | mov eax, DWORD PTR [esi] | ||
1102 | adc ecx, edx | ||
1103 | mov edx, DWORD PTR 24[edi] | ||
1104 | adc ebp, 0 | ||
1105 | ; mul a[0]*b[6] | ||
1106 | mul edx | ||
1107 | add ebx, eax | ||
1108 | mov eax, DWORD PTR 20[esp] | ||
1109 | adc ecx, edx | ||
1110 | mov edx, DWORD PTR [edi] | ||
1111 | adc ebp, 0 | ||
1112 | mov DWORD PTR 24[eax],ebx | ||
1113 | mov eax, DWORD PTR 28[esi] | ||
1114 | ; saved r[6] | ||
1115 | ; ################## Calculate word 7 | ||
1116 | xor ebx, ebx | ||
1117 | ; mul a[7]*b[0] | ||
1118 | mul edx | ||
1119 | add ecx, eax | ||
1120 | mov eax, DWORD PTR 24[esi] | ||
1121 | adc ebp, edx | ||
1122 | mov edx, DWORD PTR 4[edi] | ||
1123 | adc ebx, 0 | ||
1124 | ; mul a[6]*b[1] | ||
1125 | mul edx | ||
1126 | add ecx, eax | ||
1127 | mov eax, DWORD PTR 20[esi] | ||
1128 | adc ebp, edx | ||
1129 | mov edx, DWORD PTR 8[edi] | ||
1130 | adc ebx, 0 | ||
1131 | ; mul a[5]*b[2] | ||
1132 | mul edx | ||
1133 | add ecx, eax | ||
1134 | mov eax, DWORD PTR 16[esi] | ||
1135 | adc ebp, edx | ||
1136 | mov edx, DWORD PTR 12[edi] | ||
1137 | adc ebx, 0 | ||
1138 | ; mul a[4]*b[3] | ||
1139 | mul edx | ||
1140 | add ecx, eax | ||
1141 | mov eax, DWORD PTR 12[esi] | ||
1142 | adc ebp, edx | ||
1143 | mov edx, DWORD PTR 16[edi] | ||
1144 | adc ebx, 0 | ||
1145 | ; mul a[3]*b[4] | ||
1146 | mul edx | ||
1147 | add ecx, eax | ||
1148 | mov eax, DWORD PTR 8[esi] | ||
1149 | adc ebp, edx | ||
1150 | mov edx, DWORD PTR 20[edi] | ||
1151 | adc ebx, 0 | ||
1152 | ; mul a[2]*b[5] | ||
1153 | mul edx | ||
1154 | add ecx, eax | ||
1155 | mov eax, DWORD PTR 4[esi] | ||
1156 | adc ebp, edx | ||
1157 | mov edx, DWORD PTR 24[edi] | ||
1158 | adc ebx, 0 | ||
1159 | ; mul a[1]*b[6] | ||
1160 | mul edx | ||
1161 | add ecx, eax | ||
1162 | mov eax, DWORD PTR [esi] | ||
1163 | adc ebp, edx | ||
1164 | mov edx, DWORD PTR 28[edi] | ||
1165 | adc ebx, 0 | ||
1166 | ; mul a[0]*b[7] | ||
1167 | mul edx | ||
1168 | add ecx, eax | ||
1169 | mov eax, DWORD PTR 20[esp] | ||
1170 | adc ebp, edx | ||
1171 | mov edx, DWORD PTR 4[edi] | ||
1172 | adc ebx, 0 | ||
1173 | mov DWORD PTR 28[eax],ecx | ||
1174 | mov eax, DWORD PTR 28[esi] | ||
1175 | ; saved r[7] | ||
1176 | ; ################## Calculate word 8 | ||
1177 | xor ecx, ecx | ||
1178 | ; mul a[7]*b[1] | ||
1179 | mul edx | ||
1180 | add ebp, eax | ||
1181 | mov eax, DWORD PTR 24[esi] | ||
1182 | adc ebx, edx | ||
1183 | mov edx, DWORD PTR 8[edi] | ||
1184 | adc ecx, 0 | ||
1185 | ; mul a[6]*b[2] | ||
1186 | mul edx | ||
1187 | add ebp, eax | ||
1188 | mov eax, DWORD PTR 20[esi] | ||
1189 | adc ebx, edx | ||
1190 | mov edx, DWORD PTR 12[edi] | ||
1191 | adc ecx, 0 | ||
1192 | ; mul a[5]*b[3] | ||
1193 | mul edx | ||
1194 | add ebp, eax | ||
1195 | mov eax, DWORD PTR 16[esi] | ||
1196 | adc ebx, edx | ||
1197 | mov edx, DWORD PTR 16[edi] | ||
1198 | adc ecx, 0 | ||
1199 | ; mul a[4]*b[4] | ||
1200 | mul edx | ||
1201 | add ebp, eax | ||
1202 | mov eax, DWORD PTR 12[esi] | ||
1203 | adc ebx, edx | ||
1204 | mov edx, DWORD PTR 20[edi] | ||
1205 | adc ecx, 0 | ||
1206 | ; mul a[3]*b[5] | ||
1207 | mul edx | ||
1208 | add ebp, eax | ||
1209 | mov eax, DWORD PTR 8[esi] | ||
1210 | adc ebx, edx | ||
1211 | mov edx, DWORD PTR 24[edi] | ||
1212 | adc ecx, 0 | ||
1213 | ; mul a[2]*b[6] | ||
1214 | mul edx | ||
1215 | add ebp, eax | ||
1216 | mov eax, DWORD PTR 4[esi] | ||
1217 | adc ebx, edx | ||
1218 | mov edx, DWORD PTR 28[edi] | ||
1219 | adc ecx, 0 | ||
1220 | ; mul a[1]*b[7] | ||
1221 | mul edx | ||
1222 | add ebp, eax | ||
1223 | mov eax, DWORD PTR 20[esp] | ||
1224 | adc ebx, edx | ||
1225 | mov edx, DWORD PTR 8[edi] | ||
1226 | adc ecx, 0 | ||
1227 | mov DWORD PTR 32[eax],ebp | ||
1228 | mov eax, DWORD PTR 28[esi] | ||
1229 | ; saved r[8] | ||
1230 | ; ################## Calculate word 9 | ||
1231 | xor ebp, ebp | ||
1232 | ; mul a[7]*b[2] | ||
1233 | mul edx | ||
1234 | add ebx, eax | ||
1235 | mov eax, DWORD PTR 24[esi] | ||
1236 | adc ecx, edx | ||
1237 | mov edx, DWORD PTR 12[edi] | ||
1238 | adc ebp, 0 | ||
1239 | ; mul a[6]*b[3] | ||
1240 | mul edx | ||
1241 | add ebx, eax | ||
1242 | mov eax, DWORD PTR 20[esi] | ||
1243 | adc ecx, edx | ||
1244 | mov edx, DWORD PTR 16[edi] | ||
1245 | adc ebp, 0 | ||
1246 | ; mul a[5]*b[4] | ||
1247 | mul edx | ||
1248 | add ebx, eax | ||
1249 | mov eax, DWORD PTR 16[esi] | ||
1250 | adc ecx, edx | ||
1251 | mov edx, DWORD PTR 20[edi] | ||
1252 | adc ebp, 0 | ||
1253 | ; mul a[4]*b[5] | ||
1254 | mul edx | ||
1255 | add ebx, eax | ||
1256 | mov eax, DWORD PTR 12[esi] | ||
1257 | adc ecx, edx | ||
1258 | mov edx, DWORD PTR 24[edi] | ||
1259 | adc ebp, 0 | ||
1260 | ; mul a[3]*b[6] | ||
1261 | mul edx | ||
1262 | add ebx, eax | ||
1263 | mov eax, DWORD PTR 8[esi] | ||
1264 | adc ecx, edx | ||
1265 | mov edx, DWORD PTR 28[edi] | ||
1266 | adc ebp, 0 | ||
1267 | ; mul a[2]*b[7] | ||
1268 | mul edx | ||
1269 | add ebx, eax | ||
1270 | mov eax, DWORD PTR 20[esp] | ||
1271 | adc ecx, edx | ||
1272 | mov edx, DWORD PTR 12[edi] | ||
1273 | adc ebp, 0 | ||
1274 | mov DWORD PTR 36[eax],ebx | ||
1275 | mov eax, DWORD PTR 28[esi] | ||
1276 | ; saved r[9] | ||
1277 | ; ################## Calculate word 10 | ||
1278 | xor ebx, ebx | ||
1279 | ; mul a[7]*b[3] | ||
1280 | mul edx | ||
1281 | add ecx, eax | ||
1282 | mov eax, DWORD PTR 24[esi] | ||
1283 | adc ebp, edx | ||
1284 | mov edx, DWORD PTR 16[edi] | ||
1285 | adc ebx, 0 | ||
1286 | ; mul a[6]*b[4] | ||
1287 | mul edx | ||
1288 | add ecx, eax | ||
1289 | mov eax, DWORD PTR 20[esi] | ||
1290 | adc ebp, edx | ||
1291 | mov edx, DWORD PTR 20[edi] | ||
1292 | adc ebx, 0 | ||
1293 | ; mul a[5]*b[5] | ||
1294 | mul edx | ||
1295 | add ecx, eax | ||
1296 | mov eax, DWORD PTR 16[esi] | ||
1297 | adc ebp, edx | ||
1298 | mov edx, DWORD PTR 24[edi] | ||
1299 | adc ebx, 0 | ||
1300 | ; mul a[4]*b[6] | ||
1301 | mul edx | ||
1302 | add ecx, eax | ||
1303 | mov eax, DWORD PTR 12[esi] | ||
1304 | adc ebp, edx | ||
1305 | mov edx, DWORD PTR 28[edi] | ||
1306 | adc ebx, 0 | ||
1307 | ; mul a[3]*b[7] | ||
1308 | mul edx | ||
1309 | add ecx, eax | ||
1310 | mov eax, DWORD PTR 20[esp] | ||
1311 | adc ebp, edx | ||
1312 | mov edx, DWORD PTR 16[edi] | ||
1313 | adc ebx, 0 | ||
1314 | mov DWORD PTR 40[eax],ecx | ||
1315 | mov eax, DWORD PTR 28[esi] | ||
1316 | ; saved r[10] | ||
1317 | ; ################## Calculate word 11 | ||
1318 | xor ecx, ecx | ||
1319 | ; mul a[7]*b[4] | ||
1320 | mul edx | ||
1321 | add ebp, eax | ||
1322 | mov eax, DWORD PTR 24[esi] | ||
1323 | adc ebx, edx | ||
1324 | mov edx, DWORD PTR 20[edi] | ||
1325 | adc ecx, 0 | ||
1326 | ; mul a[6]*b[5] | ||
1327 | mul edx | ||
1328 | add ebp, eax | ||
1329 | mov eax, DWORD PTR 20[esi] | ||
1330 | adc ebx, edx | ||
1331 | mov edx, DWORD PTR 24[edi] | ||
1332 | adc ecx, 0 | ||
1333 | ; mul a[5]*b[6] | ||
1334 | mul edx | ||
1335 | add ebp, eax | ||
1336 | mov eax, DWORD PTR 16[esi] | ||
1337 | adc ebx, edx | ||
1338 | mov edx, DWORD PTR 28[edi] | ||
1339 | adc ecx, 0 | ||
1340 | ; mul a[4]*b[7] | ||
1341 | mul edx | ||
1342 | add ebp, eax | ||
1343 | mov eax, DWORD PTR 20[esp] | ||
1344 | adc ebx, edx | ||
1345 | mov edx, DWORD PTR 20[edi] | ||
1346 | adc ecx, 0 | ||
1347 | mov DWORD PTR 44[eax],ebp | ||
1348 | mov eax, DWORD PTR 28[esi] | ||
1349 | ; saved r[11] | ||
1350 | ; ################## Calculate word 12 | ||
1351 | xor ebp, ebp | ||
1352 | ; mul a[7]*b[5] | ||
1353 | mul edx | ||
1354 | add ebx, eax | ||
1355 | mov eax, DWORD PTR 24[esi] | ||
1356 | adc ecx, edx | ||
1357 | mov edx, DWORD PTR 24[edi] | ||
1358 | adc ebp, 0 | ||
1359 | ; mul a[6]*b[6] | ||
1360 | mul edx | ||
1361 | add ebx, eax | ||
1362 | mov eax, DWORD PTR 20[esi] | ||
1363 | adc ecx, edx | ||
1364 | mov edx, DWORD PTR 28[edi] | ||
1365 | adc ebp, 0 | ||
1366 | ; mul a[5]*b[7] | ||
1367 | mul edx | ||
1368 | add ebx, eax | ||
1369 | mov eax, DWORD PTR 20[esp] | ||
1370 | adc ecx, edx | ||
1371 | mov edx, DWORD PTR 24[edi] | ||
1372 | adc ebp, 0 | ||
1373 | mov DWORD PTR 48[eax],ebx | ||
1374 | mov eax, DWORD PTR 28[esi] | ||
1375 | ; saved r[12] | ||
1376 | ; ################## Calculate word 13 | ||
1377 | xor ebx, ebx | ||
1378 | ; mul a[7]*b[6] | ||
1379 | mul edx | ||
1380 | add ecx, eax | ||
1381 | mov eax, DWORD PTR 24[esi] | ||
1382 | adc ebp, edx | ||
1383 | mov edx, DWORD PTR 28[edi] | ||
1384 | adc ebx, 0 | ||
1385 | ; mul a[6]*b[7] | ||
1386 | mul edx | ||
1387 | add ecx, eax | ||
1388 | mov eax, DWORD PTR 20[esp] | ||
1389 | adc ebp, edx | ||
1390 | mov edx, DWORD PTR 28[edi] | ||
1391 | adc ebx, 0 | ||
1392 | mov DWORD PTR 52[eax],ecx | ||
1393 | mov eax, DWORD PTR 28[esi] | ||
1394 | ; saved r[13] | ||
1395 | ; ################## Calculate word 14 | ||
1396 | xor ecx, ecx | ||
1397 | ; mul a[7]*b[7] | ||
1398 | mul edx | ||
1399 | add ebp, eax | ||
1400 | mov eax, DWORD PTR 20[esp] | ||
1401 | adc ebx, edx | ||
1402 | adc ecx, 0 | ||
1403 | mov DWORD PTR 56[eax],ebp | ||
1404 | ; saved r[14] | ||
1405 | ; save r[15] | ||
1406 | mov DWORD PTR 60[eax],ebx | ||
1407 | pop ebx | ||
1408 | pop ebp | ||
1409 | pop edi | ||
1410 | pop esi | ||
1411 | ret | ||
1412 | _bn_mul_comba8 ENDP | ||
1413 | _TEXT ENDS | ||
1414 | _TEXT SEGMENT | ||
1415 | PUBLIC _bn_mul_comba4 | ||
1416 | |||
1417 | _bn_mul_comba4 PROC NEAR | ||
1418 | push esi | ||
1419 | mov esi, DWORD PTR 12[esp] | ||
1420 | push edi | ||
1421 | mov edi, DWORD PTR 20[esp] | ||
1422 | push ebp | ||
1423 | push ebx | ||
1424 | xor ebx, ebx | ||
1425 | mov eax, DWORD PTR [esi] | ||
1426 | xor ecx, ecx | ||
1427 | mov edx, DWORD PTR [edi] | ||
1428 | ; ################## Calculate word 0 | ||
1429 | xor ebp, ebp | ||
1430 | ; mul a[0]*b[0] | ||
1431 | mul edx | ||
1432 | add ebx, eax | ||
1433 | mov eax, DWORD PTR 20[esp] | ||
1434 | adc ecx, edx | ||
1435 | mov edx, DWORD PTR [edi] | ||
1436 | adc ebp, 0 | ||
1437 | mov DWORD PTR [eax],ebx | ||
1438 | mov eax, DWORD PTR 4[esi] | ||
1439 | ; saved r[0] | ||
1440 | ; ################## Calculate word 1 | ||
1441 | xor ebx, ebx | ||
1442 | ; mul a[1]*b[0] | ||
1443 | mul edx | ||
1444 | add ecx, eax | ||
1445 | mov eax, DWORD PTR [esi] | ||
1446 | adc ebp, edx | ||
1447 | mov edx, DWORD PTR 4[edi] | ||
1448 | adc ebx, 0 | ||
1449 | ; mul a[0]*b[1] | ||
1450 | mul edx | ||
1451 | add ecx, eax | ||
1452 | mov eax, DWORD PTR 20[esp] | ||
1453 | adc ebp, edx | ||
1454 | mov edx, DWORD PTR [edi] | ||
1455 | adc ebx, 0 | ||
1456 | mov DWORD PTR 4[eax],ecx | ||
1457 | mov eax, DWORD PTR 8[esi] | ||
1458 | ; saved r[1] | ||
1459 | ; ################## Calculate word 2 | ||
1460 | xor ecx, ecx | ||
1461 | ; mul a[2]*b[0] | ||
1462 | mul edx | ||
1463 | add ebp, eax | ||
1464 | mov eax, DWORD PTR 4[esi] | ||
1465 | adc ebx, edx | ||
1466 | mov edx, DWORD PTR 4[edi] | ||
1467 | adc ecx, 0 | ||
1468 | ; mul a[1]*b[1] | ||
1469 | mul edx | ||
1470 | add ebp, eax | ||
1471 | mov eax, DWORD PTR [esi] | ||
1472 | adc ebx, edx | ||
1473 | mov edx, DWORD PTR 8[edi] | ||
1474 | adc ecx, 0 | ||
1475 | ; mul a[0]*b[2] | ||
1476 | mul edx | ||
1477 | add ebp, eax | ||
1478 | mov eax, DWORD PTR 20[esp] | ||
1479 | adc ebx, edx | ||
1480 | mov edx, DWORD PTR [edi] | ||
1481 | adc ecx, 0 | ||
1482 | mov DWORD PTR 8[eax],ebp | ||
1483 | mov eax, DWORD PTR 12[esi] | ||
1484 | ; saved r[2] | ||
1485 | ; ################## Calculate word 3 | ||
1486 | xor ebp, ebp | ||
1487 | ; mul a[3]*b[0] | ||
1488 | mul edx | ||
1489 | add ebx, eax | ||
1490 | mov eax, DWORD PTR 8[esi] | ||
1491 | adc ecx, edx | ||
1492 | mov edx, DWORD PTR 4[edi] | ||
1493 | adc ebp, 0 | ||
1494 | ; mul a[2]*b[1] | ||
1495 | mul edx | ||
1496 | add ebx, eax | ||
1497 | mov eax, DWORD PTR 4[esi] | ||
1498 | adc ecx, edx | ||
1499 | mov edx, DWORD PTR 8[edi] | ||
1500 | adc ebp, 0 | ||
1501 | ; mul a[1]*b[2] | ||
1502 | mul edx | ||
1503 | add ebx, eax | ||
1504 | mov eax, DWORD PTR [esi] | ||
1505 | adc ecx, edx | ||
1506 | mov edx, DWORD PTR 12[edi] | ||
1507 | adc ebp, 0 | ||
1508 | ; mul a[0]*b[3] | ||
1509 | mul edx | ||
1510 | add ebx, eax | ||
1511 | mov eax, DWORD PTR 20[esp] | ||
1512 | adc ecx, edx | ||
1513 | mov edx, DWORD PTR 4[edi] | ||
1514 | adc ebp, 0 | ||
1515 | mov DWORD PTR 12[eax],ebx | ||
1516 | mov eax, DWORD PTR 12[esi] | ||
1517 | ; saved r[3] | ||
1518 | ; ################## Calculate word 4 | ||
1519 | xor ebx, ebx | ||
1520 | ; mul a[3]*b[1] | ||
1521 | mul edx | ||
1522 | add ecx, eax | ||
1523 | mov eax, DWORD PTR 8[esi] | ||
1524 | adc ebp, edx | ||
1525 | mov edx, DWORD PTR 8[edi] | ||
1526 | adc ebx, 0 | ||
1527 | ; mul a[2]*b[2] | ||
1528 | mul edx | ||
1529 | add ecx, eax | ||
1530 | mov eax, DWORD PTR 4[esi] | ||
1531 | adc ebp, edx | ||
1532 | mov edx, DWORD PTR 12[edi] | ||
1533 | adc ebx, 0 | ||
1534 | ; mul a[1]*b[3] | ||
1535 | mul edx | ||
1536 | add ecx, eax | ||
1537 | mov eax, DWORD PTR 20[esp] | ||
1538 | adc ebp, edx | ||
1539 | mov edx, DWORD PTR 8[edi] | ||
1540 | adc ebx, 0 | ||
1541 | mov DWORD PTR 16[eax],ecx | ||
1542 | mov eax, DWORD PTR 12[esi] | ||
1543 | ; saved r[4] | ||
1544 | ; ################## Calculate word 5 | ||
1545 | xor ecx, ecx | ||
1546 | ; mul a[3]*b[2] | ||
1547 | mul edx | ||
1548 | add ebp, eax | ||
1549 | mov eax, DWORD PTR 8[esi] | ||
1550 | adc ebx, edx | ||
1551 | mov edx, DWORD PTR 12[edi] | ||
1552 | adc ecx, 0 | ||
1553 | ; mul a[2]*b[3] | ||
1554 | mul edx | ||
1555 | add ebp, eax | ||
1556 | mov eax, DWORD PTR 20[esp] | ||
1557 | adc ebx, edx | ||
1558 | mov edx, DWORD PTR 12[edi] | ||
1559 | adc ecx, 0 | ||
1560 | mov DWORD PTR 20[eax],ebp | ||
1561 | mov eax, DWORD PTR 12[esi] | ||
1562 | ; saved r[5] | ||
1563 | ; ################## Calculate word 6 | ||
1564 | xor ebp, ebp | ||
1565 | ; mul a[3]*b[3] | ||
1566 | mul edx | ||
1567 | add ebx, eax | ||
1568 | mov eax, DWORD PTR 20[esp] | ||
1569 | adc ecx, edx | ||
1570 | adc ebp, 0 | ||
1571 | mov DWORD PTR 24[eax],ebx | ||
1572 | ; saved r[6] | ||
1573 | ; save r[7] | ||
1574 | mov DWORD PTR 28[eax],ecx | ||
1575 | pop ebx | ||
1576 | pop ebp | ||
1577 | pop edi | ||
1578 | pop esi | ||
1579 | ret | ||
1580 | _bn_mul_comba4 ENDP | ||
1581 | _TEXT ENDS | ||
1582 | _TEXT SEGMENT | ||
1583 | PUBLIC _bn_sqr_comba8 | ||
1584 | |||
1585 | _bn_sqr_comba8 PROC NEAR | ||
1586 | push esi | ||
1587 | push edi | ||
1588 | push ebp | ||
1589 | push ebx | ||
1590 | mov edi, DWORD PTR 20[esp] | ||
1591 | mov esi, DWORD PTR 24[esp] | ||
1592 | xor ebx, ebx | ||
1593 | xor ecx, ecx | ||
1594 | mov eax, DWORD PTR [esi] | ||
1595 | ; ############### Calculate word 0 | ||
1596 | xor ebp, ebp | ||
1597 | ; sqr a[0]*a[0] | ||
1598 | mul eax | ||
1599 | add ebx, eax | ||
1600 | adc ecx, edx | ||
1601 | mov edx, DWORD PTR [esi] | ||
1602 | adc ebp, 0 | ||
1603 | mov DWORD PTR [edi],ebx | ||
1604 | mov eax, DWORD PTR 4[esi] | ||
1605 | ; saved r[0] | ||
1606 | ; ############### Calculate word 1 | ||
1607 | xor ebx, ebx | ||
1608 | ; sqr a[1]*a[0] | ||
1609 | mul edx | ||
1610 | add eax, eax | ||
1611 | adc edx, edx | ||
1612 | adc ebx, 0 | ||
1613 | add ecx, eax | ||
1614 | adc ebp, edx | ||
1615 | mov eax, DWORD PTR 8[esi] | ||
1616 | adc ebx, 0 | ||
1617 | mov DWORD PTR 4[edi],ecx | ||
1618 | mov edx, DWORD PTR [esi] | ||
1619 | ; saved r[1] | ||
1620 | ; ############### Calculate word 2 | ||
1621 | xor ecx, ecx | ||
1622 | ; sqr a[2]*a[0] | ||
1623 | mul edx | ||
1624 | add eax, eax | ||
1625 | adc edx, edx | ||
1626 | adc ecx, 0 | ||
1627 | add ebp, eax | ||
1628 | adc ebx, edx | ||
1629 | mov eax, DWORD PTR 4[esi] | ||
1630 | adc ecx, 0 | ||
1631 | ; sqr a[1]*a[1] | ||
1632 | mul eax | ||
1633 | add ebp, eax | ||
1634 | adc ebx, edx | ||
1635 | mov edx, DWORD PTR [esi] | ||
1636 | adc ecx, 0 | ||
1637 | mov DWORD PTR 8[edi],ebp | ||
1638 | mov eax, DWORD PTR 12[esi] | ||
1639 | ; saved r[2] | ||
1640 | ; ############### Calculate word 3 | ||
1641 | xor ebp, ebp | ||
1642 | ; sqr a[3]*a[0] | ||
1643 | mul edx | ||
1644 | add eax, eax | ||
1645 | adc edx, edx | ||
1646 | adc ebp, 0 | ||
1647 | add ebx, eax | ||
1648 | adc ecx, edx | ||
1649 | mov eax, DWORD PTR 8[esi] | ||
1650 | adc ebp, 0 | ||
1651 | mov edx, DWORD PTR 4[esi] | ||
1652 | ; sqr a[2]*a[1] | ||
1653 | mul edx | ||
1654 | add eax, eax | ||
1655 | adc edx, edx | ||
1656 | adc ebp, 0 | ||
1657 | add ebx, eax | ||
1658 | adc ecx, edx | ||
1659 | mov eax, DWORD PTR 16[esi] | ||
1660 | adc ebp, 0 | ||
1661 | mov DWORD PTR 12[edi],ebx | ||
1662 | mov edx, DWORD PTR [esi] | ||
1663 | ; saved r[3] | ||
1664 | ; ############### Calculate word 4 | ||
1665 | xor ebx, ebx | ||
1666 | ; sqr a[4]*a[0] | ||
1667 | mul edx | ||
1668 | add eax, eax | ||
1669 | adc edx, edx | ||
1670 | adc ebx, 0 | ||
1671 | add ecx, eax | ||
1672 | adc ebp, edx | ||
1673 | mov eax, DWORD PTR 12[esi] | ||
1674 | adc ebx, 0 | ||
1675 | mov edx, DWORD PTR 4[esi] | ||
1676 | ; sqr a[3]*a[1] | ||
1677 | mul edx | ||
1678 | add eax, eax | ||
1679 | adc edx, edx | ||
1680 | adc ebx, 0 | ||
1681 | add ecx, eax | ||
1682 | adc ebp, edx | ||
1683 | mov eax, DWORD PTR 8[esi] | ||
1684 | adc ebx, 0 | ||
1685 | ; sqr a[2]*a[2] | ||
1686 | mul eax | ||
1687 | add ecx, eax | ||
1688 | adc ebp, edx | ||
1689 | mov edx, DWORD PTR [esi] | ||
1690 | adc ebx, 0 | ||
1691 | mov DWORD PTR 16[edi],ecx | ||
1692 | mov eax, DWORD PTR 20[esi] | ||
1693 | ; saved r[4] | ||
1694 | ; ############### Calculate word 5 | ||
1695 | xor ecx, ecx | ||
1696 | ; sqr a[5]*a[0] | ||
1697 | mul edx | ||
1698 | add eax, eax | ||
1699 | adc edx, edx | ||
1700 | adc ecx, 0 | ||
1701 | add ebp, eax | ||
1702 | adc ebx, edx | ||
1703 | mov eax, DWORD PTR 16[esi] | ||
1704 | adc ecx, 0 | ||
1705 | mov edx, DWORD PTR 4[esi] | ||
1706 | ; sqr a[4]*a[1] | ||
1707 | mul edx | ||
1708 | add eax, eax | ||
1709 | adc edx, edx | ||
1710 | adc ecx, 0 | ||
1711 | add ebp, eax | ||
1712 | adc ebx, edx | ||
1713 | mov eax, DWORD PTR 12[esi] | ||
1714 | adc ecx, 0 | ||
1715 | mov edx, DWORD PTR 8[esi] | ||
1716 | ; sqr a[3]*a[2] | ||
1717 | mul edx | ||
1718 | add eax, eax | ||
1719 | adc edx, edx | ||
1720 | adc ecx, 0 | ||
1721 | add ebp, eax | ||
1722 | adc ebx, edx | ||
1723 | mov eax, DWORD PTR 24[esi] | ||
1724 | adc ecx, 0 | ||
1725 | mov DWORD PTR 20[edi],ebp | ||
1726 | mov edx, DWORD PTR [esi] | ||
1727 | ; saved r[5] | ||
1728 | ; ############### Calculate word 6 | ||
1729 | xor ebp, ebp | ||
1730 | ; sqr a[6]*a[0] | ||
1731 | mul edx | ||
1732 | add eax, eax | ||
1733 | adc edx, edx | ||
1734 | adc ebp, 0 | ||
1735 | add ebx, eax | ||
1736 | adc ecx, edx | ||
1737 | mov eax, DWORD PTR 20[esi] | ||
1738 | adc ebp, 0 | ||
1739 | mov edx, DWORD PTR 4[esi] | ||
1740 | ; sqr a[5]*a[1] | ||
1741 | mul edx | ||
1742 | add eax, eax | ||
1743 | adc edx, edx | ||
1744 | adc ebp, 0 | ||
1745 | add ebx, eax | ||
1746 | adc ecx, edx | ||
1747 | mov eax, DWORD PTR 16[esi] | ||
1748 | adc ebp, 0 | ||
1749 | mov edx, DWORD PTR 8[esi] | ||
1750 | ; sqr a[4]*a[2] | ||
1751 | mul edx | ||
1752 | add eax, eax | ||
1753 | adc edx, edx | ||
1754 | adc ebp, 0 | ||
1755 | add ebx, eax | ||
1756 | adc ecx, edx | ||
1757 | mov eax, DWORD PTR 12[esi] | ||
1758 | adc ebp, 0 | ||
1759 | ; sqr a[3]*a[3] | ||
1760 | mul eax | ||
1761 | add ebx, eax | ||
1762 | adc ecx, edx | ||
1763 | mov edx, DWORD PTR [esi] | ||
1764 | adc ebp, 0 | ||
1765 | mov DWORD PTR 24[edi],ebx | ||
1766 | mov eax, DWORD PTR 28[esi] | ||
1767 | ; saved r[6] | ||
1768 | ; ############### Calculate word 7 | ||
1769 | xor ebx, ebx | ||
1770 | ; sqr a[7]*a[0] | ||
1771 | mul edx | ||
1772 | add eax, eax | ||
1773 | adc edx, edx | ||
1774 | adc ebx, 0 | ||
1775 | add ecx, eax | ||
1776 | adc ebp, edx | ||
1777 | mov eax, DWORD PTR 24[esi] | ||
1778 | adc ebx, 0 | ||
1779 | mov edx, DWORD PTR 4[esi] | ||
1780 | ; sqr a[6]*a[1] | ||
1781 | mul edx | ||
1782 | add eax, eax | ||
1783 | adc edx, edx | ||
1784 | adc ebx, 0 | ||
1785 | add ecx, eax | ||
1786 | adc ebp, edx | ||
1787 | mov eax, DWORD PTR 20[esi] | ||
1788 | adc ebx, 0 | ||
1789 | mov edx, DWORD PTR 8[esi] | ||
1790 | ; sqr a[5]*a[2] | ||
1791 | mul edx | ||
1792 | add eax, eax | ||
1793 | adc edx, edx | ||
1794 | adc ebx, 0 | ||
1795 | add ecx, eax | ||
1796 | adc ebp, edx | ||
1797 | mov eax, DWORD PTR 16[esi] | ||
1798 | adc ebx, 0 | ||
1799 | mov edx, DWORD PTR 12[esi] | ||
1800 | ; sqr a[4]*a[3] | ||
1801 | mul edx | ||
1802 | add eax, eax | ||
1803 | adc edx, edx | ||
1804 | adc ebx, 0 | ||
1805 | add ecx, eax | ||
1806 | adc ebp, edx | ||
1807 | mov eax, DWORD PTR 28[esi] | ||
1808 | adc ebx, 0 | ||
1809 | mov DWORD PTR 28[edi],ecx | ||
1810 | mov edx, DWORD PTR 4[esi] | ||
1811 | ; saved r[7] | ||
1812 | ; ############### Calculate word 8 | ||
1813 | xor ecx, ecx | ||
1814 | ; sqr a[7]*a[1] | ||
1815 | mul edx | ||
1816 | add eax, eax | ||
1817 | adc edx, edx | ||
1818 | adc ecx, 0 | ||
1819 | add ebp, eax | ||
1820 | adc ebx, edx | ||
1821 | mov eax, DWORD PTR 24[esi] | ||
1822 | adc ecx, 0 | ||
1823 | mov edx, DWORD PTR 8[esi] | ||
1824 | ; sqr a[6]*a[2] | ||
1825 | mul edx | ||
1826 | add eax, eax | ||
1827 | adc edx, edx | ||
1828 | adc ecx, 0 | ||
1829 | add ebp, eax | ||
1830 | adc ebx, edx | ||
1831 | mov eax, DWORD PTR 20[esi] | ||
1832 | adc ecx, 0 | ||
1833 | mov edx, DWORD PTR 12[esi] | ||
1834 | ; sqr a[5]*a[3] | ||
1835 | mul edx | ||
1836 | add eax, eax | ||
1837 | adc edx, edx | ||
1838 | adc ecx, 0 | ||
1839 | add ebp, eax | ||
1840 | adc ebx, edx | ||
1841 | mov eax, DWORD PTR 16[esi] | ||
1842 | adc ecx, 0 | ||
1843 | ; sqr a[4]*a[4] | ||
1844 | mul eax | ||
1845 | add ebp, eax | ||
1846 | adc ebx, edx | ||
1847 | mov edx, DWORD PTR 8[esi] | ||
1848 | adc ecx, 0 | ||
1849 | mov DWORD PTR 32[edi],ebp | ||
1850 | mov eax, DWORD PTR 28[esi] | ||
1851 | ; saved r[8] | ||
1852 | ; ############### Calculate word 9 | ||
1853 | xor ebp, ebp | ||
1854 | ; sqr a[7]*a[2] | ||
1855 | mul edx | ||
1856 | add eax, eax | ||
1857 | adc edx, edx | ||
1858 | adc ebp, 0 | ||
1859 | add ebx, eax | ||
1860 | adc ecx, edx | ||
1861 | mov eax, DWORD PTR 24[esi] | ||
1862 | adc ebp, 0 | ||
1863 | mov edx, DWORD PTR 12[esi] | ||
1864 | ; sqr a[6]*a[3] | ||
1865 | mul edx | ||
1866 | add eax, eax | ||
1867 | adc edx, edx | ||
1868 | adc ebp, 0 | ||
1869 | add ebx, eax | ||
1870 | adc ecx, edx | ||
1871 | mov eax, DWORD PTR 20[esi] | ||
1872 | adc ebp, 0 | ||
1873 | mov edx, DWORD PTR 16[esi] | ||
1874 | ; sqr a[5]*a[4] | ||
1875 | mul edx | ||
1876 | add eax, eax | ||
1877 | adc edx, edx | ||
1878 | adc ebp, 0 | ||
1879 | add ebx, eax | ||
1880 | adc ecx, edx | ||
1881 | mov eax, DWORD PTR 28[esi] | ||
1882 | adc ebp, 0 | ||
1883 | mov DWORD PTR 36[edi],ebx | ||
1884 | mov edx, DWORD PTR 12[esi] | ||
1885 | ; saved r[9] | ||
1886 | ; ############### Calculate word 10 | ||
1887 | xor ebx, ebx | ||
1888 | ; sqr a[7]*a[3] | ||
1889 | mul edx | ||
1890 | add eax, eax | ||
1891 | adc edx, edx | ||
1892 | adc ebx, 0 | ||
1893 | add ecx, eax | ||
1894 | adc ebp, edx | ||
1895 | mov eax, DWORD PTR 24[esi] | ||
1896 | adc ebx, 0 | ||
1897 | mov edx, DWORD PTR 16[esi] | ||
1898 | ; sqr a[6]*a[4] | ||
1899 | mul edx | ||
1900 | add eax, eax | ||
1901 | adc edx, edx | ||
1902 | adc ebx, 0 | ||
1903 | add ecx, eax | ||
1904 | adc ebp, edx | ||
1905 | mov eax, DWORD PTR 20[esi] | ||
1906 | adc ebx, 0 | ||
1907 | ; sqr a[5]*a[5] | ||
1908 | mul eax | ||
1909 | add ecx, eax | ||
1910 | adc ebp, edx | ||
1911 | mov edx, DWORD PTR 16[esi] | ||
1912 | adc ebx, 0 | ||
1913 | mov DWORD PTR 40[edi],ecx | ||
1914 | mov eax, DWORD PTR 28[esi] | ||
1915 | ; saved r[10] | ||
1916 | ; ############### Calculate word 11 | ||
1917 | xor ecx, ecx | ||
1918 | ; sqr a[7]*a[4] | ||
1919 | mul edx | ||
1920 | add eax, eax | ||
1921 | adc edx, edx | ||
1922 | adc ecx, 0 | ||
1923 | add ebp, eax | ||
1924 | adc ebx, edx | ||
1925 | mov eax, DWORD PTR 24[esi] | ||
1926 | adc ecx, 0 | ||
1927 | mov edx, DWORD PTR 20[esi] | ||
1928 | ; sqr a[6]*a[5] | ||
1929 | mul edx | ||
1930 | add eax, eax | ||
1931 | adc edx, edx | ||
1932 | adc ecx, 0 | ||
1933 | add ebp, eax | ||
1934 | adc ebx, edx | ||
1935 | mov eax, DWORD PTR 28[esi] | ||
1936 | adc ecx, 0 | ||
1937 | mov DWORD PTR 44[edi],ebp | ||
1938 | mov edx, DWORD PTR 20[esi] | ||
1939 | ; saved r[11] | ||
1940 | ; ############### Calculate word 12 | ||
1941 | xor ebp, ebp | ||
1942 | ; sqr a[7]*a[5] | ||
1943 | mul edx | ||
1944 | add eax, eax | ||
1945 | adc edx, edx | ||
1946 | adc ebp, 0 | ||
1947 | add ebx, eax | ||
1948 | adc ecx, edx | ||
1949 | mov eax, DWORD PTR 24[esi] | ||
1950 | adc ebp, 0 | ||
1951 | ; sqr a[6]*a[6] | ||
1952 | mul eax | ||
1953 | add ebx, eax | ||
1954 | adc ecx, edx | ||
1955 | mov edx, DWORD PTR 24[esi] | ||
1956 | adc ebp, 0 | ||
1957 | mov DWORD PTR 48[edi],ebx | ||
1958 | mov eax, DWORD PTR 28[esi] | ||
1959 | ; saved r[12] | ||
1960 | ; ############### Calculate word 13 | ||
1961 | xor ebx, ebx | ||
1962 | ; sqr a[7]*a[6] | ||
1963 | mul edx | ||
1964 | add eax, eax | ||
1965 | adc edx, edx | ||
1966 | adc ebx, 0 | ||
1967 | add ecx, eax | ||
1968 | adc ebp, edx | ||
1969 | mov eax, DWORD PTR 28[esi] | ||
1970 | adc ebx, 0 | ||
1971 | mov DWORD PTR 52[edi],ecx | ||
1972 | ; saved r[13] | ||
1973 | ; ############### Calculate word 14 | ||
1974 | xor ecx, ecx | ||
1975 | ; sqr a[7]*a[7] | ||
1976 | mul eax | ||
1977 | add ebp, eax | ||
1978 | adc ebx, edx | ||
1979 | adc ecx, 0 | ||
1980 | mov DWORD PTR 56[edi],ebp | ||
1981 | ; saved r[14] | ||
1982 | mov DWORD PTR 60[edi],ebx | ||
1983 | pop ebx | ||
1984 | pop ebp | ||
1985 | pop edi | ||
1986 | pop esi | ||
1987 | ret | ||
1988 | _bn_sqr_comba8 ENDP | ||
1989 | _TEXT ENDS | ||
1990 | _TEXT SEGMENT | ||
1991 | PUBLIC _bn_sqr_comba4 | ||
1992 | |||
1993 | _bn_sqr_comba4 PROC NEAR | ||
1994 | push esi | ||
1995 | push edi | ||
1996 | push ebp | ||
1997 | push ebx | ||
1998 | mov edi, DWORD PTR 20[esp] | ||
1999 | mov esi, DWORD PTR 24[esp] | ||
2000 | xor ebx, ebx | ||
2001 | xor ecx, ecx | ||
2002 | mov eax, DWORD PTR [esi] | ||
2003 | ; ############### Calculate word 0 | ||
2004 | xor ebp, ebp | ||
2005 | ; sqr a[0]*a[0] | ||
2006 | mul eax | ||
2007 | add ebx, eax | ||
2008 | adc ecx, edx | ||
2009 | mov edx, DWORD PTR [esi] | ||
2010 | adc ebp, 0 | ||
2011 | mov DWORD PTR [edi],ebx | ||
2012 | mov eax, DWORD PTR 4[esi] | ||
2013 | ; saved r[0] | ||
2014 | ; ############### Calculate word 1 | ||
2015 | xor ebx, ebx | ||
2016 | ; sqr a[1]*a[0] | ||
2017 | mul edx | ||
2018 | add eax, eax | ||
2019 | adc edx, edx | ||
2020 | adc ebx, 0 | ||
2021 | add ecx, eax | ||
2022 | adc ebp, edx | ||
2023 | mov eax, DWORD PTR 8[esi] | ||
2024 | adc ebx, 0 | ||
2025 | mov DWORD PTR 4[edi],ecx | ||
2026 | mov edx, DWORD PTR [esi] | ||
2027 | ; saved r[1] | ||
2028 | ; ############### Calculate word 2 | ||
2029 | xor ecx, ecx | ||
2030 | ; sqr a[2]*a[0] | ||
2031 | mul edx | ||
2032 | add eax, eax | ||
2033 | adc edx, edx | ||
2034 | adc ecx, 0 | ||
2035 | add ebp, eax | ||
2036 | adc ebx, edx | ||
2037 | mov eax, DWORD PTR 4[esi] | ||
2038 | adc ecx, 0 | ||
2039 | ; sqr a[1]*a[1] | ||
2040 | mul eax | ||
2041 | add ebp, eax | ||
2042 | adc ebx, edx | ||
2043 | mov edx, DWORD PTR [esi] | ||
2044 | adc ecx, 0 | ||
2045 | mov DWORD PTR 8[edi],ebp | ||
2046 | mov eax, DWORD PTR 12[esi] | ||
2047 | ; saved r[2] | ||
2048 | ; ############### Calculate word 3 | ||
2049 | xor ebp, ebp | ||
2050 | ; sqr a[3]*a[0] | ||
2051 | mul edx | ||
2052 | add eax, eax | ||
2053 | adc edx, edx | ||
2054 | adc ebp, 0 | ||
2055 | add ebx, eax | ||
2056 | adc ecx, edx | ||
2057 | mov eax, DWORD PTR 8[esi] | ||
2058 | adc ebp, 0 | ||
2059 | mov edx, DWORD PTR 4[esi] | ||
2060 | ; sqr a[2]*a[1] | ||
2061 | mul edx | ||
2062 | add eax, eax | ||
2063 | adc edx, edx | ||
2064 | adc ebp, 0 | ||
2065 | add ebx, eax | ||
2066 | adc ecx, edx | ||
2067 | mov eax, DWORD PTR 12[esi] | ||
2068 | adc ebp, 0 | ||
2069 | mov DWORD PTR 12[edi],ebx | ||
2070 | mov edx, DWORD PTR 4[esi] | ||
2071 | ; saved r[3] | ||
2072 | ; ############### Calculate word 4 | ||
2073 | xor ebx, ebx | ||
2074 | ; sqr a[3]*a[1] | ||
2075 | mul edx | ||
2076 | add eax, eax | ||
2077 | adc edx, edx | ||
2078 | adc ebx, 0 | ||
2079 | add ecx, eax | ||
2080 | adc ebp, edx | ||
2081 | mov eax, DWORD PTR 8[esi] | ||
2082 | adc ebx, 0 | ||
2083 | ; sqr a[2]*a[2] | ||
2084 | mul eax | ||
2085 | add ecx, eax | ||
2086 | adc ebp, edx | ||
2087 | mov edx, DWORD PTR 8[esi] | ||
2088 | adc ebx, 0 | ||
2089 | mov DWORD PTR 16[edi],ecx | ||
2090 | mov eax, DWORD PTR 12[esi] | ||
2091 | ; saved r[4] | ||
2092 | ; ############### Calculate word 5 | ||
2093 | xor ecx, ecx | ||
2094 | ; sqr a[3]*a[2] | ||
2095 | mul edx | ||
2096 | add eax, eax | ||
2097 | adc edx, edx | ||
2098 | adc ecx, 0 | ||
2099 | add ebp, eax | ||
2100 | adc ebx, edx | ||
2101 | mov eax, DWORD PTR 12[esi] | ||
2102 | adc ecx, 0 | ||
2103 | mov DWORD PTR 20[edi],ebp | ||
2104 | ; saved r[5] | ||
2105 | ; ############### Calculate word 6 | ||
2106 | xor ebp, ebp | ||
2107 | ; sqr a[3]*a[3] | ||
2108 | mul eax | ||
2109 | add ebx, eax | ||
2110 | adc ecx, edx | ||
2111 | adc ebp, 0 | ||
2112 | mov DWORD PTR 24[edi],ebx | ||
2113 | ; saved r[6] | ||
2114 | mov DWORD PTR 28[edi],ecx | ||
2115 | pop ebx | ||
2116 | pop ebp | ||
2117 | pop edi | ||
2118 | pop esi | ||
2119 | ret | ||
2120 | _bn_sqr_comba4 ENDP | ||
2121 | _TEXT ENDS | ||
689 | END | 2122 | END |
diff --git a/src/lib/libcrypto/bn/asm/bn86unix.cpp b/src/lib/libcrypto/bn/asm/bn86unix.cpp deleted file mode 100644 index 64702201ea..0000000000 --- a/src/lib/libcrypto/bn/asm/bn86unix.cpp +++ /dev/null | |||
@@ -1,752 +0,0 @@ | |||
1 | /* Run the C pre-processor over this file with one of the following defined | ||
2 | * ELF - elf object files, | ||
3 | * OUT - a.out object files, | ||
4 | * BSDI - BSDI style a.out object files | ||
5 | * SOL - Solaris style elf | ||
6 | */ | ||
7 | |||
8 | #define TYPE(a,b) .type a,b | ||
9 | #define SIZE(a,b) .size a,b | ||
10 | |||
11 | #if defined(OUT) || defined(BSDI) | ||
12 | #define bn_mul_add_words _bn_mul_add_words | ||
13 | #define bn_mul_words _bn_mul_words | ||
14 | #define bn_sqr_words _bn_sqr_words | ||
15 | #define bn_div64 _bn_div64 | ||
16 | #define bn_add_words _bn_add_words | ||
17 | |||
18 | #endif | ||
19 | |||
20 | #ifdef OUT | ||
21 | #define OK 1 | ||
22 | #define ALIGN 4 | ||
23 | #endif | ||
24 | |||
25 | #ifdef BSDI | ||
26 | #define OK 1 | ||
27 | #define ALIGN 4 | ||
28 | #undef SIZE | ||
29 | #undef TYPE | ||
30 | #define SIZE(a,b) | ||
31 | #define TYPE(a,b) | ||
32 | #endif | ||
33 | |||
34 | #if defined(ELF) || defined(SOL) | ||
35 | #define OK 1 | ||
36 | #define ALIGN 16 | ||
37 | #endif | ||
38 | |||
39 | #ifndef OK | ||
40 | You need to define one of | ||
41 | ELF - elf systems - linux-elf, NetBSD and DG-UX | ||
42 | OUT - a.out systems - linux-a.out and FreeBSD | ||
43 | SOL - solaris systems, which are elf with strange comment lines | ||
44 | BSDI - a.out with a very primative version of as. | ||
45 | #endif | ||
46 | |||
47 | /* Let the Assembler begin :-) */ | ||
48 | /* Don't even think of reading this code */ | ||
49 | /* It was automatically generated by bn-586.pl */ | ||
50 | /* Which is a perl program used to generate the x86 assember for */ | ||
51 | /* any of elf, a.out, BSDI,Win32, or Solaris */ | ||
52 | /* eric <eay@cryptsoft.com> */ | ||
53 | |||
54 | .file "bn-586.s" | ||
55 | .version "01.01" | ||
56 | gcc2_compiled.: | ||
57 | .text | ||
58 | .align ALIGN | ||
59 | .globl bn_mul_add_words | ||
60 | TYPE(bn_mul_add_words,@function) | ||
61 | bn_mul_add_words: | ||
62 | pushl %ebp | ||
63 | pushl %ebx | ||
64 | pushl %esi | ||
65 | pushl %edi | ||
66 | |||
67 | |||
68 | xorl %esi, %esi | ||
69 | movl 20(%esp), %edi | ||
70 | movl 28(%esp), %ecx | ||
71 | movl 24(%esp), %ebx | ||
72 | andl $4294967288, %ecx | ||
73 | movl 32(%esp), %ebp | ||
74 | pushl %ecx | ||
75 | jz .L000maw_finish | ||
76 | .L001maw_loop: | ||
77 | movl %ecx, (%esp) | ||
78 | /* Round 0 */ | ||
79 | movl (%ebx), %eax | ||
80 | mull %ebp | ||
81 | addl %esi, %eax | ||
82 | movl (%edi), %esi | ||
83 | adcl $0, %edx | ||
84 | addl %esi, %eax | ||
85 | adcl $0, %edx | ||
86 | movl %eax, (%edi) | ||
87 | movl %edx, %esi | ||
88 | /* Round 4 */ | ||
89 | movl 4(%ebx), %eax | ||
90 | mull %ebp | ||
91 | addl %esi, %eax | ||
92 | movl 4(%edi), %esi | ||
93 | adcl $0, %edx | ||
94 | addl %esi, %eax | ||
95 | adcl $0, %edx | ||
96 | movl %eax, 4(%edi) | ||
97 | movl %edx, %esi | ||
98 | /* Round 8 */ | ||
99 | movl 8(%ebx), %eax | ||
100 | mull %ebp | ||
101 | addl %esi, %eax | ||
102 | movl 8(%edi), %esi | ||
103 | adcl $0, %edx | ||
104 | addl %esi, %eax | ||
105 | adcl $0, %edx | ||
106 | movl %eax, 8(%edi) | ||
107 | movl %edx, %esi | ||
108 | /* Round 12 */ | ||
109 | movl 12(%ebx), %eax | ||
110 | mull %ebp | ||
111 | addl %esi, %eax | ||
112 | movl 12(%edi), %esi | ||
113 | adcl $0, %edx | ||
114 | addl %esi, %eax | ||
115 | adcl $0, %edx | ||
116 | movl %eax, 12(%edi) | ||
117 | movl %edx, %esi | ||
118 | /* Round 16 */ | ||
119 | movl 16(%ebx), %eax | ||
120 | mull %ebp | ||
121 | addl %esi, %eax | ||
122 | movl 16(%edi), %esi | ||
123 | adcl $0, %edx | ||
124 | addl %esi, %eax | ||
125 | adcl $0, %edx | ||
126 | movl %eax, 16(%edi) | ||
127 | movl %edx, %esi | ||
128 | /* Round 20 */ | ||
129 | movl 20(%ebx), %eax | ||
130 | mull %ebp | ||
131 | addl %esi, %eax | ||
132 | movl 20(%edi), %esi | ||
133 | adcl $0, %edx | ||
134 | addl %esi, %eax | ||
135 | adcl $0, %edx | ||
136 | movl %eax, 20(%edi) | ||
137 | movl %edx, %esi | ||
138 | /* Round 24 */ | ||
139 | movl 24(%ebx), %eax | ||
140 | mull %ebp | ||
141 | addl %esi, %eax | ||
142 | movl 24(%edi), %esi | ||
143 | adcl $0, %edx | ||
144 | addl %esi, %eax | ||
145 | adcl $0, %edx | ||
146 | movl %eax, 24(%edi) | ||
147 | movl %edx, %esi | ||
148 | /* Round 28 */ | ||
149 | movl 28(%ebx), %eax | ||
150 | mull %ebp | ||
151 | addl %esi, %eax | ||
152 | movl 28(%edi), %esi | ||
153 | adcl $0, %edx | ||
154 | addl %esi, %eax | ||
155 | adcl $0, %edx | ||
156 | movl %eax, 28(%edi) | ||
157 | movl %edx, %esi | ||
158 | |||
159 | movl (%esp), %ecx | ||
160 | addl $32, %ebx | ||
161 | addl $32, %edi | ||
162 | subl $8, %ecx | ||
163 | jnz .L001maw_loop | ||
164 | .L000maw_finish: | ||
165 | movl 32(%esp), %ecx | ||
166 | andl $7, %ecx | ||
167 | jnz .L002maw_finish2 | ||
168 | jmp .L003maw_end | ||
169 | .align ALIGN | ||
170 | .L002maw_finish2: | ||
171 | /* Tail Round 0 */ | ||
172 | movl (%ebx), %eax | ||
173 | mull %ebp | ||
174 | addl %esi, %eax | ||
175 | movl (%edi), %esi | ||
176 | adcl $0, %edx | ||
177 | addl %esi, %eax | ||
178 | adcl $0, %edx | ||
179 | decl %ecx | ||
180 | movl %eax, (%edi) | ||
181 | movl %edx, %esi | ||
182 | jz .L003maw_end | ||
183 | /* Tail Round 1 */ | ||
184 | movl 4(%ebx), %eax | ||
185 | mull %ebp | ||
186 | addl %esi, %eax | ||
187 | movl 4(%edi), %esi | ||
188 | adcl $0, %edx | ||
189 | addl %esi, %eax | ||
190 | adcl $0, %edx | ||
191 | decl %ecx | ||
192 | movl %eax, 4(%edi) | ||
193 | movl %edx, %esi | ||
194 | jz .L003maw_end | ||
195 | /* Tail Round 2 */ | ||
196 | movl 8(%ebx), %eax | ||
197 | mull %ebp | ||
198 | addl %esi, %eax | ||
199 | movl 8(%edi), %esi | ||
200 | adcl $0, %edx | ||
201 | addl %esi, %eax | ||
202 | adcl $0, %edx | ||
203 | decl %ecx | ||
204 | movl %eax, 8(%edi) | ||
205 | movl %edx, %esi | ||
206 | jz .L003maw_end | ||
207 | /* Tail Round 3 */ | ||
208 | movl 12(%ebx), %eax | ||
209 | mull %ebp | ||
210 | addl %esi, %eax | ||
211 | movl 12(%edi), %esi | ||
212 | adcl $0, %edx | ||
213 | addl %esi, %eax | ||
214 | adcl $0, %edx | ||
215 | decl %ecx | ||
216 | movl %eax, 12(%edi) | ||
217 | movl %edx, %esi | ||
218 | jz .L003maw_end | ||
219 | /* Tail Round 4 */ | ||
220 | movl 16(%ebx), %eax | ||
221 | mull %ebp | ||
222 | addl %esi, %eax | ||
223 | movl 16(%edi), %esi | ||
224 | adcl $0, %edx | ||
225 | addl %esi, %eax | ||
226 | adcl $0, %edx | ||
227 | decl %ecx | ||
228 | movl %eax, 16(%edi) | ||
229 | movl %edx, %esi | ||
230 | jz .L003maw_end | ||
231 | /* Tail Round 5 */ | ||
232 | movl 20(%ebx), %eax | ||
233 | mull %ebp | ||
234 | addl %esi, %eax | ||
235 | movl 20(%edi), %esi | ||
236 | adcl $0, %edx | ||
237 | addl %esi, %eax | ||
238 | adcl $0, %edx | ||
239 | decl %ecx | ||
240 | movl %eax, 20(%edi) | ||
241 | movl %edx, %esi | ||
242 | jz .L003maw_end | ||
243 | /* Tail Round 6 */ | ||
244 | movl 24(%ebx), %eax | ||
245 | mull %ebp | ||
246 | addl %esi, %eax | ||
247 | movl 24(%edi), %esi | ||
248 | adcl $0, %edx | ||
249 | addl %esi, %eax | ||
250 | adcl $0, %edx | ||
251 | movl %eax, 24(%edi) | ||
252 | movl %edx, %esi | ||
253 | .L003maw_end: | ||
254 | movl %esi, %eax | ||
255 | popl %ecx | ||
256 | popl %edi | ||
257 | popl %esi | ||
258 | popl %ebx | ||
259 | popl %ebp | ||
260 | ret | ||
261 | .bn_mul_add_words_end: | ||
262 | SIZE(bn_mul_add_words,.bn_mul_add_words_end-bn_mul_add_words) | ||
263 | .ident "bn_mul_add_words" | ||
264 | .text | ||
265 | .align ALIGN | ||
266 | .globl bn_mul_words | ||
267 | TYPE(bn_mul_words,@function) | ||
268 | bn_mul_words: | ||
269 | pushl %ebp | ||
270 | pushl %ebx | ||
271 | pushl %esi | ||
272 | pushl %edi | ||
273 | |||
274 | |||
275 | xorl %esi, %esi | ||
276 | movl 20(%esp), %edi | ||
277 | movl 24(%esp), %ebx | ||
278 | movl 28(%esp), %ebp | ||
279 | movl 32(%esp), %ecx | ||
280 | andl $4294967288, %ebp | ||
281 | jz .L004mw_finish | ||
282 | .L005mw_loop: | ||
283 | /* Round 0 */ | ||
284 | movl (%ebx), %eax | ||
285 | mull %ecx | ||
286 | addl %esi, %eax | ||
287 | adcl $0, %edx | ||
288 | movl %eax, (%edi) | ||
289 | movl %edx, %esi | ||
290 | /* Round 4 */ | ||
291 | movl 4(%ebx), %eax | ||
292 | mull %ecx | ||
293 | addl %esi, %eax | ||
294 | adcl $0, %edx | ||
295 | movl %eax, 4(%edi) | ||
296 | movl %edx, %esi | ||
297 | /* Round 8 */ | ||
298 | movl 8(%ebx), %eax | ||
299 | mull %ecx | ||
300 | addl %esi, %eax | ||
301 | adcl $0, %edx | ||
302 | movl %eax, 8(%edi) | ||
303 | movl %edx, %esi | ||
304 | /* Round 12 */ | ||
305 | movl 12(%ebx), %eax | ||
306 | mull %ecx | ||
307 | addl %esi, %eax | ||
308 | adcl $0, %edx | ||
309 | movl %eax, 12(%edi) | ||
310 | movl %edx, %esi | ||
311 | /* Round 16 */ | ||
312 | movl 16(%ebx), %eax | ||
313 | mull %ecx | ||
314 | addl %esi, %eax | ||
315 | adcl $0, %edx | ||
316 | movl %eax, 16(%edi) | ||
317 | movl %edx, %esi | ||
318 | /* Round 20 */ | ||
319 | movl 20(%ebx), %eax | ||
320 | mull %ecx | ||
321 | addl %esi, %eax | ||
322 | adcl $0, %edx | ||
323 | movl %eax, 20(%edi) | ||
324 | movl %edx, %esi | ||
325 | /* Round 24 */ | ||
326 | movl 24(%ebx), %eax | ||
327 | mull %ecx | ||
328 | addl %esi, %eax | ||
329 | adcl $0, %edx | ||
330 | movl %eax, 24(%edi) | ||
331 | movl %edx, %esi | ||
332 | /* Round 28 */ | ||
333 | movl 28(%ebx), %eax | ||
334 | mull %ecx | ||
335 | addl %esi, %eax | ||
336 | adcl $0, %edx | ||
337 | movl %eax, 28(%edi) | ||
338 | movl %edx, %esi | ||
339 | |||
340 | addl $32, %ebx | ||
341 | addl $32, %edi | ||
342 | subl $8, %ebp | ||
343 | jz .L004mw_finish | ||
344 | jmp .L005mw_loop | ||
345 | .L004mw_finish: | ||
346 | movl 28(%esp), %ebp | ||
347 | andl $7, %ebp | ||
348 | jnz .L006mw_finish2 | ||
349 | jmp .L007mw_end | ||
350 | .align ALIGN | ||
351 | .L006mw_finish2: | ||
352 | /* Tail Round 0 */ | ||
353 | movl (%ebx), %eax | ||
354 | mull %ecx | ||
355 | addl %esi, %eax | ||
356 | adcl $0, %edx | ||
357 | movl %eax, (%edi) | ||
358 | movl %edx, %esi | ||
359 | decl %ebp | ||
360 | jz .L007mw_end | ||
361 | /* Tail Round 1 */ | ||
362 | movl 4(%ebx), %eax | ||
363 | mull %ecx | ||
364 | addl %esi, %eax | ||
365 | adcl $0, %edx | ||
366 | movl %eax, 4(%edi) | ||
367 | movl %edx, %esi | ||
368 | decl %ebp | ||
369 | jz .L007mw_end | ||
370 | /* Tail Round 2 */ | ||
371 | movl 8(%ebx), %eax | ||
372 | mull %ecx | ||
373 | addl %esi, %eax | ||
374 | adcl $0, %edx | ||
375 | movl %eax, 8(%edi) | ||
376 | movl %edx, %esi | ||
377 | decl %ebp | ||
378 | jz .L007mw_end | ||
379 | /* Tail Round 3 */ | ||
380 | movl 12(%ebx), %eax | ||
381 | mull %ecx | ||
382 | addl %esi, %eax | ||
383 | adcl $0, %edx | ||
384 | movl %eax, 12(%edi) | ||
385 | movl %edx, %esi | ||
386 | decl %ebp | ||
387 | jz .L007mw_end | ||
388 | /* Tail Round 4 */ | ||
389 | movl 16(%ebx), %eax | ||
390 | mull %ecx | ||
391 | addl %esi, %eax | ||
392 | adcl $0, %edx | ||
393 | movl %eax, 16(%edi) | ||
394 | movl %edx, %esi | ||
395 | decl %ebp | ||
396 | jz .L007mw_end | ||
397 | /* Tail Round 5 */ | ||
398 | movl 20(%ebx), %eax | ||
399 | mull %ecx | ||
400 | addl %esi, %eax | ||
401 | adcl $0, %edx | ||
402 | movl %eax, 20(%edi) | ||
403 | movl %edx, %esi | ||
404 | decl %ebp | ||
405 | jz .L007mw_end | ||
406 | /* Tail Round 6 */ | ||
407 | movl 24(%ebx), %eax | ||
408 | mull %ecx | ||
409 | addl %esi, %eax | ||
410 | adcl $0, %edx | ||
411 | movl %eax, 24(%edi) | ||
412 | movl %edx, %esi | ||
413 | .L007mw_end: | ||
414 | movl %esi, %eax | ||
415 | popl %edi | ||
416 | popl %esi | ||
417 | popl %ebx | ||
418 | popl %ebp | ||
419 | ret | ||
420 | .bn_mul_words_end: | ||
421 | SIZE(bn_mul_words,.bn_mul_words_end-bn_mul_words) | ||
422 | .ident "bn_mul_words" | ||
423 | .text | ||
424 | .align ALIGN | ||
425 | .globl bn_sqr_words | ||
426 | TYPE(bn_sqr_words,@function) | ||
427 | bn_sqr_words: | ||
428 | pushl %ebp | ||
429 | pushl %ebx | ||
430 | pushl %esi | ||
431 | pushl %edi | ||
432 | |||
433 | |||
434 | movl 20(%esp), %esi | ||
435 | movl 24(%esp), %edi | ||
436 | movl 28(%esp), %ebx | ||
437 | andl $4294967288, %ebx | ||
438 | jz .L008sw_finish | ||
439 | .L009sw_loop: | ||
440 | /* Round 0 */ | ||
441 | movl (%edi), %eax | ||
442 | mull %eax | ||
443 | movl %eax, (%esi) | ||
444 | movl %edx, 4(%esi) | ||
445 | /* Round 4 */ | ||
446 | movl 4(%edi), %eax | ||
447 | mull %eax | ||
448 | movl %eax, 8(%esi) | ||
449 | movl %edx, 12(%esi) | ||
450 | /* Round 8 */ | ||
451 | movl 8(%edi), %eax | ||
452 | mull %eax | ||
453 | movl %eax, 16(%esi) | ||
454 | movl %edx, 20(%esi) | ||
455 | /* Round 12 */ | ||
456 | movl 12(%edi), %eax | ||
457 | mull %eax | ||
458 | movl %eax, 24(%esi) | ||
459 | movl %edx, 28(%esi) | ||
460 | /* Round 16 */ | ||
461 | movl 16(%edi), %eax | ||
462 | mull %eax | ||
463 | movl %eax, 32(%esi) | ||
464 | movl %edx, 36(%esi) | ||
465 | /* Round 20 */ | ||
466 | movl 20(%edi), %eax | ||
467 | mull %eax | ||
468 | movl %eax, 40(%esi) | ||
469 | movl %edx, 44(%esi) | ||
470 | /* Round 24 */ | ||
471 | movl 24(%edi), %eax | ||
472 | mull %eax | ||
473 | movl %eax, 48(%esi) | ||
474 | movl %edx, 52(%esi) | ||
475 | /* Round 28 */ | ||
476 | movl 28(%edi), %eax | ||
477 | mull %eax | ||
478 | movl %eax, 56(%esi) | ||
479 | movl %edx, 60(%esi) | ||
480 | |||
481 | addl $32, %edi | ||
482 | addl $64, %esi | ||
483 | subl $8, %ebx | ||
484 | jnz .L009sw_loop | ||
485 | .L008sw_finish: | ||
486 | movl 28(%esp), %ebx | ||
487 | andl $7, %ebx | ||
488 | jz .L010sw_end | ||
489 | /* Tail Round 0 */ | ||
490 | movl (%edi), %eax | ||
491 | mull %eax | ||
492 | movl %eax, (%esi) | ||
493 | decl %ebx | ||
494 | movl %edx, 4(%esi) | ||
495 | jz .L010sw_end | ||
496 | /* Tail Round 1 */ | ||
497 | movl 4(%edi), %eax | ||
498 | mull %eax | ||
499 | movl %eax, 8(%esi) | ||
500 | decl %ebx | ||
501 | movl %edx, 12(%esi) | ||
502 | jz .L010sw_end | ||
503 | /* Tail Round 2 */ | ||
504 | movl 8(%edi), %eax | ||
505 | mull %eax | ||
506 | movl %eax, 16(%esi) | ||
507 | decl %ebx | ||
508 | movl %edx, 20(%esi) | ||
509 | jz .L010sw_end | ||
510 | /* Tail Round 3 */ | ||
511 | movl 12(%edi), %eax | ||
512 | mull %eax | ||
513 | movl %eax, 24(%esi) | ||
514 | decl %ebx | ||
515 | movl %edx, 28(%esi) | ||
516 | jz .L010sw_end | ||
517 | /* Tail Round 4 */ | ||
518 | movl 16(%edi), %eax | ||
519 | mull %eax | ||
520 | movl %eax, 32(%esi) | ||
521 | decl %ebx | ||
522 | movl %edx, 36(%esi) | ||
523 | jz .L010sw_end | ||
524 | /* Tail Round 5 */ | ||
525 | movl 20(%edi), %eax | ||
526 | mull %eax | ||
527 | movl %eax, 40(%esi) | ||
528 | decl %ebx | ||
529 | movl %edx, 44(%esi) | ||
530 | jz .L010sw_end | ||
531 | /* Tail Round 6 */ | ||
532 | movl 24(%edi), %eax | ||
533 | mull %eax | ||
534 | movl %eax, 48(%esi) | ||
535 | movl %edx, 52(%esi) | ||
536 | .L010sw_end: | ||
537 | popl %edi | ||
538 | popl %esi | ||
539 | popl %ebx | ||
540 | popl %ebp | ||
541 | ret | ||
542 | .bn_sqr_words_end: | ||
543 | SIZE(bn_sqr_words,.bn_sqr_words_end-bn_sqr_words) | ||
544 | .ident "bn_sqr_words" | ||
545 | .text | ||
546 | .align ALIGN | ||
547 | .globl bn_div64 | ||
548 | TYPE(bn_div64,@function) | ||
549 | bn_div64: | ||
550 | pushl %ebp | ||
551 | pushl %ebx | ||
552 | pushl %esi | ||
553 | pushl %edi | ||
554 | |||
555 | movl 20(%esp), %edx | ||
556 | movl 24(%esp), %eax | ||
557 | movl 28(%esp), %ebx | ||
558 | divl %ebx | ||
559 | popl %edi | ||
560 | popl %esi | ||
561 | popl %ebx | ||
562 | popl %ebp | ||
563 | ret | ||
564 | .bn_div64_end: | ||
565 | SIZE(bn_div64,.bn_div64_end-bn_div64) | ||
566 | .ident "bn_div64" | ||
567 | .text | ||
568 | .align ALIGN | ||
569 | .globl bn_add_words | ||
570 | TYPE(bn_add_words,@function) | ||
571 | bn_add_words: | ||
572 | pushl %ebp | ||
573 | pushl %ebx | ||
574 | pushl %esi | ||
575 | pushl %edi | ||
576 | |||
577 | |||
578 | movl 20(%esp), %ebx | ||
579 | movl 24(%esp), %esi | ||
580 | movl 28(%esp), %edi | ||
581 | movl 32(%esp), %ebp | ||
582 | xorl %eax, %eax | ||
583 | andl $4294967288, %ebp | ||
584 | jz .L011aw_finish | ||
585 | .L012aw_loop: | ||
586 | /* Round 0 */ | ||
587 | movl (%esi), %ecx | ||
588 | movl (%edi), %edx | ||
589 | addl %eax, %ecx | ||
590 | movl $0, %eax | ||
591 | adcl %eax, %eax | ||
592 | addl %edx, %ecx | ||
593 | adcl $0, %eax | ||
594 | movl %ecx, (%ebx) | ||
595 | /* Round 1 */ | ||
596 | movl 4(%esi), %ecx | ||
597 | movl 4(%edi), %edx | ||
598 | addl %eax, %ecx | ||
599 | movl $0, %eax | ||
600 | adcl %eax, %eax | ||
601 | addl %edx, %ecx | ||
602 | adcl $0, %eax | ||
603 | movl %ecx, 4(%ebx) | ||
604 | /* Round 2 */ | ||
605 | movl 8(%esi), %ecx | ||
606 | movl 8(%edi), %edx | ||
607 | addl %eax, %ecx | ||
608 | movl $0, %eax | ||
609 | adcl %eax, %eax | ||
610 | addl %edx, %ecx | ||
611 | adcl $0, %eax | ||
612 | movl %ecx, 8(%ebx) | ||
613 | /* Round 3 */ | ||
614 | movl 12(%esi), %ecx | ||
615 | movl 12(%edi), %edx | ||
616 | addl %eax, %ecx | ||
617 | movl $0, %eax | ||
618 | adcl %eax, %eax | ||
619 | addl %edx, %ecx | ||
620 | adcl $0, %eax | ||
621 | movl %ecx, 12(%ebx) | ||
622 | /* Round 4 */ | ||
623 | movl 16(%esi), %ecx | ||
624 | movl 16(%edi), %edx | ||
625 | addl %eax, %ecx | ||
626 | movl $0, %eax | ||
627 | adcl %eax, %eax | ||
628 | addl %edx, %ecx | ||
629 | adcl $0, %eax | ||
630 | movl %ecx, 16(%ebx) | ||
631 | /* Round 5 */ | ||
632 | movl 20(%esi), %ecx | ||
633 | movl 20(%edi), %edx | ||
634 | addl %eax, %ecx | ||
635 | movl $0, %eax | ||
636 | adcl %eax, %eax | ||
637 | addl %edx, %ecx | ||
638 | adcl $0, %eax | ||
639 | movl %ecx, 20(%ebx) | ||
640 | /* Round 6 */ | ||
641 | movl 24(%esi), %ecx | ||
642 | movl 24(%edi), %edx | ||
643 | addl %eax, %ecx | ||
644 | movl $0, %eax | ||
645 | adcl %eax, %eax | ||
646 | addl %edx, %ecx | ||
647 | adcl $0, %eax | ||
648 | movl %ecx, 24(%ebx) | ||
649 | /* Round 7 */ | ||
650 | movl 28(%esi), %ecx | ||
651 | movl 28(%edi), %edx | ||
652 | addl %eax, %ecx | ||
653 | movl $0, %eax | ||
654 | adcl %eax, %eax | ||
655 | addl %edx, %ecx | ||
656 | adcl $0, %eax | ||
657 | movl %ecx, 28(%ebx) | ||
658 | |||
659 | addl $32, %esi | ||
660 | addl $32, %edi | ||
661 | addl $32, %ebx | ||
662 | subl $8, %ebp | ||
663 | jnz .L012aw_loop | ||
664 | .L011aw_finish: | ||
665 | movl 32(%esp), %ebp | ||
666 | andl $7, %ebp | ||
667 | jz .L013aw_end | ||
668 | /* Tail Round 0 */ | ||
669 | movl (%esi), %ecx | ||
670 | movl (%edi), %edx | ||
671 | addl %eax, %ecx | ||
672 | movl $0, %eax | ||
673 | adcl %eax, %eax | ||
674 | addl %edx, %ecx | ||
675 | adcl $0, %eax | ||
676 | decl %ebp | ||
677 | movl %ecx, (%ebx) | ||
678 | jz .L013aw_end | ||
679 | /* Tail Round 1 */ | ||
680 | movl 4(%esi), %ecx | ||
681 | movl 4(%edi), %edx | ||
682 | addl %eax, %ecx | ||
683 | movl $0, %eax | ||
684 | adcl %eax, %eax | ||
685 | addl %edx, %ecx | ||
686 | adcl $0, %eax | ||
687 | decl %ebp | ||
688 | movl %ecx, 4(%ebx) | ||
689 | jz .L013aw_end | ||
690 | /* Tail Round 2 */ | ||
691 | movl 8(%esi), %ecx | ||
692 | movl 8(%edi), %edx | ||
693 | addl %eax, %ecx | ||
694 | movl $0, %eax | ||
695 | adcl %eax, %eax | ||
696 | addl %edx, %ecx | ||
697 | adcl $0, %eax | ||
698 | decl %ebp | ||
699 | movl %ecx, 8(%ebx) | ||
700 | jz .L013aw_end | ||
701 | /* Tail Round 3 */ | ||
702 | movl 12(%esi), %ecx | ||
703 | movl 12(%edi), %edx | ||
704 | addl %eax, %ecx | ||
705 | movl $0, %eax | ||
706 | adcl %eax, %eax | ||
707 | addl %edx, %ecx | ||
708 | adcl $0, %eax | ||
709 | decl %ebp | ||
710 | movl %ecx, 12(%ebx) | ||
711 | jz .L013aw_end | ||
712 | /* Tail Round 4 */ | ||
713 | movl 16(%esi), %ecx | ||
714 | movl 16(%edi), %edx | ||
715 | addl %eax, %ecx | ||
716 | movl $0, %eax | ||
717 | adcl %eax, %eax | ||
718 | addl %edx, %ecx | ||
719 | adcl $0, %eax | ||
720 | decl %ebp | ||
721 | movl %ecx, 16(%ebx) | ||
722 | jz .L013aw_end | ||
723 | /* Tail Round 5 */ | ||
724 | movl 20(%esi), %ecx | ||
725 | movl 20(%edi), %edx | ||
726 | addl %eax, %ecx | ||
727 | movl $0, %eax | ||
728 | adcl %eax, %eax | ||
729 | addl %edx, %ecx | ||
730 | adcl $0, %eax | ||
731 | decl %ebp | ||
732 | movl %ecx, 20(%ebx) | ||
733 | jz .L013aw_end | ||
734 | /* Tail Round 6 */ | ||
735 | movl 24(%esi), %ecx | ||
736 | movl 24(%edi), %edx | ||
737 | addl %eax, %ecx | ||
738 | movl $0, %eax | ||
739 | adcl %eax, %eax | ||
740 | addl %edx, %ecx | ||
741 | adcl $0, %eax | ||
742 | movl %ecx, 24(%ebx) | ||
743 | .L013aw_end: | ||
744 | movl %eax, %eax | ||
745 | popl %edi | ||
746 | popl %esi | ||
747 | popl %ebx | ||
748 | popl %ebp | ||
749 | ret | ||
750 | .bn_add_words_end: | ||
751 | SIZE(bn_add_words,.bn_add_words_end-bn_add_words) | ||
752 | .ident "bn_add_words" | ||
diff --git a/src/lib/libcrypto/bn/asm/ca.pl b/src/lib/libcrypto/bn/asm/ca.pl new file mode 100644 index 0000000000..c1ce67a6b4 --- /dev/null +++ b/src/lib/libcrypto/bn/asm/ca.pl | |||
@@ -0,0 +1,33 @@ | |||
1 | #!/usr/local/bin/perl | ||
2 | # I have this in perl so I can use more usefull register names and then convert | ||
3 | # them into alpha registers. | ||
4 | # | ||
5 | |||
6 | push(@INC,"perlasm","../../perlasm"); | ||
7 | require "alpha.pl"; | ||
8 | require "alpha/mul_add.pl"; | ||
9 | require "alpha/mul.pl"; | ||
10 | require "alpha/sqr.pl"; | ||
11 | require "alpha/add.pl"; | ||
12 | require "alpha/sub.pl"; | ||
13 | require "alpha/mul_c8.pl"; | ||
14 | require "alpha/mul_c4.pl"; | ||
15 | require "alpha/sqr_c4.pl"; | ||
16 | require "alpha/sqr_c8.pl"; | ||
17 | require "alpha/div.pl"; | ||
18 | |||
19 | &asm_init($ARGV[0],$0); | ||
20 | |||
21 | &bn_mul_words("bn_mul_words"); | ||
22 | &bn_sqr_words("bn_sqr_words"); | ||
23 | &bn_mul_add_words("bn_mul_add_words"); | ||
24 | &bn_add_words("bn_add_words"); | ||
25 | &bn_sub_words("bn_sub_words"); | ||
26 | &bn_div_words("bn_div_words"); | ||
27 | &bn_mul_comba8("bn_mul_comba8"); | ||
28 | &bn_mul_comba4("bn_mul_comba4"); | ||
29 | &bn_sqr_comba4("bn_sqr_comba4"); | ||
30 | &bn_sqr_comba8("bn_sqr_comba8"); | ||
31 | |||
32 | &asm_finish(); | ||
33 | |||
diff --git a/src/lib/libcrypto/bn/asm/co-586.pl b/src/lib/libcrypto/bn/asm/co-586.pl new file mode 100644 index 0000000000..5d962cb957 --- /dev/null +++ b/src/lib/libcrypto/bn/asm/co-586.pl | |||
@@ -0,0 +1,286 @@ | |||
1 | #!/usr/local/bin/perl | ||
2 | |||
3 | push(@INC,"perlasm","../../perlasm"); | ||
4 | require "x86asm.pl"; | ||
5 | |||
6 | &asm_init($ARGV[0],$0); | ||
7 | |||
8 | &bn_mul_comba("bn_mul_comba8",8); | ||
9 | &bn_mul_comba("bn_mul_comba4",4); | ||
10 | &bn_sqr_comba("bn_sqr_comba8",8); | ||
11 | &bn_sqr_comba("bn_sqr_comba4",4); | ||
12 | |||
13 | &asm_finish(); | ||
14 | |||
15 | sub mul_add_c | ||
16 | { | ||
17 | local($a,$ai,$b,$bi,$c0,$c1,$c2,$pos,$i,$na,$nb)=@_; | ||
18 | |||
19 | # pos == -1 if eax and edx are pre-loaded, 0 to load from next | ||
20 | # words, and 1 if load return value | ||
21 | |||
22 | &comment("mul a[$ai]*b[$bi]"); | ||
23 | |||
24 | # "eax" and "edx" will always be pre-loaded. | ||
25 | # &mov("eax",&DWP($ai*4,$a,"",0)) ; | ||
26 | # &mov("edx",&DWP($bi*4,$b,"",0)); | ||
27 | |||
28 | &mul("edx"); | ||
29 | &add($c0,"eax"); | ||
30 | &mov("eax",&DWP(($na)*4,$a,"",0)) if $pos == 0; # laod next a | ||
31 | &mov("eax",&wparam(0)) if $pos > 0; # load r[] | ||
32 | ### | ||
33 | &adc($c1,"edx"); | ||
34 | &mov("edx",&DWP(($nb)*4,$b,"",0)) if $pos == 0; # laod next b | ||
35 | &mov("edx",&DWP(($nb)*4,$b,"",0)) if $pos == 1; # laod next b | ||
36 | ### | ||
37 | &adc($c2,0); | ||
38 | # is pos > 1, it means it is the last loop | ||
39 | &mov(&DWP($i*4,"eax","",0),$c0) if $pos > 0; # save r[]; | ||
40 | &mov("eax",&DWP(($na)*4,$a,"",0)) if $pos == 1; # laod next a | ||
41 | } | ||
42 | |||
43 | sub sqr_add_c | ||
44 | { | ||
45 | local($r,$a,$ai,$bi,$c0,$c1,$c2,$pos,$i,$na,$nb)=@_; | ||
46 | |||
47 | # pos == -1 if eax and edx are pre-loaded, 0 to load from next | ||
48 | # words, and 1 if load return value | ||
49 | |||
50 | &comment("sqr a[$ai]*a[$bi]"); | ||
51 | |||
52 | # "eax" and "edx" will always be pre-loaded. | ||
53 | # &mov("eax",&DWP($ai*4,$a,"",0)) ; | ||
54 | # &mov("edx",&DWP($bi*4,$b,"",0)); | ||
55 | |||
56 | if ($ai == $bi) | ||
57 | { &mul("eax");} | ||
58 | else | ||
59 | { &mul("edx");} | ||
60 | &add($c0,"eax"); | ||
61 | &mov("eax",&DWP(($na)*4,$a,"",0)) if $pos == 0; # load next a | ||
62 | ### | ||
63 | &adc($c1,"edx"); | ||
64 | &mov("edx",&DWP(($nb)*4,$a,"",0)) if ($pos == 1) && ($na != $nb); | ||
65 | ### | ||
66 | &adc($c2,0); | ||
67 | # is pos > 1, it means it is the last loop | ||
68 | &mov(&DWP($i*4,$r,"",0),$c0) if $pos > 0; # save r[]; | ||
69 | &mov("eax",&DWP(($na)*4,$a,"",0)) if $pos == 1; # load next b | ||
70 | } | ||
71 | |||
72 | sub sqr_add_c2 | ||
73 | { | ||
74 | local($r,$a,$ai,$bi,$c0,$c1,$c2,$pos,$i,$na,$nb)=@_; | ||
75 | |||
76 | # pos == -1 if eax and edx are pre-loaded, 0 to load from next | ||
77 | # words, and 1 if load return value | ||
78 | |||
79 | &comment("sqr a[$ai]*a[$bi]"); | ||
80 | |||
81 | # "eax" and "edx" will always be pre-loaded. | ||
82 | # &mov("eax",&DWP($ai*4,$a,"",0)) ; | ||
83 | # &mov("edx",&DWP($bi*4,$a,"",0)); | ||
84 | |||
85 | if ($ai == $bi) | ||
86 | { &mul("eax");} | ||
87 | else | ||
88 | { &mul("edx");} | ||
89 | &add("eax","eax"); | ||
90 | ### | ||
91 | &adc("edx","edx"); | ||
92 | ### | ||
93 | &adc($c2,0); | ||
94 | &add($c0,"eax"); | ||
95 | &adc($c1,"edx"); | ||
96 | &mov("eax",&DWP(($na)*4,$a,"",0)) if $pos == 0; # load next a | ||
97 | &mov("eax",&DWP(($na)*4,$a,"",0)) if $pos == 1; # load next b | ||
98 | &adc($c2,0); | ||
99 | &mov(&DWP($i*4,$r,"",0),$c0) if $pos > 0; # save r[]; | ||
100 | &mov("edx",&DWP(($nb)*4,$a,"",0)) if ($pos <= 1) && ($na != $nb); | ||
101 | ### | ||
102 | } | ||
103 | |||
104 | sub bn_mul_comba | ||
105 | { | ||
106 | local($name,$num)=@_; | ||
107 | local($a,$b,$c0,$c1,$c2); | ||
108 | local($i,$as,$ae,$bs,$be,$ai,$bi); | ||
109 | local($tot,$end); | ||
110 | |||
111 | &function_begin_B($name,""); | ||
112 | |||
113 | $c0="ebx"; | ||
114 | $c1="ecx"; | ||
115 | $c2="ebp"; | ||
116 | $a="esi"; | ||
117 | $b="edi"; | ||
118 | |||
119 | $as=0; | ||
120 | $ae=0; | ||
121 | $bs=0; | ||
122 | $be=0; | ||
123 | $tot=$num+$num-1; | ||
124 | |||
125 | &push("esi"); | ||
126 | &mov($a,&wparam(1)); | ||
127 | &push("edi"); | ||
128 | &mov($b,&wparam(2)); | ||
129 | &push("ebp"); | ||
130 | &push("ebx"); | ||
131 | |||
132 | &xor($c0,$c0); | ||
133 | &mov("eax",&DWP(0,$a,"",0)); # load the first word | ||
134 | &xor($c1,$c1); | ||
135 | &mov("edx",&DWP(0,$b,"",0)); # load the first second | ||
136 | |||
137 | for ($i=0; $i<$tot; $i++) | ||
138 | { | ||
139 | $ai=$as; | ||
140 | $bi=$bs; | ||
141 | $end=$be+1; | ||
142 | |||
143 | &comment("################## Calculate word $i"); | ||
144 | |||
145 | for ($j=$bs; $j<$end; $j++) | ||
146 | { | ||
147 | &xor($c2,$c2) if ($j == $bs); | ||
148 | if (($j+1) == $end) | ||
149 | { | ||
150 | $v=1; | ||
151 | $v=2 if (($i+1) == $tot); | ||
152 | } | ||
153 | else | ||
154 | { $v=0; } | ||
155 | if (($j+1) != $end) | ||
156 | { | ||
157 | $na=($ai-1); | ||
158 | $nb=($bi+1); | ||
159 | } | ||
160 | else | ||
161 | { | ||
162 | $na=$as+($i < ($num-1)); | ||
163 | $nb=$bs+($i >= ($num-1)); | ||
164 | } | ||
165 | #printf STDERR "[$ai,$bi] -> [$na,$nb]\n"; | ||
166 | &mul_add_c($a,$ai,$b,$bi,$c0,$c1,$c2,$v,$i,$na,$nb); | ||
167 | if ($v) | ||
168 | { | ||
169 | &comment("saved r[$i]"); | ||
170 | # &mov("eax",&wparam(0)); | ||
171 | # &mov(&DWP($i*4,"eax","",0),$c0); | ||
172 | ($c0,$c1,$c2)=($c1,$c2,$c0); | ||
173 | } | ||
174 | $ai--; | ||
175 | $bi++; | ||
176 | } | ||
177 | $as++ if ($i < ($num-1)); | ||
178 | $ae++ if ($i >= ($num-1)); | ||
179 | |||
180 | $bs++ if ($i >= ($num-1)); | ||
181 | $be++ if ($i < ($num-1)); | ||
182 | } | ||
183 | &comment("save r[$i]"); | ||
184 | # &mov("eax",&wparam(0)); | ||
185 | &mov(&DWP($i*4,"eax","",0),$c0); | ||
186 | |||
187 | &pop("ebx"); | ||
188 | &pop("ebp"); | ||
189 | &pop("edi"); | ||
190 | &pop("esi"); | ||
191 | &ret(); | ||
192 | &function_end_B($name); | ||
193 | } | ||
194 | |||
195 | sub bn_sqr_comba | ||
196 | { | ||
197 | local($name,$num)=@_; | ||
198 | local($r,$a,$c0,$c1,$c2)=@_; | ||
199 | local($i,$as,$ae,$bs,$be,$ai,$bi); | ||
200 | local($b,$tot,$end,$half); | ||
201 | |||
202 | &function_begin_B($name,""); | ||
203 | |||
204 | $c0="ebx"; | ||
205 | $c1="ecx"; | ||
206 | $c2="ebp"; | ||
207 | $a="esi"; | ||
208 | $r="edi"; | ||
209 | |||
210 | &push("esi"); | ||
211 | &push("edi"); | ||
212 | &push("ebp"); | ||
213 | &push("ebx"); | ||
214 | &mov($r,&wparam(0)); | ||
215 | &mov($a,&wparam(1)); | ||
216 | &xor($c0,$c0); | ||
217 | &xor($c1,$c1); | ||
218 | &mov("eax",&DWP(0,$a,"",0)); # load the first word | ||
219 | |||
220 | $as=0; | ||
221 | $ae=0; | ||
222 | $bs=0; | ||
223 | $be=0; | ||
224 | $tot=$num+$num-1; | ||
225 | |||
226 | for ($i=0; $i<$tot; $i++) | ||
227 | { | ||
228 | $ai=$as; | ||
229 | $bi=$bs; | ||
230 | $end=$be+1; | ||
231 | |||
232 | &comment("############### Calculate word $i"); | ||
233 | for ($j=$bs; $j<$end; $j++) | ||
234 | { | ||
235 | &xor($c2,$c2) if ($j == $bs); | ||
236 | if (($ai-1) < ($bi+1)) | ||
237 | { | ||
238 | $v=1; | ||
239 | $v=2 if ($i+1) == $tot; | ||
240 | } | ||
241 | else | ||
242 | { $v=0; } | ||
243 | if (!$v) | ||
244 | { | ||
245 | $na=$ai-1; | ||
246 | $nb=$bi+1; | ||
247 | } | ||
248 | else | ||
249 | { | ||
250 | $na=$as+($i < ($num-1)); | ||
251 | $nb=$bs+($i >= ($num-1)); | ||
252 | } | ||
253 | if ($ai == $bi) | ||
254 | { | ||
255 | &sqr_add_c($r,$a,$ai,$bi, | ||
256 | $c0,$c1,$c2,$v,$i,$na,$nb); | ||
257 | } | ||
258 | else | ||
259 | { | ||
260 | &sqr_add_c2($r,$a,$ai,$bi, | ||
261 | $c0,$c1,$c2,$v,$i,$na,$nb); | ||
262 | } | ||
263 | if ($v) | ||
264 | { | ||
265 | &comment("saved r[$i]"); | ||
266 | #&mov(&DWP($i*4,$r,"",0),$c0); | ||
267 | ($c0,$c1,$c2)=($c1,$c2,$c0); | ||
268 | last; | ||
269 | } | ||
270 | $ai--; | ||
271 | $bi++; | ||
272 | } | ||
273 | $as++ if ($i < ($num-1)); | ||
274 | $ae++ if ($i >= ($num-1)); | ||
275 | |||
276 | $bs++ if ($i >= ($num-1)); | ||
277 | $be++ if ($i < ($num-1)); | ||
278 | } | ||
279 | &mov(&DWP($i*4,$r,"",0),$c0); | ||
280 | &pop("ebx"); | ||
281 | &pop("ebp"); | ||
282 | &pop("edi"); | ||
283 | &pop("esi"); | ||
284 | &ret(); | ||
285 | &function_end_B($name); | ||
286 | } | ||
diff --git a/src/lib/libcrypto/bn/asm/co-alpha.pl b/src/lib/libcrypto/bn/asm/co-alpha.pl new file mode 100644 index 0000000000..67dad3e3d5 --- /dev/null +++ b/src/lib/libcrypto/bn/asm/co-alpha.pl | |||
@@ -0,0 +1,116 @@ | |||
1 | #!/usr/local/bin/perl | ||
2 | # I have this in perl so I can use more usefull register names and then convert | ||
3 | # them into alpha registers. | ||
4 | # | ||
5 | |||
6 | push(@INC,"perlasm","../../perlasm"); | ||
7 | require "alpha.pl"; | ||
8 | |||
9 | &asm_init($ARGV[0],$0); | ||
10 | |||
11 | print &bn_sub_words("bn_sub_words"); | ||
12 | |||
13 | &asm_finish(); | ||
14 | |||
15 | sub bn_sub_words | ||
16 | { | ||
17 | local($name)=@_; | ||
18 | local($cc,$a,$b,$r); | ||
19 | |||
20 | $cc="r0"; | ||
21 | $a0="r1"; $b0="r5"; $r0="r9"; $tmp="r13"; | ||
22 | $a1="r2"; $b1="r6"; $r1="r10"; $t1="r14"; | ||
23 | $a2="r3"; $b2="r7"; $r2="r11"; | ||
24 | $a3="r4"; $b3="r8"; $r3="r12"; $t3="r15"; | ||
25 | |||
26 | $rp=&wparam(0); | ||
27 | $ap=&wparam(1); | ||
28 | $bp=&wparam(2); | ||
29 | $count=&wparam(3); | ||
30 | |||
31 | &function_begin($name,""); | ||
32 | |||
33 | &comment(""); | ||
34 | &sub($count,4,$count); | ||
35 | &mov("zero",$cc); | ||
36 | &blt($count,&label("finish")); | ||
37 | |||
38 | &ld($a0,&QWPw(0,$ap)); | ||
39 | &ld($b0,&QWPw(0,$bp)); | ||
40 | |||
41 | ########################################################## | ||
42 | &set_label("loop"); | ||
43 | |||
44 | &ld($a1,&QWPw(1,$ap)); | ||
45 | &cmpult($a0,$b0,$tmp); # will we borrow? | ||
46 | &ld($b1,&QWPw(1,$bp)); | ||
47 | &sub($a0,$b0,$a0); # do the subtract | ||
48 | &ld($a2,&QWPw(2,$ap)); | ||
49 | &cmpult($a0,$cc,$b0); # will we borrow? | ||
50 | &ld($b2,&QWPw(2,$bp)); | ||
51 | &sub($a0,$cc,$a0); # will we borrow? | ||
52 | &ld($a3,&QWPw(3,$ap)); | ||
53 | &add($b0,$tmp,$cc); # add the borrows | ||
54 | |||
55 | &cmpult($a1,$b1,$t1); # will we borrow? | ||
56 | &sub($a1,$b1,$a1); # do the subtract | ||
57 | &ld($b3,&QWPw(3,$bp)); | ||
58 | &cmpult($a1,$cc,$b1); # will we borrow? | ||
59 | &sub($a1,$cc,$a1); # will we borrow? | ||
60 | &add($b1,$t1,$cc); # add the borrows | ||
61 | |||
62 | &cmpult($a2,$b2,$tmp); # will we borrow? | ||
63 | &sub($a2,$b2,$a2); # do the subtract | ||
64 | &st($a0,&QWPw(0,$rp)); # save | ||
65 | &cmpult($a2,$cc,$b2); # will we borrow? | ||
66 | &sub($a2,$cc,$a2); # will we borrow? | ||
67 | &add($b2,$tmp,$cc); # add the borrows | ||
68 | |||
69 | &cmpult($a3,$b3,$t3); # will we borrow? | ||
70 | &sub($a3,$b3,$a3); # do the subtract | ||
71 | &st($a1,&QWPw(1,$rp)); # save | ||
72 | &cmpult($a3,$cc,$b3); # will we borrow? | ||
73 | &sub($a3,$cc,$a3); # will we borrow? | ||
74 | &add($b3,$t3,$cc); # add the borrows | ||
75 | |||
76 | &st($a2,&QWPw(2,$rp)); # save | ||
77 | &sub($count,4,$count); # count-=4 | ||
78 | &st($a3,&QWPw(3,$rp)); # save | ||
79 | &add($ap,4*$QWS,$ap); # count+=4 | ||
80 | &add($bp,4*$QWS,$bp); # count+=4 | ||
81 | &add($rp,4*$QWS,$rp); # count+=4 | ||
82 | |||
83 | &blt($count,&label("finish")); | ||
84 | &ld($a0,&QWPw(0,$ap)); | ||
85 | &ld($b0,&QWPw(0,$bp)); | ||
86 | &br(&label("loop")); | ||
87 | ################################################## | ||
88 | # Do the last 0..3 words | ||
89 | |||
90 | &set_label("last_loop"); | ||
91 | |||
92 | &ld($a0,&QWPw(0,$ap)); # get a | ||
93 | &ld($b0,&QWPw(0,$bp)); # get b | ||
94 | &cmpult($a0,$b0,$tmp); # will we borrow? | ||
95 | &sub($a0,$b0,$a0); # do the subtract | ||
96 | &cmpult($a0,$cc,$b0); # will we borrow? | ||
97 | &sub($a0,$cc,$a0); # will we borrow? | ||
98 | &st($a0,&QWPw(0,$rp)); # save | ||
99 | &add($b0,$tmp,$cc); # add the borrows | ||
100 | |||
101 | &add($ap,$QWS,$ap); | ||
102 | &add($bp,$QWS,$bp); | ||
103 | &add($rp,$QWS,$rp); | ||
104 | &sub($count,1,$count); | ||
105 | &bgt($count,&label("last_loop")); | ||
106 | &function_end_A($name); | ||
107 | |||
108 | ###################################################### | ||
109 | &set_label("finish"); | ||
110 | &add($count,4,$count); | ||
111 | &bgt($count,&label("last_loop")); | ||
112 | |||
113 | &set_label("end"); | ||
114 | &function_end($name); | ||
115 | } | ||
116 | |||
diff --git a/src/lib/libcrypto/bn/asm/mips1.s b/src/lib/libcrypto/bn/asm/mips1.s new file mode 100644 index 0000000000..44fa1254c7 --- /dev/null +++ b/src/lib/libcrypto/bn/asm/mips1.s | |||
@@ -0,0 +1,539 @@ | |||
1 | /* This assember is for R2000/R3000 machines, or higher ones that do | ||
2 | * no want to do any 64 bit arithmatic. | ||
3 | * Make sure that the SSLeay bignum library is compiled with | ||
4 | * THIRTY_TWO_BIT set. | ||
5 | * This must either be compiled with the system CC, or, if you use GNU gas, | ||
6 | * cc -E mips1.s|gas -o mips1.o | ||
7 | */ | ||
8 | .set reorder | ||
9 | .set noat | ||
10 | |||
11 | #define R1 $1 | ||
12 | #define CC $2 | ||
13 | #define R2 $3 | ||
14 | #define R3 $8 | ||
15 | #define R4 $9 | ||
16 | #define L1 $10 | ||
17 | #define L2 $11 | ||
18 | #define L3 $12 | ||
19 | #define L4 $13 | ||
20 | #define H1 $14 | ||
21 | #define H2 $15 | ||
22 | #define H3 $24 | ||
23 | #define H4 $25 | ||
24 | |||
25 | #define P1 $4 | ||
26 | #define P2 $5 | ||
27 | #define P3 $6 | ||
28 | #define P4 $7 | ||
29 | |||
30 | .align 2 | ||
31 | .ent bn_mul_add_words | ||
32 | .globl bn_mul_add_words | ||
33 | .text | ||
34 | bn_mul_add_words: | ||
35 | .frame $sp,0,$31 | ||
36 | .mask 0x00000000,0 | ||
37 | .fmask 0x00000000,0 | ||
38 | |||
39 | #blt P3,4,$lab34 | ||
40 | |||
41 | subu R1,P3,4 | ||
42 | move CC,$0 | ||
43 | bltz R1,$lab34 | ||
44 | $lab2: | ||
45 | lw R1,0(P1) | ||
46 | lw L1,0(P2) | ||
47 | lw R2,4(P1) | ||
48 | lw L2,4(P2) | ||
49 | lw R3,8(P1) | ||
50 | lw L3,8(P2) | ||
51 | lw R4,12(P1) | ||
52 | lw L4,12(P2) | ||
53 | multu L1,P4 | ||
54 | addu R1,R1,CC | ||
55 | mflo L1 | ||
56 | sltu CC,R1,CC | ||
57 | addu R1,R1,L1 | ||
58 | mfhi H1 | ||
59 | sltu L1,R1,L1 | ||
60 | sw R1,0(P1) | ||
61 | addu CC,CC,L1 | ||
62 | multu L2,P4 | ||
63 | addu CC,H1,CC | ||
64 | mflo L2 | ||
65 | addu R2,R2,CC | ||
66 | sltu CC,R2,CC | ||
67 | mfhi H2 | ||
68 | addu R2,R2,L2 | ||
69 | addu P2,P2,16 | ||
70 | sltu L2,R2,L2 | ||
71 | sw R2,4(P1) | ||
72 | addu CC,CC,L2 | ||
73 | multu L3,P4 | ||
74 | addu CC,H2,CC | ||
75 | mflo L3 | ||
76 | addu R3,R3,CC | ||
77 | sltu CC,R3,CC | ||
78 | mfhi H3 | ||
79 | addu R3,R3,L3 | ||
80 | addu P1,P1,16 | ||
81 | sltu L3,R3,L3 | ||
82 | sw R3,-8(P1) | ||
83 | addu CC,CC,L3 | ||
84 | multu L4,P4 | ||
85 | addu CC,H3,CC | ||
86 | mflo L4 | ||
87 | addu R4,R4,CC | ||
88 | sltu CC,R4,CC | ||
89 | mfhi H4 | ||
90 | addu R4,R4,L4 | ||
91 | subu P3,P3,4 | ||
92 | sltu L4,R4,L4 | ||
93 | addu CC,CC,L4 | ||
94 | addu CC,H4,CC | ||
95 | |||
96 | subu R1,P3,4 | ||
97 | sw R4,-4(P1) # delay slot | ||
98 | bgez R1,$lab2 | ||
99 | |||
100 | bleu P3,0,$lab3 | ||
101 | .align 2 | ||
102 | $lab33: | ||
103 | lw L1,0(P2) | ||
104 | lw R1,0(P1) | ||
105 | multu L1,P4 | ||
106 | addu R1,R1,CC | ||
107 | sltu CC,R1,CC | ||
108 | addu P1,P1,4 | ||
109 | mflo L1 | ||
110 | mfhi H1 | ||
111 | addu R1,R1,L1 | ||
112 | addu P2,P2,4 | ||
113 | sltu L1,R1,L1 | ||
114 | subu P3,P3,1 | ||
115 | addu CC,CC,L1 | ||
116 | sw R1,-4(P1) | ||
117 | addu CC,H1,CC | ||
118 | bgtz P3,$lab33 | ||
119 | j $31 | ||
120 | .align 2 | ||
121 | $lab3: | ||
122 | j $31 | ||
123 | .align 2 | ||
124 | $lab34: | ||
125 | bgt P3,0,$lab33 | ||
126 | j $31 | ||
127 | .end bn_mul_add_words | ||
128 | |||
129 | .align 2 | ||
130 | # Program Unit: bn_mul_words | ||
131 | .ent bn_mul_words | ||
132 | .globl bn_mul_words | ||
133 | .text | ||
134 | bn_mul_words: | ||
135 | .frame $sp,0,$31 | ||
136 | .mask 0x00000000,0 | ||
137 | .fmask 0x00000000,0 | ||
138 | |||
139 | subu P3,P3,4 | ||
140 | move CC,$0 | ||
141 | bltz P3,$lab45 | ||
142 | $lab44: | ||
143 | lw L1,0(P2) | ||
144 | lw L2,4(P2) | ||
145 | lw L3,8(P2) | ||
146 | lw L4,12(P2) | ||
147 | multu L1,P4 | ||
148 | subu P3,P3,4 | ||
149 | mflo L1 | ||
150 | mfhi H1 | ||
151 | addu L1,L1,CC | ||
152 | multu L2,P4 | ||
153 | sltu CC,L1,CC | ||
154 | sw L1,0(P1) | ||
155 | addu CC,H1,CC | ||
156 | mflo L2 | ||
157 | mfhi H2 | ||
158 | addu L2,L2,CC | ||
159 | multu L3,P4 | ||
160 | sltu CC,L2,CC | ||
161 | sw L2,4(P1) | ||
162 | addu CC,H2,CC | ||
163 | mflo L3 | ||
164 | mfhi H3 | ||
165 | addu L3,L3,CC | ||
166 | multu L4,P4 | ||
167 | sltu CC,L3,CC | ||
168 | sw L3,8(P1) | ||
169 | addu CC,H3,CC | ||
170 | mflo L4 | ||
171 | mfhi H4 | ||
172 | addu L4,L4,CC | ||
173 | addu P1,P1,16 | ||
174 | sltu CC,L4,CC | ||
175 | addu P2,P2,16 | ||
176 | addu CC,H4,CC | ||
177 | sw L4,-4(P1) | ||
178 | |||
179 | bgez P3,$lab44 | ||
180 | b $lab45 | ||
181 | $lab46: | ||
182 | lw L1,0(P2) | ||
183 | addu P1,P1,4 | ||
184 | multu L1,P4 | ||
185 | addu P2,P2,4 | ||
186 | mflo L1 | ||
187 | mfhi H1 | ||
188 | addu L1,L1,CC | ||
189 | subu P3,P3,1 | ||
190 | sltu CC,L1,CC | ||
191 | sw L1,-4(P1) | ||
192 | addu CC,H1,CC | ||
193 | bgtz P3,$lab46 | ||
194 | j $31 | ||
195 | $lab45: | ||
196 | addu P3,P3,4 | ||
197 | bgtz P3,$lab46 | ||
198 | j $31 | ||
199 | .align 2 | ||
200 | .end bn_mul_words | ||
201 | |||
202 | # Program Unit: bn_sqr_words | ||
203 | .ent bn_sqr_words | ||
204 | .globl bn_sqr_words | ||
205 | .text | ||
206 | bn_sqr_words: | ||
207 | .frame $sp,0,$31 | ||
208 | .mask 0x00000000,0 | ||
209 | .fmask 0x00000000,0 | ||
210 | |||
211 | subu P3,P3,4 | ||
212 | bltz P3,$lab55 | ||
213 | $lab54: | ||
214 | lw L1,0(P2) | ||
215 | lw L2,4(P2) | ||
216 | lw L3,8(P2) | ||
217 | lw L4,12(P2) | ||
218 | |||
219 | multu L1,L1 | ||
220 | subu P3,P3,4 | ||
221 | mflo L1 | ||
222 | mfhi H1 | ||
223 | sw L1,0(P1) | ||
224 | sw H1,4(P1) | ||
225 | |||
226 | multu L2,L2 | ||
227 | addu P1,P1,32 | ||
228 | mflo L2 | ||
229 | mfhi H2 | ||
230 | sw L2,-24(P1) | ||
231 | sw H2,-20(P1) | ||
232 | |||
233 | multu L3,L3 | ||
234 | addu P2,P2,16 | ||
235 | mflo L3 | ||
236 | mfhi H3 | ||
237 | sw L3,-16(P1) | ||
238 | sw H3,-12(P1) | ||
239 | |||
240 | multu L4,L4 | ||
241 | |||
242 | mflo L4 | ||
243 | mfhi H4 | ||
244 | sw L4,-8(P1) | ||
245 | sw H4,-4(P1) | ||
246 | |||
247 | bgtz P3,$lab54 | ||
248 | b $lab55 | ||
249 | $lab56: | ||
250 | lw L1,0(P2) | ||
251 | addu P1,P1,8 | ||
252 | multu L1,L1 | ||
253 | addu P2,P2,4 | ||
254 | subu P3,P3,1 | ||
255 | mflo L1 | ||
256 | mfhi H1 | ||
257 | sw L1,-8(P1) | ||
258 | sw H1,-4(P1) | ||
259 | |||
260 | bgtz P3,$lab56 | ||
261 | j $31 | ||
262 | $lab55: | ||
263 | addu P3,P3,4 | ||
264 | bgtz P3,$lab56 | ||
265 | j $31 | ||
266 | .align 2 | ||
267 | .end bn_sqr_words | ||
268 | |||
269 | # Program Unit: bn_add_words | ||
270 | .ent bn_add_words | ||
271 | .globl bn_add_words | ||
272 | .text | ||
273 | bn_add_words: # 0x590 | ||
274 | .frame $sp,0,$31 | ||
275 | .mask 0x00000000,0 | ||
276 | .fmask 0x00000000,0 | ||
277 | |||
278 | subu P4,P4,4 | ||
279 | move CC,$0 | ||
280 | bltz P4,$lab65 | ||
281 | $lab64: | ||
282 | lw L1,0(P2) | ||
283 | lw R1,0(P3) | ||
284 | lw L2,4(P2) | ||
285 | lw R2,4(P3) | ||
286 | |||
287 | addu L1,L1,CC | ||
288 | lw L3,8(P2) | ||
289 | sltu CC,L1,CC | ||
290 | addu L1,L1,R1 | ||
291 | sltu R1,L1,R1 | ||
292 | lw R3,8(P3) | ||
293 | addu CC,CC,R1 | ||
294 | lw L4,12(P2) | ||
295 | |||
296 | addu L2,L2,CC | ||
297 | lw R4,12(P3) | ||
298 | sltu CC,L2,CC | ||
299 | addu L2,L2,R2 | ||
300 | sltu R2,L2,R2 | ||
301 | sw L1,0(P1) | ||
302 | addu CC,CC,R2 | ||
303 | addu P1,P1,16 | ||
304 | addu L3,L3,CC | ||
305 | sw L2,-12(P1) | ||
306 | |||
307 | sltu CC,L3,CC | ||
308 | addu L3,L3,R3 | ||
309 | sltu R3,L3,R3 | ||
310 | addu P2,P2,16 | ||
311 | addu CC,CC,R3 | ||
312 | |||
313 | addu L4,L4,CC | ||
314 | addu P3,P3,16 | ||
315 | sltu CC,L4,CC | ||
316 | addu L4,L4,R4 | ||
317 | subu P4,P4,4 | ||
318 | sltu R4,L4,R4 | ||
319 | sw L3,-8(P1) | ||
320 | addu CC,CC,R4 | ||
321 | sw L4,-4(P1) | ||
322 | |||
323 | bgtz P4,$lab64 | ||
324 | b $lab65 | ||
325 | $lab66: | ||
326 | lw L1,0(P2) | ||
327 | lw R1,0(P3) | ||
328 | addu L1,L1,CC | ||
329 | addu P1,P1,4 | ||
330 | sltu CC,L1,CC | ||
331 | addu P2,P2,4 | ||
332 | addu P3,P3,4 | ||
333 | addu L1,L1,R1 | ||
334 | subu P4,P4,1 | ||
335 | sltu R1,L1,R1 | ||
336 | sw L1,-4(P1) | ||
337 | addu CC,CC,R1 | ||
338 | |||
339 | bgtz P4,$lab66 | ||
340 | j $31 | ||
341 | $lab65: | ||
342 | addu P4,P4,4 | ||
343 | bgtz P4,$lab66 | ||
344 | j $31 | ||
345 | .end bn_add_words | ||
346 | |||
347 | # Program Unit: bn_div64 | ||
348 | .set at | ||
349 | .set reorder | ||
350 | .text | ||
351 | .align 2 | ||
352 | .globl bn_div64 | ||
353 | # 321 { | ||
354 | .ent bn_div64 2 | ||
355 | bn_div64: | ||
356 | subu $sp, 64 | ||
357 | sw $31, 56($sp) | ||
358 | sw $16, 48($sp) | ||
359 | .mask 0x80010000, -56 | ||
360 | .frame $sp, 64, $31 | ||
361 | move $9, $4 | ||
362 | move $12, $5 | ||
363 | move $16, $6 | ||
364 | # 322 BN_ULONG dh,dl,q,ret=0,th,tl,t; | ||
365 | move $31, $0 | ||
366 | # 323 int i,count=2; | ||
367 | li $13, 2 | ||
368 | # 324 | ||
369 | # 325 if (d == 0) return(BN_MASK2); | ||
370 | bne $16, 0, $80 | ||
371 | li $2, -1 | ||
372 | b $93 | ||
373 | $80: | ||
374 | # 326 | ||
375 | # 327 i=BN_num_bits_word(d); | ||
376 | move $4, $16 | ||
377 | sw $31, 16($sp) | ||
378 | sw $9, 24($sp) | ||
379 | sw $12, 32($sp) | ||
380 | sw $13, 40($sp) | ||
381 | .livereg 0x800ff0e,0xfff | ||
382 | jal BN_num_bits_word | ||
383 | li $4, 32 | ||
384 | lw $31, 16($sp) | ||
385 | lw $9, 24($sp) | ||
386 | lw $12, 32($sp) | ||
387 | lw $13, 40($sp) | ||
388 | move $3, $2 | ||
389 | # 328 if ((i != BN_BITS2) && (h > (BN_ULONG)1<<i)) | ||
390 | beq $2, $4, $81 | ||
391 | li $14, 1 | ||
392 | sll $15, $14, $2 | ||
393 | bleu $9, $15, $81 | ||
394 | # 329 { | ||
395 | # 330 #if !defined(NO_STDIO) && !defined(WIN16) | ||
396 | # 331 fprintf(stderr,"Division would overflow (%d)\n",i); | ||
397 | # 332 #endif | ||
398 | # 333 abort(); | ||
399 | sw $3, 8($sp) | ||
400 | sw $9, 24($sp) | ||
401 | sw $12, 32($sp) | ||
402 | sw $13, 40($sp) | ||
403 | sw $31, 26($sp) | ||
404 | .livereg 0xff0e,0xfff | ||
405 | jal abort | ||
406 | lw $3, 8($sp) | ||
407 | li $4, 32 | ||
408 | lw $9, 24($sp) | ||
409 | lw $12, 32($sp) | ||
410 | lw $13, 40($sp) | ||
411 | lw $31, 26($sp) | ||
412 | # 334 } | ||
413 | $81: | ||
414 | # 335 i=BN_BITS2-i; | ||
415 | subu $3, $4, $3 | ||
416 | # 336 if (h >= d) h-=d; | ||
417 | bltu $9, $16, $82 | ||
418 | subu $9, $9, $16 | ||
419 | $82: | ||
420 | # 337 | ||
421 | # 338 if (i) | ||
422 | beq $3, 0, $83 | ||
423 | # 339 { | ||
424 | # 340 d<<=i; | ||
425 | sll $16, $16, $3 | ||
426 | # 341 h=(h<<i)|(l>>(BN_BITS2-i)); | ||
427 | sll $24, $9, $3 | ||
428 | subu $25, $4, $3 | ||
429 | srl $14, $12, $25 | ||
430 | or $9, $24, $14 | ||
431 | # 342 l<<=i; | ||
432 | sll $12, $12, $3 | ||
433 | # 343 } | ||
434 | $83: | ||
435 | # 344 dh=(d&BN_MASK2h)>>BN_BITS4; | ||
436 | # 345 dl=(d&BN_MASK2l); | ||
437 | and $8, $16, -65536 | ||
438 | srl $8, $8, 16 | ||
439 | and $10, $16, 65535 | ||
440 | li $6, -65536 | ||
441 | $84: | ||
442 | # 346 for (;;) | ||
443 | # 347 { | ||
444 | # 348 if ((h>>BN_BITS4) == dh) | ||
445 | srl $15, $9, 16 | ||
446 | bne $8, $15, $85 | ||
447 | # 349 q=BN_MASK2l; | ||
448 | li $5, 65535 | ||
449 | b $86 | ||
450 | $85: | ||
451 | # 350 else | ||
452 | # 351 q=h/dh; | ||
453 | divu $5, $9, $8 | ||
454 | $86: | ||
455 | # 352 | ||
456 | # 353 for (;;) | ||
457 | # 354 { | ||
458 | # 355 t=(h-q*dh); | ||
459 | mul $4, $5, $8 | ||
460 | subu $2, $9, $4 | ||
461 | move $3, $2 | ||
462 | # 356 if ((t&BN_MASK2h) || | ||
463 | # 357 ((dl*q) <= ( | ||
464 | # 358 (t<<BN_BITS4)+ | ||
465 | # 359 ((l&BN_MASK2h)>>BN_BITS4)))) | ||
466 | and $25, $2, $6 | ||
467 | bne $25, $0, $87 | ||
468 | mul $24, $10, $5 | ||
469 | sll $14, $3, 16 | ||
470 | and $15, $12, $6 | ||
471 | srl $25, $15, 16 | ||
472 | addu $15, $14, $25 | ||
473 | bgtu $24, $15, $88 | ||
474 | $87: | ||
475 | # 360 break; | ||
476 | mul $3, $10, $5 | ||
477 | b $89 | ||
478 | $88: | ||
479 | # 361 q--; | ||
480 | addu $5, $5, -1 | ||
481 | # 362 } | ||
482 | b $86 | ||
483 | $89: | ||
484 | # 363 th=q*dh; | ||
485 | # 364 tl=q*dl; | ||
486 | # 365 t=(tl>>BN_BITS4); | ||
487 | # 366 tl=(tl<<BN_BITS4)&BN_MASK2h; | ||
488 | sll $14, $3, 16 | ||
489 | and $2, $14, $6 | ||
490 | move $11, $2 | ||
491 | # 367 th+=t; | ||
492 | srl $25, $3, 16 | ||
493 | addu $7, $4, $25 | ||
494 | # 368 | ||
495 | # 369 if (l < tl) th++; | ||
496 | bgeu $12, $2, $90 | ||
497 | addu $7, $7, 1 | ||
498 | $90: | ||
499 | # 370 l-=tl; | ||
500 | subu $12, $12, $11 | ||
501 | # 371 if (h < th) | ||
502 | bgeu $9, $7, $91 | ||
503 | # 372 { | ||
504 | # 373 h+=d; | ||
505 | addu $9, $9, $16 | ||
506 | # 374 q--; | ||
507 | addu $5, $5, -1 | ||
508 | # 375 } | ||
509 | $91: | ||
510 | # 376 h-=th; | ||
511 | subu $9, $9, $7 | ||
512 | # 377 | ||
513 | # 378 if (--count == 0) break; | ||
514 | addu $13, $13, -1 | ||
515 | beq $13, 0, $92 | ||
516 | # 379 | ||
517 | # 380 ret=q<<BN_BITS4; | ||
518 | sll $31, $5, 16 | ||
519 | # 381 h=((h<<BN_BITS4)|(l>>BN_BITS4))&BN_MASK2; | ||
520 | sll $24, $9, 16 | ||
521 | srl $15, $12, 16 | ||
522 | or $9, $24, $15 | ||
523 | # 382 l=(l&BN_MASK2l)<<BN_BITS4; | ||
524 | and $12, $12, 65535 | ||
525 | sll $12, $12, 16 | ||
526 | # 383 } | ||
527 | b $84 | ||
528 | $92: | ||
529 | # 384 ret|=q; | ||
530 | or $31, $31, $5 | ||
531 | # 385 return(ret); | ||
532 | move $2, $31 | ||
533 | $93: | ||
534 | lw $16, 48($sp) | ||
535 | lw $31, 56($sp) | ||
536 | addu $sp, 64 | ||
537 | j $31 | ||
538 | .end bn_div64 | ||
539 | |||
diff --git a/src/lib/libcrypto/bn/asm/mips3.s b/src/lib/libcrypto/bn/asm/mips3.s new file mode 100644 index 0000000000..191345d920 --- /dev/null +++ b/src/lib/libcrypto/bn/asm/mips3.s | |||
@@ -0,0 +1,2138 @@ | |||
1 | .rdata | ||
2 | .asciiz "mips3.s, Version 1.0" | ||
3 | .asciiz "MIPS III/IV ISA artwork by Andy Polyakov <appro@fy.chalmers.se>" | ||
4 | |||
5 | /* | ||
6 | * ==================================================================== | ||
7 | * Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL | ||
8 | * project. | ||
9 | * | ||
10 | * Rights for redistribution and usage in source and binary forms are | ||
11 | * granted according to the OpenSSL license. Warranty of any kind is | ||
12 | * disclaimed. | ||
13 | * ==================================================================== | ||
14 | */ | ||
15 | |||
16 | /* | ||
17 | * This is my modest contributon to the OpenSSL project (see | ||
18 | * http://www.openssl.org/ for more information about it) and is | ||
19 | * a drop-in MIPS III/IV ISA replacement for crypto/bn/bn_asm.c | ||
20 | * module. For updates see http://fy.chalmers.se/~appro/hpe/. | ||
21 | * | ||
22 | * The module is designed to work with either of the "new" MIPS ABI(5), | ||
23 | * namely N32 or N64, offered by IRIX 6.x. It's not ment to work under | ||
24 | * IRIX 5.x not only because it doesn't support new ABIs but also | ||
25 | * because 5.x kernels put R4x00 CPU into 32-bit mode and all those | ||
26 | * 64-bit instructions (daddu, dmultu, etc.) found below gonna only | ||
27 | * cause illegal instruction exception:-( | ||
28 | * | ||
29 | * In addition the code depends on preprocessor flags set up by MIPSpro | ||
30 | * compiler driver (either as or cc) and therefore (probably?) can't be | ||
31 | * compiled by the GNU assembler. GNU C driver manages fine though... | ||
32 | * I mean as long as -mmips-as is specified or is the default option, | ||
33 | * because then it simply invokes /usr/bin/as which in turn takes | ||
34 | * perfect care of the preprocessor definitions. Another neat feature | ||
35 | * offered by the MIPSpro assembler is an optimization pass. This gave | ||
36 | * me the opportunity to have the code looking more regular as all those | ||
37 | * architecture dependent instruction rescheduling details were left to | ||
38 | * the assembler. Cool, huh? | ||
39 | * | ||
40 | * Performance improvement is astonishing! 'apps/openssl speed rsa dsa' | ||
41 | * goes way over 3 times faster! | ||
42 | * | ||
43 | * <appro@fy.chalmers.se> | ||
44 | */ | ||
45 | #include <asm.h> | ||
46 | #include <regdef.h> | ||
47 | |||
48 | #if _MIPS_ISA>=4 | ||
49 | #define MOVNZ(cond,dst,src) \ | ||
50 | movn dst,src,cond | ||
51 | #else | ||
52 | #define MOVNZ(cond,dst,src) \ | ||
53 | .set noreorder; \ | ||
54 | bnezl cond,.+8; \ | ||
55 | move dst,src; \ | ||
56 | .set reorder | ||
57 | #endif | ||
58 | |||
59 | .text | ||
60 | |||
61 | .set noat | ||
62 | .set reorder | ||
63 | |||
64 | #define MINUS4 v1 | ||
65 | |||
66 | .align 5 | ||
67 | LEAF(bn_mul_add_words) | ||
68 | .set noreorder | ||
69 | bgtzl a2,.L_bn_mul_add_words_proceed | ||
70 | ld t0,0(a1) | ||
71 | jr ra | ||
72 | move v0,zero | ||
73 | .set reorder | ||
74 | |||
75 | .L_bn_mul_add_words_proceed: | ||
76 | li MINUS4,-4 | ||
77 | and ta0,a2,MINUS4 | ||
78 | move v0,zero | ||
79 | beqz ta0,.L_bn_mul_add_words_tail | ||
80 | |||
81 | .L_bn_mul_add_words_loop: | ||
82 | dmultu t0,a3 | ||
83 | ld t1,0(a0) | ||
84 | ld t2,8(a1) | ||
85 | ld t3,8(a0) | ||
86 | ld ta0,16(a1) | ||
87 | ld ta1,16(a0) | ||
88 | daddu t1,v0 | ||
89 | sltu v0,t1,v0 /* All manuals say it "compares 32-bit | ||
90 | * values", but it seems to work fine | ||
91 | * even on 64-bit registers. */ | ||
92 | mflo AT | ||
93 | mfhi t0 | ||
94 | daddu t1,AT | ||
95 | daddu v0,t0 | ||
96 | sltu AT,t1,AT | ||
97 | sd t1,0(a0) | ||
98 | daddu v0,AT | ||
99 | |||
100 | dmultu t2,a3 | ||
101 | ld ta2,24(a1) | ||
102 | ld ta3,24(a0) | ||
103 | daddu t3,v0 | ||
104 | sltu v0,t3,v0 | ||
105 | mflo AT | ||
106 | mfhi t2 | ||
107 | daddu t3,AT | ||
108 | daddu v0,t2 | ||
109 | sltu AT,t3,AT | ||
110 | sd t3,8(a0) | ||
111 | daddu v0,AT | ||
112 | |||
113 | dmultu ta0,a3 | ||
114 | subu a2,4 | ||
115 | PTR_ADD a0,32 | ||
116 | PTR_ADD a1,32 | ||
117 | daddu ta1,v0 | ||
118 | sltu v0,ta1,v0 | ||
119 | mflo AT | ||
120 | mfhi ta0 | ||
121 | daddu ta1,AT | ||
122 | daddu v0,ta0 | ||
123 | sltu AT,ta1,AT | ||
124 | sd ta1,-16(a0) | ||
125 | daddu v0,AT | ||
126 | |||
127 | |||
128 | dmultu ta2,a3 | ||
129 | and ta0,a2,MINUS4 | ||
130 | daddu ta3,v0 | ||
131 | sltu v0,ta3,v0 | ||
132 | mflo AT | ||
133 | mfhi ta2 | ||
134 | daddu ta3,AT | ||
135 | daddu v0,ta2 | ||
136 | sltu AT,ta3,AT | ||
137 | sd ta3,-8(a0) | ||
138 | daddu v0,AT | ||
139 | .set noreorder | ||
140 | bgtzl ta0,.L_bn_mul_add_words_loop | ||
141 | ld t0,0(a1) | ||
142 | |||
143 | bnezl a2,.L_bn_mul_add_words_tail | ||
144 | ld t0,0(a1) | ||
145 | .set reorder | ||
146 | |||
147 | .L_bn_mul_add_words_return: | ||
148 | jr ra | ||
149 | |||
150 | .L_bn_mul_add_words_tail: | ||
151 | dmultu t0,a3 | ||
152 | ld t1,0(a0) | ||
153 | subu a2,1 | ||
154 | daddu t1,v0 | ||
155 | sltu v0,t1,v0 | ||
156 | mflo AT | ||
157 | mfhi t0 | ||
158 | daddu t1,AT | ||
159 | daddu v0,t0 | ||
160 | sltu AT,t1,AT | ||
161 | sd t1,0(a0) | ||
162 | daddu v0,AT | ||
163 | beqz a2,.L_bn_mul_add_words_return | ||
164 | |||
165 | ld t0,8(a1) | ||
166 | dmultu t0,a3 | ||
167 | ld t1,8(a0) | ||
168 | subu a2,1 | ||
169 | daddu t1,v0 | ||
170 | sltu v0,t1,v0 | ||
171 | mflo AT | ||
172 | mfhi t0 | ||
173 | daddu t1,AT | ||
174 | daddu v0,t0 | ||
175 | sltu AT,t1,AT | ||
176 | sd t1,8(a0) | ||
177 | daddu v0,AT | ||
178 | beqz a2,.L_bn_mul_add_words_return | ||
179 | |||
180 | ld t0,16(a1) | ||
181 | dmultu t0,a3 | ||
182 | ld t1,16(a0) | ||
183 | daddu t1,v0 | ||
184 | sltu v0,t1,v0 | ||
185 | mflo AT | ||
186 | mfhi t0 | ||
187 | daddu t1,AT | ||
188 | daddu v0,t0 | ||
189 | sltu AT,t1,AT | ||
190 | sd t1,16(a0) | ||
191 | daddu v0,AT | ||
192 | jr ra | ||
193 | END(bn_mul_add_words) | ||
194 | |||
195 | .align 5 | ||
196 | LEAF(bn_mul_words) | ||
197 | .set noreorder | ||
198 | bgtzl a2,.L_bn_mul_words_proceed | ||
199 | ld t0,0(a1) | ||
200 | jr ra | ||
201 | move v0,zero | ||
202 | .set reorder | ||
203 | |||
204 | .L_bn_mul_words_proceed: | ||
205 | li MINUS4,-4 | ||
206 | and ta0,a2,MINUS4 | ||
207 | move v0,zero | ||
208 | beqz ta0,.L_bn_mul_words_tail | ||
209 | |||
210 | .L_bn_mul_words_loop: | ||
211 | dmultu t0,a3 | ||
212 | ld t2,8(a1) | ||
213 | ld ta0,16(a1) | ||
214 | ld ta2,24(a1) | ||
215 | mflo AT | ||
216 | mfhi t0 | ||
217 | daddu v0,AT | ||
218 | sltu t1,v0,AT | ||
219 | sd v0,0(a0) | ||
220 | daddu v0,t1,t0 | ||
221 | |||
222 | dmultu t2,a3 | ||
223 | subu a2,4 | ||
224 | PTR_ADD a0,32 | ||
225 | PTR_ADD a1,32 | ||
226 | mflo AT | ||
227 | mfhi t2 | ||
228 | daddu v0,AT | ||
229 | sltu t3,v0,AT | ||
230 | sd v0,-24(a0) | ||
231 | daddu v0,t3,t2 | ||
232 | |||
233 | dmultu ta0,a3 | ||
234 | mflo AT | ||
235 | mfhi ta0 | ||
236 | daddu v0,AT | ||
237 | sltu ta1,v0,AT | ||
238 | sd v0,-16(a0) | ||
239 | daddu v0,ta1,ta0 | ||
240 | |||
241 | |||
242 | dmultu ta2,a3 | ||
243 | and ta0,a2,MINUS4 | ||
244 | mflo AT | ||
245 | mfhi ta2 | ||
246 | daddu v0,AT | ||
247 | sltu ta3,v0,AT | ||
248 | sd v0,-8(a0) | ||
249 | daddu v0,ta3,ta2 | ||
250 | .set noreorder | ||
251 | bgtzl ta0,.L_bn_mul_words_loop | ||
252 | ld t0,0(a1) | ||
253 | |||
254 | bnezl a2,.L_bn_mul_words_tail | ||
255 | ld t0,0(a1) | ||
256 | .set reorder | ||
257 | |||
258 | .L_bn_mul_words_return: | ||
259 | jr ra | ||
260 | |||
261 | .L_bn_mul_words_tail: | ||
262 | dmultu t0,a3 | ||
263 | subu a2,1 | ||
264 | mflo AT | ||
265 | mfhi t0 | ||
266 | daddu v0,AT | ||
267 | sltu t1,v0,AT | ||
268 | sd v0,0(a0) | ||
269 | daddu v0,t1,t0 | ||
270 | beqz a2,.L_bn_mul_words_return | ||
271 | |||
272 | ld t0,8(a1) | ||
273 | dmultu t0,a3 | ||
274 | subu a2,1 | ||
275 | mflo AT | ||
276 | mfhi t0 | ||
277 | daddu v0,AT | ||
278 | sltu t1,v0,AT | ||
279 | sd v0,8(a0) | ||
280 | daddu v0,t1,t0 | ||
281 | beqz a2,.L_bn_mul_words_return | ||
282 | |||
283 | ld t0,16(a1) | ||
284 | dmultu t0,a3 | ||
285 | mflo AT | ||
286 | mfhi t0 | ||
287 | daddu v0,AT | ||
288 | sltu t1,v0,AT | ||
289 | sd v0,16(a0) | ||
290 | daddu v0,t1,t0 | ||
291 | jr ra | ||
292 | END(bn_mul_words) | ||
293 | |||
294 | .align 5 | ||
295 | LEAF(bn_sqr_words) | ||
296 | .set noreorder | ||
297 | bgtzl a2,.L_bn_sqr_words_proceed | ||
298 | ld t0,0(a1) | ||
299 | jr ra | ||
300 | move v0,zero | ||
301 | .set reorder | ||
302 | |||
303 | .L_bn_sqr_words_proceed: | ||
304 | li MINUS4,-4 | ||
305 | and ta0,a2,MINUS4 | ||
306 | move v0,zero | ||
307 | beqz ta0,.L_bn_sqr_words_tail | ||
308 | |||
309 | .L_bn_sqr_words_loop: | ||
310 | dmultu t0,t0 | ||
311 | ld t2,8(a1) | ||
312 | ld ta0,16(a1) | ||
313 | ld ta2,24(a1) | ||
314 | mflo t1 | ||
315 | mfhi t0 | ||
316 | sd t1,0(a0) | ||
317 | sd t0,8(a0) | ||
318 | |||
319 | dmultu t2,t2 | ||
320 | subu a2,4 | ||
321 | PTR_ADD a0,64 | ||
322 | PTR_ADD a1,32 | ||
323 | mflo t3 | ||
324 | mfhi t2 | ||
325 | sd t3,-48(a0) | ||
326 | sd t2,-40(a0) | ||
327 | |||
328 | dmultu ta0,ta0 | ||
329 | mflo ta1 | ||
330 | mfhi ta0 | ||
331 | sd ta1,-32(a0) | ||
332 | sd ta0,-24(a0) | ||
333 | |||
334 | |||
335 | dmultu ta2,ta2 | ||
336 | and ta0,a2,MINUS4 | ||
337 | mflo ta3 | ||
338 | mfhi ta2 | ||
339 | sd ta3,-16(a0) | ||
340 | sd ta2,-8(a0) | ||
341 | |||
342 | .set noreorder | ||
343 | bgtzl ta0,.L_bn_sqr_words_loop | ||
344 | ld t0,0(a1) | ||
345 | |||
346 | bnezl a2,.L_bn_sqr_words_tail | ||
347 | ld t0,0(a1) | ||
348 | .set reorder | ||
349 | |||
350 | .L_bn_sqr_words_return: | ||
351 | move v0,zero | ||
352 | jr ra | ||
353 | |||
354 | .L_bn_sqr_words_tail: | ||
355 | dmultu t0,t0 | ||
356 | subu a2,1 | ||
357 | mflo t1 | ||
358 | mfhi t0 | ||
359 | sd t1,0(a0) | ||
360 | sd t0,8(a0) | ||
361 | beqz a2,.L_bn_sqr_words_return | ||
362 | |||
363 | ld t0,8(a1) | ||
364 | dmultu t0,t0 | ||
365 | subu a2,1 | ||
366 | mflo t1 | ||
367 | mfhi t0 | ||
368 | sd t1,16(a0) | ||
369 | sd t0,24(a0) | ||
370 | beqz a2,.L_bn_sqr_words_return | ||
371 | |||
372 | ld t0,16(a1) | ||
373 | dmultu t0,t0 | ||
374 | mflo t1 | ||
375 | mfhi t0 | ||
376 | sd t1,32(a0) | ||
377 | sd t0,40(a0) | ||
378 | jr ra | ||
379 | END(bn_sqr_words) | ||
380 | |||
381 | .align 5 | ||
382 | LEAF(bn_add_words) | ||
383 | .set noreorder | ||
384 | bgtzl a3,.L_bn_add_words_proceed | ||
385 | ld t0,0(a1) | ||
386 | jr ra | ||
387 | move v0,zero | ||
388 | .set reorder | ||
389 | |||
390 | .L_bn_add_words_proceed: | ||
391 | li MINUS4,-4 | ||
392 | and AT,a3,MINUS4 | ||
393 | move v0,zero | ||
394 | beqz AT,.L_bn_add_words_tail | ||
395 | |||
396 | .L_bn_add_words_loop: | ||
397 | ld ta0,0(a2) | ||
398 | ld t1,8(a1) | ||
399 | ld ta1,8(a2) | ||
400 | ld t2,16(a1) | ||
401 | ld ta2,16(a2) | ||
402 | ld t3,24(a1) | ||
403 | ld ta3,24(a2) | ||
404 | daddu ta0,t0 | ||
405 | subu a3,4 | ||
406 | sltu t8,ta0,t0 | ||
407 | daddu t0,ta0,v0 | ||
408 | PTR_ADD a0,32 | ||
409 | sltu v0,t0,ta0 | ||
410 | sd t0,-32(a0) | ||
411 | daddu v0,t8 | ||
412 | |||
413 | daddu ta1,t1 | ||
414 | PTR_ADD a1,32 | ||
415 | sltu t9,ta1,t1 | ||
416 | daddu t1,ta1,v0 | ||
417 | PTR_ADD a2,32 | ||
418 | sltu v0,t1,ta1 | ||
419 | sd t1,-24(a0) | ||
420 | daddu v0,t9 | ||
421 | |||
422 | daddu ta2,t2 | ||
423 | and AT,a3,MINUS4 | ||
424 | sltu t8,ta2,t2 | ||
425 | daddu t2,ta2,v0 | ||
426 | sltu v0,t2,ta2 | ||
427 | sd t2,-16(a0) | ||
428 | daddu v0,t8 | ||
429 | |||
430 | daddu ta3,t3 | ||
431 | sltu t9,ta3,t3 | ||
432 | daddu t3,ta3,v0 | ||
433 | sltu v0,t3,ta3 | ||
434 | sd t3,-8(a0) | ||
435 | daddu v0,t9 | ||
436 | |||
437 | .set noreorder | ||
438 | bgtzl AT,.L_bn_add_words_loop | ||
439 | ld t0,0(a1) | ||
440 | |||
441 | bnezl a3,.L_bn_add_words_tail | ||
442 | ld t0,0(a1) | ||
443 | .set reorder | ||
444 | |||
445 | .L_bn_add_words_return: | ||
446 | jr ra | ||
447 | |||
448 | .L_bn_add_words_tail: | ||
449 | ld ta0,0(a2) | ||
450 | daddu ta0,t0 | ||
451 | subu a3,1 | ||
452 | sltu t8,ta0,t0 | ||
453 | daddu t0,ta0,v0 | ||
454 | sltu v0,t0,ta0 | ||
455 | sd t0,0(a0) | ||
456 | daddu v0,t8 | ||
457 | beqz a3,.L_bn_add_words_return | ||
458 | |||
459 | ld t1,8(a1) | ||
460 | ld ta1,8(a2) | ||
461 | daddu ta1,t1 | ||
462 | subu a3,1 | ||
463 | sltu t9,ta1,t1 | ||
464 | daddu t1,ta1,v0 | ||
465 | sltu v0,t1,ta1 | ||
466 | sd t1,8(a0) | ||
467 | daddu v0,t9 | ||
468 | beqz a3,.L_bn_add_words_return | ||
469 | |||
470 | ld t2,16(a1) | ||
471 | ld ta2,16(a2) | ||
472 | daddu ta2,t2 | ||
473 | sltu t8,ta2,t2 | ||
474 | daddu t2,ta2,v0 | ||
475 | sltu v0,t2,ta2 | ||
476 | sd t2,16(a0) | ||
477 | daddu v0,t8 | ||
478 | jr ra | ||
479 | END(bn_add_words) | ||
480 | |||
481 | .align 5 | ||
482 | LEAF(bn_sub_words) | ||
483 | .set noreorder | ||
484 | bgtzl a3,.L_bn_sub_words_proceed | ||
485 | ld t0,0(a1) | ||
486 | jr ra | ||
487 | move v0,zero | ||
488 | .set reorder | ||
489 | |||
490 | .L_bn_sub_words_proceed: | ||
491 | li MINUS4,-4 | ||
492 | and AT,a3,MINUS4 | ||
493 | move v0,zero | ||
494 | beqz AT,.L_bn_sub_words_tail | ||
495 | |||
496 | .L_bn_sub_words_loop: | ||
497 | ld ta0,0(a2) | ||
498 | ld t1,8(a1) | ||
499 | ld ta1,8(a2) | ||
500 | ld t2,16(a1) | ||
501 | ld ta2,16(a2) | ||
502 | ld t3,24(a1) | ||
503 | ld ta3,24(a2) | ||
504 | sltu t8,t0,ta0 | ||
505 | dsubu t0,ta0 | ||
506 | subu a3,4 | ||
507 | dsubu ta0,t0,v0 | ||
508 | and AT,a3,MINUS4 | ||
509 | sd ta0,0(a0) | ||
510 | MOVNZ (t0,v0,t8) | ||
511 | |||
512 | sltu t9,t1,ta1 | ||
513 | dsubu t1,ta1 | ||
514 | PTR_ADD a0,32 | ||
515 | dsubu ta1,t1,v0 | ||
516 | PTR_ADD a1,32 | ||
517 | sd ta1,-24(a0) | ||
518 | MOVNZ (t1,v0,t9) | ||
519 | |||
520 | |||
521 | sltu t8,t2,ta2 | ||
522 | dsubu t2,ta2 | ||
523 | dsubu ta2,t2,v0 | ||
524 | PTR_ADD a2,32 | ||
525 | sd ta2,-16(a0) | ||
526 | MOVNZ (t2,v0,t8) | ||
527 | |||
528 | sltu t9,t3,ta3 | ||
529 | dsubu t3,ta3 | ||
530 | dsubu ta3,t3,v0 | ||
531 | sd ta3,-8(a0) | ||
532 | MOVNZ (t3,v0,t9) | ||
533 | |||
534 | .set noreorder | ||
535 | bgtzl AT,.L_bn_sub_words_loop | ||
536 | ld t0,0(a1) | ||
537 | |||
538 | bnezl a3,.L_bn_sub_words_tail | ||
539 | ld t0,0(a1) | ||
540 | .set reorder | ||
541 | |||
542 | .L_bn_sub_words_return: | ||
543 | jr ra | ||
544 | |||
545 | .L_bn_sub_words_tail: | ||
546 | ld ta0,0(a2) | ||
547 | subu a3,1 | ||
548 | sltu t8,t0,ta0 | ||
549 | dsubu t0,ta0 | ||
550 | dsubu ta0,t0,v0 | ||
551 | MOVNZ (t0,v0,t8) | ||
552 | sd ta0,0(a0) | ||
553 | beqz a3,.L_bn_sub_words_return | ||
554 | |||
555 | ld t1,8(a1) | ||
556 | subu a3,1 | ||
557 | ld ta1,8(a2) | ||
558 | sltu t9,t1,ta1 | ||
559 | dsubu t1,ta1 | ||
560 | dsubu ta1,t1,v0 | ||
561 | MOVNZ (t1,v0,t9) | ||
562 | sd ta1,8(a0) | ||
563 | beqz a3,.L_bn_sub_words_return | ||
564 | |||
565 | ld t2,16(a1) | ||
566 | ld ta2,16(a2) | ||
567 | sltu t8,t2,ta2 | ||
568 | dsubu t2,ta2 | ||
569 | dsubu ta2,t2,v0 | ||
570 | MOVNZ (t2,v0,t8) | ||
571 | sd ta2,16(a0) | ||
572 | jr ra | ||
573 | END(bn_sub_words) | ||
574 | |||
575 | #undef MINUS4 | ||
576 | |||
577 | .align 5 | ||
578 | LEAF(bn_div_words) | ||
579 | .set noreorder | ||
580 | bnezl a2,.L_bn_div_words_proceed | ||
581 | move v1,zero | ||
582 | jr ra | ||
583 | li v0,-1 /* I'd rather signal div-by-zero | ||
584 | * which can be done with 'break 7' */ | ||
585 | |||
586 | .L_bn_div_words_proceed: | ||
587 | bltz a2,.L_bn_div_words_body | ||
588 | move t9,v1 | ||
589 | dsll a2,1 | ||
590 | bgtz a2,.-4 | ||
591 | addu t9,1 | ||
592 | |||
593 | .set reorder | ||
594 | negu t1,t9 | ||
595 | li t2,-1 | ||
596 | dsll t2,t1 | ||
597 | and t2,a0 | ||
598 | dsrl AT,a1,t1 | ||
599 | .set noreorder | ||
600 | bnezl t2,.+8 | ||
601 | break 6 /* signal overflow */ | ||
602 | .set reorder | ||
603 | dsll a0,t9 | ||
604 | dsll a1,t9 | ||
605 | or a0,AT | ||
606 | |||
607 | #define QT ta0 | ||
608 | #define HH ta1 | ||
609 | #define DH v1 | ||
610 | .L_bn_div_words_body: | ||
611 | dsrl DH,a2,32 | ||
612 | sgeu AT,a0,a2 | ||
613 | .set noreorder | ||
614 | bnezl AT,.+8 | ||
615 | dsubu a0,a2 | ||
616 | .set reorder | ||
617 | |||
618 | li QT,-1 | ||
619 | dsrl HH,a0,32 | ||
620 | dsrl QT,32 /* q=0xffffffff */ | ||
621 | beq DH,HH,.L_bn_div_words_skip_div1 | ||
622 | ddivu zero,a0,DH | ||
623 | mflo QT | ||
624 | .L_bn_div_words_skip_div1: | ||
625 | dmultu a2,QT | ||
626 | dsll t3,a0,32 | ||
627 | dsrl AT,a1,32 | ||
628 | or t3,AT | ||
629 | mflo t0 | ||
630 | mfhi t1 | ||
631 | .L_bn_div_words_inner_loop1: | ||
632 | sltu t2,t3,t0 | ||
633 | seq t8,HH,t1 | ||
634 | sltu AT,HH,t1 | ||
635 | and t2,t8 | ||
636 | or AT,t2 | ||
637 | .set noreorder | ||
638 | beqz AT,.L_bn_div_words_inner_loop1_done | ||
639 | sltu t2,t0,a2 | ||
640 | .set reorder | ||
641 | dsubu QT,1 | ||
642 | dsubu t0,a2 | ||
643 | dsubu t1,t2 | ||
644 | b .L_bn_div_words_inner_loop1 | ||
645 | .L_bn_div_words_inner_loop1_done: | ||
646 | |||
647 | dsll a1,32 | ||
648 | dsubu a0,t3,t0 | ||
649 | dsll v0,QT,32 | ||
650 | |||
651 | li QT,-1 | ||
652 | dsrl HH,a0,32 | ||
653 | dsrl QT,32 /* q=0xffffffff */ | ||
654 | beq DH,HH,.L_bn_div_words_skip_div2 | ||
655 | ddivu zero,a0,DH | ||
656 | mflo QT | ||
657 | .L_bn_div_words_skip_div2: | ||
658 | dmultu a2,QT | ||
659 | dsll t3,a0,32 | ||
660 | dsrl AT,a1,32 | ||
661 | or t3,AT | ||
662 | mflo t0 | ||
663 | mfhi t1 | ||
664 | .L_bn_div_words_inner_loop2: | ||
665 | sltu t2,t3,t0 | ||
666 | seq t8,HH,t1 | ||
667 | sltu AT,HH,t1 | ||
668 | and t2,t8 | ||
669 | or AT,t2 | ||
670 | .set noreorder | ||
671 | beqz AT,.L_bn_div_words_inner_loop2_done | ||
672 | sltu t2,t0,a2 | ||
673 | .set reorder | ||
674 | dsubu QT,1 | ||
675 | dsubu t0,a2 | ||
676 | dsubu t1,t2 | ||
677 | b .L_bn_div_words_inner_loop2 | ||
678 | .L_bn_div_words_inner_loop2_done: | ||
679 | |||
680 | dsubu a0,t3,t0 | ||
681 | or v0,QT | ||
682 | dsrl v1,a0,t9 /* v1 contains remainder if anybody wants it */ | ||
683 | dsrl a2,t9 /* restore a2 */ | ||
684 | jr ra | ||
685 | #undef HH | ||
686 | #undef DH | ||
687 | #undef QT | ||
688 | END(bn_div_words) | ||
689 | |||
690 | .align 5 | ||
691 | LEAF(bn_div_3_words) | ||
692 | .set reorder | ||
693 | move a3,a0 /* we know that bn_div_words doesn't | ||
694 | * touch a3, ta2, ta3 and preserves a2 | ||
695 | * so that we can save two arguments | ||
696 | * and return address in registers | ||
697 | * instead of stack:-) | ||
698 | */ | ||
699 | ld a0,(a3) | ||
700 | move ta2,a2 | ||
701 | move a2,a1 | ||
702 | ld a1,-8(a3) | ||
703 | move ta3,ra | ||
704 | move v1,zero | ||
705 | li v0,-1 | ||
706 | beq a0,a2,.L_bn_div_3_words_skip_div | ||
707 | jal bn_div_words | ||
708 | move ra,ta3 | ||
709 | .L_bn_div_3_words_skip_div: | ||
710 | dmultu ta2,v0 | ||
711 | ld t2,-16(a3) | ||
712 | mflo t0 | ||
713 | mfhi t1 | ||
714 | .L_bn_div_3_words_inner_loop: | ||
715 | sgeu AT,t2,t0 | ||
716 | seq t9,t1,v1 | ||
717 | sltu t8,t1,v1 | ||
718 | and AT,t9 | ||
719 | or AT,t8 | ||
720 | bnez AT,.L_bn_div_3_words_inner_loop_done | ||
721 | daddu v1,a2 | ||
722 | sltu t3,t0,ta2 | ||
723 | sltu AT,v1,a2 | ||
724 | dsubu v0,1 | ||
725 | dsubu t0,ta2 | ||
726 | dsubu t1,t3 | ||
727 | beqz AT,.L_bn_div_3_words_inner_loop | ||
728 | .L_bn_div_3_words_inner_loop_done: | ||
729 | jr ra | ||
730 | END(bn_div_3_words) | ||
731 | |||
732 | #define a_0 t0 | ||
733 | #define a_1 t1 | ||
734 | #define a_2 t2 | ||
735 | #define a_3 t3 | ||
736 | #define b_0 ta0 | ||
737 | #define b_1 ta1 | ||
738 | #define b_2 ta2 | ||
739 | #define b_3 ta3 | ||
740 | |||
741 | #define a_4 s0 | ||
742 | #define a_5 s2 | ||
743 | #define a_6 s4 | ||
744 | #define a_7 a1 /* once we load a[7] we don't need a anymore */ | ||
745 | #define b_4 s1 | ||
746 | #define b_5 s3 | ||
747 | #define b_6 s5 | ||
748 | #define b_7 a2 /* once we load b[7] we don't need b anymore */ | ||
749 | |||
750 | #define t_1 t8 | ||
751 | #define t_2 t9 | ||
752 | |||
753 | #define c_1 v0 | ||
754 | #define c_2 v1 | ||
755 | #define c_3 a3 | ||
756 | |||
757 | #define FRAME_SIZE 48 | ||
758 | |||
759 | .align 5 | ||
760 | LEAF(bn_mul_comba8) | ||
761 | .set noreorder | ||
762 | PTR_SUB sp,FRAME_SIZE | ||
763 | .frame sp,64,ra | ||
764 | .set reorder | ||
765 | ld a_0,0(a1) /* If compiled with -mips3 option on | ||
766 | * R5000 box assembler barks on this | ||
767 | * line with "shouldn't have mult/div | ||
768 | * as last instruction in bb (R10K | ||
769 | * bug)" warning. If anybody out there | ||
770 | * has a clue about how to circumvent | ||
771 | * this do send me a note. | ||
772 | * <appro@fy.chalmers.se> | ||
773 | */ | ||
774 | ld b_0,0(a2) | ||
775 | ld a_1,8(a1) | ||
776 | ld a_2,16(a1) | ||
777 | ld a_3,24(a1) | ||
778 | ld b_1,8(a2) | ||
779 | ld b_2,16(a2) | ||
780 | ld b_3,24(a2) | ||
781 | dmultu a_0,b_0 /* mul_add_c(a[0],b[0],c1,c2,c3); */ | ||
782 | sd s0,0(sp) | ||
783 | sd s1,8(sp) | ||
784 | sd s2,16(sp) | ||
785 | sd s3,24(sp) | ||
786 | sd s4,32(sp) | ||
787 | sd s5,40(sp) | ||
788 | mflo c_1 | ||
789 | mfhi c_2 | ||
790 | |||
791 | dmultu a_0,b_1 /* mul_add_c(a[0],b[1],c2,c3,c1); */ | ||
792 | ld a_4,32(a1) | ||
793 | ld a_5,40(a1) | ||
794 | ld a_6,48(a1) | ||
795 | ld a_7,56(a1) | ||
796 | ld b_4,32(a2) | ||
797 | ld b_5,40(a2) | ||
798 | mflo t_1 | ||
799 | mfhi t_2 | ||
800 | daddu c_2,t_1 | ||
801 | sltu AT,c_2,t_1 | ||
802 | daddu c_3,t_2,AT | ||
803 | dmultu a_1,b_0 /* mul_add_c(a[1],b[0],c2,c3,c1); */ | ||
804 | ld b_6,48(a2) | ||
805 | ld b_7,56(a2) | ||
806 | sd c_1,0(a0) /* r[0]=c1; */ | ||
807 | mflo t_1 | ||
808 | mfhi t_2 | ||
809 | daddu c_2,t_1 | ||
810 | sltu AT,c_2,t_1 | ||
811 | daddu t_2,AT | ||
812 | daddu c_3,t_2 | ||
813 | sltu c_1,c_3,t_2 | ||
814 | sd c_2,8(a0) /* r[1]=c2; */ | ||
815 | |||
816 | dmultu a_2,b_0 /* mul_add_c(a[2],b[0],c3,c1,c2); */ | ||
817 | mflo t_1 | ||
818 | mfhi t_2 | ||
819 | daddu c_3,t_1 | ||
820 | sltu AT,c_3,t_1 | ||
821 | daddu t_2,AT | ||
822 | daddu c_1,t_2 | ||
823 | dmultu a_1,b_1 /* mul_add_c(a[1],b[1],c3,c1,c2); */ | ||
824 | mflo t_1 | ||
825 | mfhi t_2 | ||
826 | daddu c_3,t_1 | ||
827 | sltu AT,c_3,t_1 | ||
828 | daddu t_2,AT | ||
829 | daddu c_1,t_2 | ||
830 | sltu c_2,c_1,t_2 | ||
831 | dmultu a_0,b_2 /* mul_add_c(a[0],b[2],c3,c1,c2); */ | ||
832 | mflo t_1 | ||
833 | mfhi t_2 | ||
834 | daddu c_3,t_1 | ||
835 | sltu AT,c_3,t_1 | ||
836 | daddu t_2,AT | ||
837 | daddu c_1,t_2 | ||
838 | sltu AT,c_1,t_2 | ||
839 | daddu c_2,AT | ||
840 | sd c_3,16(a0) /* r[2]=c3; */ | ||
841 | |||
842 | dmultu a_0,b_3 /* mul_add_c(a[0],b[3],c1,c2,c3); */ | ||
843 | mflo t_1 | ||
844 | mfhi t_2 | ||
845 | daddu c_1,t_1 | ||
846 | sltu AT,c_1,t_1 | ||
847 | daddu t_2,AT | ||
848 | daddu c_2,t_2 | ||
849 | dmultu a_1,b_2 /* mul_add_c(a[1],b[2],c1,c2,c3); */ | ||
850 | mflo t_1 | ||
851 | mfhi t_2 | ||
852 | daddu c_1,t_1 | ||
853 | sltu AT,c_1,t_1 | ||
854 | daddu t_2,AT | ||
855 | daddu c_2,t_2 | ||
856 | sltu c_3,c_2,t_2 | ||
857 | dmultu a_2,b_1 /* mul_add_c(a[2],b[1],c1,c2,c3); */ | ||
858 | mflo t_1 | ||
859 | mfhi t_2 | ||
860 | daddu c_1,t_1 | ||
861 | sltu AT,c_1,t_1 | ||
862 | daddu t_2,AT | ||
863 | daddu c_2,t_2 | ||
864 | sltu AT,c_2,t_2 | ||
865 | daddu c_3,AT | ||
866 | dmultu a_3,b_0 /* mul_add_c(a[3],b[0],c1,c2,c3); */ | ||
867 | mflo t_1 | ||
868 | mfhi t_2 | ||
869 | daddu c_1,t_1 | ||
870 | sltu AT,c_1,t_1 | ||
871 | daddu t_2,AT | ||
872 | daddu c_2,t_2 | ||
873 | sltu AT,c_2,t_2 | ||
874 | daddu c_3,AT | ||
875 | sd c_1,24(a0) /* r[3]=c1; */ | ||
876 | |||
877 | dmultu a_4,b_0 /* mul_add_c(a[4],b[0],c2,c3,c1); */ | ||
878 | mflo t_1 | ||
879 | mfhi t_2 | ||
880 | daddu c_2,t_1 | ||
881 | sltu AT,c_2,t_1 | ||
882 | daddu t_2,AT | ||
883 | daddu c_3,t_2 | ||
884 | dmultu a_3,b_1 /* mul_add_c(a[3],b[1],c2,c3,c1); */ | ||
885 | mflo t_1 | ||
886 | mfhi t_2 | ||
887 | daddu c_2,t_1 | ||
888 | sltu AT,c_2,t_1 | ||
889 | daddu t_2,AT | ||
890 | daddu c_3,t_2 | ||
891 | sltu c_1,c_3,t_2 | ||
892 | dmultu a_2,b_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */ | ||
893 | mflo t_1 | ||
894 | mfhi t_2 | ||
895 | daddu c_2,t_1 | ||
896 | sltu AT,c_2,t_1 | ||
897 | daddu t_2,AT | ||
898 | daddu c_3,t_2 | ||
899 | sltu AT,c_3,t_2 | ||
900 | daddu c_1,AT | ||
901 | dmultu a_1,b_3 /* mul_add_c(a[1],b[3],c2,c3,c1); */ | ||
902 | mflo t_1 | ||
903 | mfhi t_2 | ||
904 | daddu c_2,t_1 | ||
905 | sltu AT,c_2,t_1 | ||
906 | daddu t_2,AT | ||
907 | daddu c_3,t_2 | ||
908 | sltu AT,c_3,t_2 | ||
909 | daddu c_1,AT | ||
910 | dmultu a_0,b_4 /* mul_add_c(a[0],b[4],c2,c3,c1); */ | ||
911 | mflo t_1 | ||
912 | mfhi t_2 | ||
913 | daddu c_2,t_1 | ||
914 | sltu AT,c_2,t_1 | ||
915 | daddu t_2,AT | ||
916 | daddu c_3,t_2 | ||
917 | sltu AT,c_3,t_2 | ||
918 | daddu c_1,AT | ||
919 | sd c_2,32(a0) /* r[4]=c2; */ | ||
920 | |||
921 | dmultu a_0,b_5 /* mul_add_c(a[0],b[5],c3,c1,c2); */ | ||
922 | mflo t_1 | ||
923 | mfhi t_2 | ||
924 | daddu c_3,t_1 | ||
925 | sltu AT,c_3,t_1 | ||
926 | daddu t_2,AT | ||
927 | daddu c_1,t_2 | ||
928 | dmultu a_1,b_4 /* mul_add_c(a[1],b[4],c3,c1,c2); */ | ||
929 | mflo t_1 | ||
930 | mfhi t_2 | ||
931 | daddu c_3,t_1 | ||
932 | sltu AT,c_3,t_1 | ||
933 | daddu t_2,AT | ||
934 | daddu c_1,t_2 | ||
935 | sltu c_2,c_1,t_2 | ||
936 | dmultu a_2,b_3 /* mul_add_c(a[2],b[3],c3,c1,c2); */ | ||
937 | mflo t_1 | ||
938 | mfhi t_2 | ||
939 | daddu c_3,t_1 | ||
940 | sltu AT,c_3,t_1 | ||
941 | daddu t_2,AT | ||
942 | daddu c_1,t_2 | ||
943 | sltu AT,c_1,t_2 | ||
944 | daddu c_2,AT | ||
945 | dmultu a_3,b_2 /* mul_add_c(a[3],b[2],c3,c1,c2); */ | ||
946 | mflo t_1 | ||
947 | mfhi t_2 | ||
948 | daddu c_3,t_1 | ||
949 | sltu AT,c_3,t_1 | ||
950 | daddu t_2,AT | ||
951 | daddu c_1,t_2 | ||
952 | sltu AT,c_1,t_2 | ||
953 | daddu c_2,AT | ||
954 | dmultu a_4,b_1 /* mul_add_c(a[4],b[1],c3,c1,c2); */ | ||
955 | mflo t_1 | ||
956 | mfhi t_2 | ||
957 | daddu c_3,t_1 | ||
958 | sltu AT,c_3,t_1 | ||
959 | daddu t_2,AT | ||
960 | daddu c_1,t_2 | ||
961 | sltu AT,c_1,t_2 | ||
962 | daddu c_2,AT | ||
963 | dmultu a_5,b_0 /* mul_add_c(a[5],b[0],c3,c1,c2); */ | ||
964 | mflo t_1 | ||
965 | mfhi t_2 | ||
966 | daddu c_3,t_1 | ||
967 | sltu AT,c_3,t_1 | ||
968 | daddu t_2,AT | ||
969 | daddu c_1,t_2 | ||
970 | sltu AT,c_1,t_2 | ||
971 | daddu c_2,AT | ||
972 | sd c_3,40(a0) /* r[5]=c3; */ | ||
973 | |||
974 | dmultu a_6,b_0 /* mul_add_c(a[6],b[0],c1,c2,c3); */ | ||
975 | mflo t_1 | ||
976 | mfhi t_2 | ||
977 | daddu c_1,t_1 | ||
978 | sltu AT,c_1,t_1 | ||
979 | daddu t_2,AT | ||
980 | daddu c_2,t_2 | ||
981 | dmultu a_5,b_1 /* mul_add_c(a[5],b[1],c1,c2,c3); */ | ||
982 | mflo t_1 | ||
983 | mfhi t_2 | ||
984 | daddu c_1,t_1 | ||
985 | sltu AT,c_1,t_1 | ||
986 | daddu t_2,AT | ||
987 | daddu c_2,t_2 | ||
988 | sltu c_3,c_2,t_2 | ||
989 | dmultu a_4,b_2 /* mul_add_c(a[4],b[2],c1,c2,c3); */ | ||
990 | mflo t_1 | ||
991 | mfhi t_2 | ||
992 | daddu c_1,t_1 | ||
993 | sltu AT,c_1,t_1 | ||
994 | daddu t_2,AT | ||
995 | daddu c_2,t_2 | ||
996 | sltu AT,c_2,t_2 | ||
997 | daddu c_3,AT | ||
998 | dmultu a_3,b_3 /* mul_add_c(a[3],b[3],c1,c2,c3); */ | ||
999 | mflo t_1 | ||
1000 | mfhi t_2 | ||
1001 | daddu c_1,t_1 | ||
1002 | sltu AT,c_1,t_1 | ||
1003 | daddu t_2,AT | ||
1004 | daddu c_2,t_2 | ||
1005 | sltu AT,c_2,t_2 | ||
1006 | daddu c_3,AT | ||
1007 | dmultu a_2,b_4 /* mul_add_c(a[2],b[4],c1,c2,c3); */ | ||
1008 | mflo t_1 | ||
1009 | mfhi t_2 | ||
1010 | daddu c_1,t_1 | ||
1011 | sltu AT,c_1,t_1 | ||
1012 | daddu t_2,AT | ||
1013 | daddu c_2,t_2 | ||
1014 | sltu AT,c_2,t_2 | ||
1015 | daddu c_3,AT | ||
1016 | dmultu a_1,b_5 /* mul_add_c(a[1],b[5],c1,c2,c3); */ | ||
1017 | mflo t_1 | ||
1018 | mfhi t_2 | ||
1019 | daddu c_1,t_1 | ||
1020 | sltu AT,c_1,t_1 | ||
1021 | daddu t_2,AT | ||
1022 | daddu c_2,t_2 | ||
1023 | sltu AT,c_2,t_2 | ||
1024 | daddu c_3,AT | ||
1025 | dmultu a_0,b_6 /* mul_add_c(a[0],b[6],c1,c2,c3); */ | ||
1026 | mflo t_1 | ||
1027 | mfhi t_2 | ||
1028 | daddu c_1,t_1 | ||
1029 | sltu AT,c_1,t_1 | ||
1030 | daddu t_2,AT | ||
1031 | daddu c_2,t_2 | ||
1032 | sltu AT,c_2,t_2 | ||
1033 | daddu c_3,AT | ||
1034 | sd c_1,48(a0) /* r[6]=c1; */ | ||
1035 | |||
1036 | dmultu a_0,b_7 /* mul_add_c(a[0],b[7],c2,c3,c1); */ | ||
1037 | mflo t_1 | ||
1038 | mfhi t_2 | ||
1039 | daddu c_2,t_1 | ||
1040 | sltu AT,c_2,t_1 | ||
1041 | daddu t_2,AT | ||
1042 | daddu c_3,t_2 | ||
1043 | dmultu a_1,b_6 /* mul_add_c(a[1],b[6],c2,c3,c1); */ | ||
1044 | mflo t_1 | ||
1045 | mfhi t_2 | ||
1046 | daddu c_2,t_1 | ||
1047 | sltu AT,c_2,t_1 | ||
1048 | daddu t_2,AT | ||
1049 | daddu c_3,t_2 | ||
1050 | sltu c_1,c_3,t_2 | ||
1051 | dmultu a_2,b_5 /* mul_add_c(a[2],b[5],c2,c3,c1); */ | ||
1052 | mflo t_1 | ||
1053 | mfhi t_2 | ||
1054 | daddu c_2,t_1 | ||
1055 | sltu AT,c_2,t_1 | ||
1056 | daddu t_2,AT | ||
1057 | daddu c_3,t_2 | ||
1058 | sltu AT,c_3,t_2 | ||
1059 | daddu c_1,AT | ||
1060 | dmultu a_3,b_4 /* mul_add_c(a[3],b[4],c2,c3,c1); */ | ||
1061 | mflo t_1 | ||
1062 | mfhi t_2 | ||
1063 | daddu c_2,t_1 | ||
1064 | sltu AT,c_2,t_1 | ||
1065 | daddu t_2,AT | ||
1066 | daddu c_3,t_2 | ||
1067 | sltu AT,c_3,t_2 | ||
1068 | daddu c_1,AT | ||
1069 | dmultu a_4,b_3 /* mul_add_c(a[4],b[3],c2,c3,c1); */ | ||
1070 | mflo t_1 | ||
1071 | mfhi t_2 | ||
1072 | daddu c_2,t_1 | ||
1073 | sltu AT,c_2,t_1 | ||
1074 | daddu t_2,AT | ||
1075 | daddu c_3,t_2 | ||
1076 | sltu AT,c_3,t_2 | ||
1077 | daddu c_1,AT | ||
1078 | dmultu a_5,b_2 /* mul_add_c(a[5],b[2],c2,c3,c1); */ | ||
1079 | mflo t_1 | ||
1080 | mfhi t_2 | ||
1081 | daddu c_2,t_1 | ||
1082 | sltu AT,c_2,t_1 | ||
1083 | daddu t_2,AT | ||
1084 | daddu c_3,t_2 | ||
1085 | sltu AT,c_3,t_2 | ||
1086 | daddu c_1,AT | ||
1087 | dmultu a_6,b_1 /* mul_add_c(a[6],b[1],c2,c3,c1); */ | ||
1088 | mflo t_1 | ||
1089 | mfhi t_2 | ||
1090 | daddu c_2,t_1 | ||
1091 | sltu AT,c_2,t_1 | ||
1092 | daddu t_2,AT | ||
1093 | daddu c_3,t_2 | ||
1094 | sltu AT,c_3,t_2 | ||
1095 | daddu c_1,AT | ||
1096 | dmultu a_7,b_0 /* mul_add_c(a[7],b[0],c2,c3,c1); */ | ||
1097 | mflo t_1 | ||
1098 | mfhi t_2 | ||
1099 | daddu c_2,t_1 | ||
1100 | sltu AT,c_2,t_1 | ||
1101 | daddu t_2,AT | ||
1102 | daddu c_3,t_2 | ||
1103 | sltu AT,c_3,t_2 | ||
1104 | daddu c_1,AT | ||
1105 | sd c_2,56(a0) /* r[7]=c2; */ | ||
1106 | |||
1107 | dmultu a_7,b_1 /* mul_add_c(a[7],b[1],c3,c1,c2); */ | ||
1108 | mflo t_1 | ||
1109 | mfhi t_2 | ||
1110 | daddu c_3,t_1 | ||
1111 | sltu AT,c_3,t_1 | ||
1112 | daddu t_2,AT | ||
1113 | daddu c_1,t_2 | ||
1114 | dmultu a_6,b_2 /* mul_add_c(a[6],b[2],c3,c1,c2); */ | ||
1115 | mflo t_1 | ||
1116 | mfhi t_2 | ||
1117 | daddu c_3,t_1 | ||
1118 | sltu AT,c_3,t_1 | ||
1119 | daddu t_2,AT | ||
1120 | daddu c_1,t_2 | ||
1121 | sltu c_2,c_1,t_2 | ||
1122 | dmultu a_5,b_3 /* mul_add_c(a[5],b[3],c3,c1,c2); */ | ||
1123 | mflo t_1 | ||
1124 | mfhi t_2 | ||
1125 | daddu c_3,t_1 | ||
1126 | sltu AT,c_3,t_1 | ||
1127 | daddu t_2,AT | ||
1128 | daddu c_1,t_2 | ||
1129 | sltu AT,c_1,t_2 | ||
1130 | daddu c_2,AT | ||
1131 | dmultu a_4,b_4 /* mul_add_c(a[4],b[4],c3,c1,c2); */ | ||
1132 | mflo t_1 | ||
1133 | mfhi t_2 | ||
1134 | daddu c_3,t_1 | ||
1135 | sltu AT,c_3,t_1 | ||
1136 | daddu t_2,AT | ||
1137 | daddu c_1,t_2 | ||
1138 | sltu AT,c_1,t_2 | ||
1139 | daddu c_2,AT | ||
1140 | dmultu a_3,b_5 /* mul_add_c(a[3],b[5],c3,c1,c2); */ | ||
1141 | mflo t_1 | ||
1142 | mfhi t_2 | ||
1143 | daddu c_3,t_1 | ||
1144 | sltu AT,c_3,t_1 | ||
1145 | daddu t_2,AT | ||
1146 | daddu c_1,t_2 | ||
1147 | sltu AT,c_1,t_2 | ||
1148 | daddu c_2,AT | ||
1149 | dmultu a_2,b_6 /* mul_add_c(a[2],b[6],c3,c1,c2); */ | ||
1150 | mflo t_1 | ||
1151 | mfhi t_2 | ||
1152 | daddu c_3,t_1 | ||
1153 | sltu AT,c_3,t_1 | ||
1154 | daddu t_2,AT | ||
1155 | daddu c_1,t_2 | ||
1156 | sltu AT,c_1,t_2 | ||
1157 | daddu c_2,AT | ||
1158 | dmultu a_1,b_7 /* mul_add_c(a[1],b[7],c3,c1,c2); */ | ||
1159 | mflo t_1 | ||
1160 | mfhi t_2 | ||
1161 | daddu c_3,t_1 | ||
1162 | sltu AT,c_3,t_1 | ||
1163 | daddu t_2,AT | ||
1164 | daddu c_1,t_2 | ||
1165 | sltu AT,c_1,t_2 | ||
1166 | daddu c_2,AT | ||
1167 | sd c_3,64(a0) /* r[8]=c3; */ | ||
1168 | |||
1169 | dmultu a_2,b_7 /* mul_add_c(a[2],b[7],c1,c2,c3); */ | ||
1170 | mflo t_1 | ||
1171 | mfhi t_2 | ||
1172 | daddu c_1,t_1 | ||
1173 | sltu AT,c_1,t_1 | ||
1174 | daddu t_2,AT | ||
1175 | daddu c_2,t_2 | ||
1176 | dmultu a_3,b_6 /* mul_add_c(a[3],b[6],c1,c2,c3); */ | ||
1177 | mflo t_1 | ||
1178 | mfhi t_2 | ||
1179 | daddu c_1,t_1 | ||
1180 | sltu AT,c_1,t_1 | ||
1181 | daddu t_2,AT | ||
1182 | daddu c_2,t_2 | ||
1183 | sltu c_3,c_2,t_2 | ||
1184 | dmultu a_4,b_5 /* mul_add_c(a[4],b[5],c1,c2,c3); */ | ||
1185 | mflo t_1 | ||
1186 | mfhi t_2 | ||
1187 | daddu c_1,t_1 | ||
1188 | sltu AT,c_1,t_1 | ||
1189 | daddu t_2,AT | ||
1190 | daddu c_2,t_2 | ||
1191 | sltu AT,c_2,t_2 | ||
1192 | daddu c_3,AT | ||
1193 | dmultu a_5,b_4 /* mul_add_c(a[5],b[4],c1,c2,c3); */ | ||
1194 | mflo t_1 | ||
1195 | mfhi t_2 | ||
1196 | daddu c_1,t_1 | ||
1197 | sltu AT,c_1,t_1 | ||
1198 | daddu t_2,AT | ||
1199 | daddu c_2,t_2 | ||
1200 | sltu AT,c_2,t_2 | ||
1201 | daddu c_3,AT | ||
1202 | dmultu a_6,b_3 /* mul_add_c(a[6],b[3],c1,c2,c3); */ | ||
1203 | mflo t_1 | ||
1204 | mfhi t_2 | ||
1205 | daddu c_1,t_1 | ||
1206 | sltu AT,c_1,t_1 | ||
1207 | daddu t_2,AT | ||
1208 | daddu c_2,t_2 | ||
1209 | sltu AT,c_2,t_2 | ||
1210 | daddu c_3,AT | ||
1211 | dmultu a_7,b_2 /* mul_add_c(a[7],b[2],c1,c2,c3); */ | ||
1212 | mflo t_1 | ||
1213 | mfhi t_2 | ||
1214 | daddu c_1,t_1 | ||
1215 | sltu AT,c_1,t_1 | ||
1216 | daddu t_2,AT | ||
1217 | daddu c_2,t_2 | ||
1218 | sltu AT,c_2,t_2 | ||
1219 | daddu c_3,AT | ||
1220 | sd c_1,72(a0) /* r[9]=c1; */ | ||
1221 | |||
1222 | dmultu a_7,b_3 /* mul_add_c(a[7],b[3],c2,c3,c1); */ | ||
1223 | mflo t_1 | ||
1224 | mfhi t_2 | ||
1225 | daddu c_2,t_1 | ||
1226 | sltu AT,c_2,t_1 | ||
1227 | daddu t_2,AT | ||
1228 | daddu c_3,t_2 | ||
1229 | dmultu a_6,b_4 /* mul_add_c(a[6],b[4],c2,c3,c1); */ | ||
1230 | mflo t_1 | ||
1231 | mfhi t_2 | ||
1232 | daddu c_2,t_1 | ||
1233 | sltu AT,c_2,t_1 | ||
1234 | daddu t_2,AT | ||
1235 | daddu c_3,t_2 | ||
1236 | sltu c_1,c_3,t_2 | ||
1237 | dmultu a_5,b_5 /* mul_add_c(a[5],b[5],c2,c3,c1); */ | ||
1238 | mflo t_1 | ||
1239 | mfhi t_2 | ||
1240 | daddu c_2,t_1 | ||
1241 | sltu AT,c_2,t_1 | ||
1242 | daddu t_2,AT | ||
1243 | daddu c_3,t_2 | ||
1244 | sltu AT,c_3,t_2 | ||
1245 | daddu c_1,AT | ||
1246 | dmultu a_4,b_6 /* mul_add_c(a[4],b[6],c2,c3,c1); */ | ||
1247 | mflo t_1 | ||
1248 | mfhi t_2 | ||
1249 | daddu c_2,t_1 | ||
1250 | sltu AT,c_2,t_1 | ||
1251 | daddu t_2,AT | ||
1252 | daddu c_3,t_2 | ||
1253 | sltu AT,c_3,t_2 | ||
1254 | daddu c_1,AT | ||
1255 | dmultu a_3,b_7 /* mul_add_c(a[3],b[7],c2,c3,c1); */ | ||
1256 | mflo t_1 | ||
1257 | mfhi t_2 | ||
1258 | daddu c_2,t_1 | ||
1259 | sltu AT,c_2,t_1 | ||
1260 | daddu t_2,AT | ||
1261 | daddu c_3,t_2 | ||
1262 | sltu AT,c_3,t_2 | ||
1263 | daddu c_1,AT | ||
1264 | sd c_2,80(a0) /* r[10]=c2; */ | ||
1265 | |||
1266 | dmultu a_4,b_7 /* mul_add_c(a[4],b[7],c3,c1,c2); */ | ||
1267 | mflo t_1 | ||
1268 | mfhi t_2 | ||
1269 | daddu c_3,t_1 | ||
1270 | sltu AT,c_3,t_1 | ||
1271 | daddu t_2,AT | ||
1272 | daddu c_1,t_2 | ||
1273 | dmultu a_5,b_6 /* mul_add_c(a[5],b[6],c3,c1,c2); */ | ||
1274 | mflo t_1 | ||
1275 | mfhi t_2 | ||
1276 | daddu c_3,t_1 | ||
1277 | sltu AT,c_3,t_1 | ||
1278 | daddu t_2,AT | ||
1279 | daddu c_1,t_2 | ||
1280 | sltu c_2,c_1,t_2 | ||
1281 | dmultu a_6,b_5 /* mul_add_c(a[6],b[5],c3,c1,c2); */ | ||
1282 | mflo t_1 | ||
1283 | mfhi t_2 | ||
1284 | daddu c_3,t_1 | ||
1285 | sltu AT,c_3,t_1 | ||
1286 | daddu t_2,AT | ||
1287 | daddu c_1,t_2 | ||
1288 | sltu AT,c_1,t_2 | ||
1289 | daddu c_2,AT | ||
1290 | dmultu a_7,b_4 /* mul_add_c(a[7],b[4],c3,c1,c2); */ | ||
1291 | mflo t_1 | ||
1292 | mfhi t_2 | ||
1293 | daddu c_3,t_1 | ||
1294 | sltu AT,c_3,t_1 | ||
1295 | daddu t_2,AT | ||
1296 | daddu c_1,t_2 | ||
1297 | sltu AT,c_1,t_2 | ||
1298 | daddu c_2,AT | ||
1299 | sd c_3,88(a0) /* r[11]=c3; */ | ||
1300 | |||
1301 | dmultu a_7,b_5 /* mul_add_c(a[7],b[5],c1,c2,c3); */ | ||
1302 | mflo t_1 | ||
1303 | mfhi t_2 | ||
1304 | daddu c_1,t_1 | ||
1305 | sltu AT,c_1,t_1 | ||
1306 | daddu t_2,AT | ||
1307 | daddu c_2,t_2 | ||
1308 | dmultu a_6,b_6 /* mul_add_c(a[6],b[6],c1,c2,c3); */ | ||
1309 | mflo t_1 | ||
1310 | mfhi t_2 | ||
1311 | daddu c_1,t_1 | ||
1312 | sltu AT,c_1,t_1 | ||
1313 | daddu t_2,AT | ||
1314 | daddu c_2,t_2 | ||
1315 | sltu c_3,c_2,t_2 | ||
1316 | dmultu a_5,b_7 /* mul_add_c(a[5],b[7],c1,c2,c3); */ | ||
1317 | mflo t_1 | ||
1318 | mfhi t_2 | ||
1319 | daddu c_1,t_1 | ||
1320 | sltu AT,c_1,t_1 | ||
1321 | daddu t_2,AT | ||
1322 | daddu c_2,t_2 | ||
1323 | sltu AT,c_2,t_2 | ||
1324 | daddu c_3,AT | ||
1325 | sd c_1,96(a0) /* r[12]=c1; */ | ||
1326 | |||
1327 | dmultu a_6,b_7 /* mul_add_c(a[6],b[7],c2,c3,c1); */ | ||
1328 | mflo t_1 | ||
1329 | mfhi t_2 | ||
1330 | daddu c_2,t_1 | ||
1331 | sltu AT,c_2,t_1 | ||
1332 | daddu t_2,AT | ||
1333 | daddu c_3,t_2 | ||
1334 | dmultu a_7,b_6 /* mul_add_c(a[7],b[6],c2,c3,c1); */ | ||
1335 | mflo t_1 | ||
1336 | mfhi t_2 | ||
1337 | daddu c_2,t_1 | ||
1338 | sltu AT,c_2,t_1 | ||
1339 | daddu t_2,AT | ||
1340 | daddu c_3,t_2 | ||
1341 | sltu c_1,c_3,t_2 | ||
1342 | sd c_2,104(a0) /* r[13]=c2; */ | ||
1343 | |||
1344 | dmultu a_7,b_7 /* mul_add_c(a[7],b[7],c3,c1,c2); */ | ||
1345 | ld s0,0(sp) | ||
1346 | ld s1,8(sp) | ||
1347 | ld s2,16(sp) | ||
1348 | ld s3,24(sp) | ||
1349 | ld s4,32(sp) | ||
1350 | ld s5,40(sp) | ||
1351 | mflo t_1 | ||
1352 | mfhi t_2 | ||
1353 | daddu c_3,t_1 | ||
1354 | sltu AT,c_3,t_1 | ||
1355 | daddu t_2,AT | ||
1356 | daddu c_1,t_2 | ||
1357 | sd c_3,112(a0) /* r[14]=c3; */ | ||
1358 | sd c_1,120(a0) /* r[15]=c1; */ | ||
1359 | |||
1360 | PTR_ADD sp,FRAME_SIZE | ||
1361 | |||
1362 | jr ra | ||
1363 | END(bn_mul_comba8) | ||
1364 | |||
1365 | .align 5 | ||
1366 | LEAF(bn_mul_comba4) | ||
1367 | .set reorder | ||
1368 | ld a_0,0(a1) | ||
1369 | ld b_0,0(a2) | ||
1370 | ld a_1,8(a1) | ||
1371 | ld a_2,16(a1) | ||
1372 | dmultu a_0,b_0 /* mul_add_c(a[0],b[0],c1,c2,c3); */ | ||
1373 | ld a_3,24(a1) | ||
1374 | ld b_1,8(a2) | ||
1375 | ld b_2,16(a2) | ||
1376 | ld b_3,24(a2) | ||
1377 | mflo c_1 | ||
1378 | mfhi c_2 | ||
1379 | sd c_1,0(a0) | ||
1380 | |||
1381 | dmultu a_0,b_1 /* mul_add_c(a[0],b[1],c2,c3,c1); */ | ||
1382 | mflo t_1 | ||
1383 | mfhi t_2 | ||
1384 | daddu c_2,t_1 | ||
1385 | sltu AT,c_2,t_1 | ||
1386 | daddu c_3,t_2,AT | ||
1387 | dmultu a_1,b_0 /* mul_add_c(a[1],b[0],c2,c3,c1); */ | ||
1388 | mflo t_1 | ||
1389 | mfhi t_2 | ||
1390 | daddu c_2,t_1 | ||
1391 | sltu AT,c_2,t_1 | ||
1392 | daddu t_2,AT | ||
1393 | daddu c_3,t_2 | ||
1394 | sltu c_1,c_3,t_2 | ||
1395 | sd c_2,8(a0) | ||
1396 | |||
1397 | dmultu a_2,b_0 /* mul_add_c(a[2],b[0],c3,c1,c2); */ | ||
1398 | mflo t_1 | ||
1399 | mfhi t_2 | ||
1400 | daddu c_3,t_1 | ||
1401 | sltu AT,c_3,t_1 | ||
1402 | daddu t_2,AT | ||
1403 | daddu c_1,t_2 | ||
1404 | dmultu a_1,b_1 /* mul_add_c(a[1],b[1],c3,c1,c2); */ | ||
1405 | mflo t_1 | ||
1406 | mfhi t_2 | ||
1407 | daddu c_3,t_1 | ||
1408 | sltu AT,c_3,t_1 | ||
1409 | daddu t_2,AT | ||
1410 | daddu c_1,t_2 | ||
1411 | sltu c_2,c_1,t_2 | ||
1412 | dmultu a_0,b_2 /* mul_add_c(a[0],b[2],c3,c1,c2); */ | ||
1413 | mflo t_1 | ||
1414 | mfhi t_2 | ||
1415 | daddu c_3,t_1 | ||
1416 | sltu AT,c_3,t_1 | ||
1417 | daddu t_2,AT | ||
1418 | daddu c_1,t_2 | ||
1419 | sltu AT,c_1,t_2 | ||
1420 | daddu c_2,AT | ||
1421 | sd c_3,16(a0) | ||
1422 | |||
1423 | dmultu a_0,b_3 /* mul_add_c(a[0],b[3],c1,c2,c3); */ | ||
1424 | mflo t_1 | ||
1425 | mfhi t_2 | ||
1426 | daddu c_1,t_1 | ||
1427 | sltu AT,c_1,t_1 | ||
1428 | daddu t_2,AT | ||
1429 | daddu c_2,t_2 | ||
1430 | dmultu a_1,b_2 /* mul_add_c(a[1],b[2],c1,c2,c3); */ | ||
1431 | mflo t_1 | ||
1432 | mfhi t_2 | ||
1433 | daddu c_1,t_1 | ||
1434 | sltu AT,c_1,t_1 | ||
1435 | daddu t_2,AT | ||
1436 | daddu c_2,t_2 | ||
1437 | sltu c_3,c_2,t_2 | ||
1438 | dmultu a_2,b_1 /* mul_add_c(a[2],b[1],c1,c2,c3); */ | ||
1439 | mflo t_1 | ||
1440 | mfhi t_2 | ||
1441 | daddu c_1,t_1 | ||
1442 | sltu AT,c_1,t_1 | ||
1443 | daddu t_2,AT | ||
1444 | daddu c_2,t_2 | ||
1445 | sltu AT,c_2,t_2 | ||
1446 | daddu c_3,AT | ||
1447 | dmultu a_3,b_0 /* mul_add_c(a[3],b[0],c1,c2,c3); */ | ||
1448 | mflo t_1 | ||
1449 | mfhi t_2 | ||
1450 | daddu c_1,t_1 | ||
1451 | sltu AT,c_1,t_1 | ||
1452 | daddu t_2,AT | ||
1453 | daddu c_2,t_2 | ||
1454 | sltu AT,c_2,t_2 | ||
1455 | daddu c_3,AT | ||
1456 | sd c_1,24(a0) | ||
1457 | |||
1458 | dmultu a_3,b_1 /* mul_add_c(a[3],b[1],c2,c3,c1); */ | ||
1459 | mflo t_1 | ||
1460 | mfhi t_2 | ||
1461 | daddu c_2,t_1 | ||
1462 | sltu AT,c_2,t_1 | ||
1463 | daddu t_2,AT | ||
1464 | daddu c_3,t_2 | ||
1465 | dmultu a_2,b_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */ | ||
1466 | mflo t_1 | ||
1467 | mfhi t_2 | ||
1468 | daddu c_2,t_1 | ||
1469 | sltu AT,c_2,t_1 | ||
1470 | daddu t_2,AT | ||
1471 | daddu c_3,t_2 | ||
1472 | sltu c_1,c_3,t_2 | ||
1473 | dmultu a_1,b_3 /* mul_add_c(a[1],b[3],c2,c3,c1); */ | ||
1474 | mflo t_1 | ||
1475 | mfhi t_2 | ||
1476 | daddu c_2,t_1 | ||
1477 | sltu AT,c_2,t_1 | ||
1478 | daddu t_2,AT | ||
1479 | daddu c_3,t_2 | ||
1480 | sltu AT,c_3,t_2 | ||
1481 | daddu c_1,AT | ||
1482 | sd c_2,32(a0) | ||
1483 | |||
1484 | dmultu a_2,b_3 /* mul_add_c(a[2],b[3],c3,c1,c2); */ | ||
1485 | mflo t_1 | ||
1486 | mfhi t_2 | ||
1487 | daddu c_3,t_1 | ||
1488 | sltu AT,c_3,t_1 | ||
1489 | daddu t_2,AT | ||
1490 | daddu c_1,t_2 | ||
1491 | dmultu a_3,b_2 /* mul_add_c(a[3],b[2],c3,c1,c2); */ | ||
1492 | mflo t_1 | ||
1493 | mfhi t_2 | ||
1494 | daddu c_3,t_1 | ||
1495 | sltu AT,c_3,t_1 | ||
1496 | daddu t_2,AT | ||
1497 | daddu c_1,t_2 | ||
1498 | sltu c_2,c_1,t_2 | ||
1499 | sd c_3,40(a0) | ||
1500 | |||
1501 | dmultu a_3,b_3 /* mul_add_c(a[3],b[3],c1,c2,c3); */ | ||
1502 | mflo t_1 | ||
1503 | mfhi t_2 | ||
1504 | daddu c_1,t_1 | ||
1505 | sltu AT,c_1,t_1 | ||
1506 | daddu t_2,AT | ||
1507 | daddu c_2,t_2 | ||
1508 | sd c_1,48(a0) | ||
1509 | sd c_2,56(a0) | ||
1510 | |||
1511 | jr ra | ||
1512 | END(bn_mul_comba4) | ||
1513 | |||
1514 | #undef a_4 | ||
1515 | #undef a_5 | ||
1516 | #undef a_6 | ||
1517 | #undef a_7 | ||
1518 | #define a_4 b_0 | ||
1519 | #define a_5 b_1 | ||
1520 | #define a_6 b_2 | ||
1521 | #define a_7 b_3 | ||
1522 | |||
1523 | .align 5 | ||
1524 | LEAF(bn_sqr_comba8) | ||
1525 | .set reorder | ||
1526 | ld a_0,0(a1) | ||
1527 | ld a_1,8(a1) | ||
1528 | ld a_2,16(a1) | ||
1529 | ld a_3,24(a1) | ||
1530 | |||
1531 | dmultu a_0,a_0 /* mul_add_c(a[0],b[0],c1,c2,c3); */ | ||
1532 | ld a_4,32(a1) | ||
1533 | ld a_5,40(a1) | ||
1534 | ld a_6,48(a1) | ||
1535 | ld a_7,56(a1) | ||
1536 | mflo c_1 | ||
1537 | mfhi c_2 | ||
1538 | sd c_1,0(a0) | ||
1539 | |||
1540 | dmultu a_0,a_1 /* mul_add_c2(a[0],b[1],c2,c3,c1); */ | ||
1541 | mflo t_1 | ||
1542 | mfhi t_2 | ||
1543 | daddu c_2,t_1 | ||
1544 | sltu AT,c_2,t_1 | ||
1545 | daddu c_3,t_2,AT | ||
1546 | daddu c_2,t_1 | ||
1547 | sltu AT,c_2,t_1 | ||
1548 | daddu t_2,AT | ||
1549 | daddu c_3,t_2 | ||
1550 | sltu c_1,c_3,t_2 | ||
1551 | sd c_2,8(a0) | ||
1552 | |||
1553 | dmultu a_2,a_0 /* mul_add_c2(a[2],b[0],c3,c1,c2); */ | ||
1554 | mflo t_1 | ||
1555 | mfhi t_2 | ||
1556 | daddu c_3,t_1 | ||
1557 | sltu AT,c_3,t_1 | ||
1558 | daddu a2,t_2,AT | ||
1559 | daddu c_1,a2 | ||
1560 | daddu c_3,t_1 | ||
1561 | sltu AT,c_3,t_1 | ||
1562 | daddu t_2,AT | ||
1563 | daddu c_1,t_2 | ||
1564 | sltu c_2,c_1,t_2 | ||
1565 | dmultu a_1,a_1 /* mul_add_c(a[1],b[1],c3,c1,c2); */ | ||
1566 | mflo t_1 | ||
1567 | mfhi t_2 | ||
1568 | daddu c_3,t_1 | ||
1569 | sltu AT,c_3,t_1 | ||
1570 | daddu t_2,AT | ||
1571 | daddu c_1,t_2 | ||
1572 | sltu AT,c_1,t_2 | ||
1573 | daddu c_2,AT | ||
1574 | sd c_3,16(a0) | ||
1575 | |||
1576 | dmultu a_0,a_3 /* mul_add_c2(a[0],b[3],c1,c2,c3); */ | ||
1577 | mflo t_1 | ||
1578 | mfhi t_2 | ||
1579 | daddu c_1,t_1 | ||
1580 | sltu AT,c_1,t_1 | ||
1581 | daddu a2,t_2,AT | ||
1582 | daddu c_2,a2 | ||
1583 | daddu c_1,t_1 | ||
1584 | sltu AT,c_1,t_1 | ||
1585 | daddu t_2,AT | ||
1586 | daddu c_2,t_2 | ||
1587 | sltu c_3,c_2,t_2 | ||
1588 | dmultu a_1,a_2 /* mul_add_c2(a[1],b[2],c1,c2,c3); */ | ||
1589 | mflo t_1 | ||
1590 | mfhi t_2 | ||
1591 | daddu c_1,t_1 | ||
1592 | sltu AT,c_1,t_1 | ||
1593 | daddu a2,t_2,AT | ||
1594 | daddu c_2,a2 | ||
1595 | sltu AT,c_2,a2 | ||
1596 | daddu c_3,AT | ||
1597 | daddu c_1,t_1 | ||
1598 | sltu AT,c_1,t_1 | ||
1599 | daddu t_2,AT | ||
1600 | daddu c_2,t_2 | ||
1601 | sltu AT,c_2,t_2 | ||
1602 | daddu c_3,AT | ||
1603 | sd c_1,24(a0) | ||
1604 | |||
1605 | dmultu a_4,a_0 /* mul_add_c2(a[4],b[0],c2,c3,c1); */ | ||
1606 | mflo t_1 | ||
1607 | mfhi t_2 | ||
1608 | daddu c_2,t_1 | ||
1609 | sltu AT,c_2,t_1 | ||
1610 | daddu a2,t_2,AT | ||
1611 | daddu c_3,a2 | ||
1612 | daddu c_2,t_1 | ||
1613 | sltu AT,c_2,t_1 | ||
1614 | daddu t_2,AT | ||
1615 | daddu c_3,t_2 | ||
1616 | sltu c_1,c_3,t_2 | ||
1617 | dmultu a_3,a_1 /* mul_add_c2(a[3],b[1],c2,c3,c1); */ | ||
1618 | mflo t_1 | ||
1619 | mfhi t_2 | ||
1620 | daddu c_2,t_1 | ||
1621 | sltu AT,c_2,t_1 | ||
1622 | daddu a2,t_2,AT | ||
1623 | daddu c_3,a2 | ||
1624 | sltu AT,c_3,a2 | ||
1625 | daddu c_1,AT | ||
1626 | daddu c_2,t_1 | ||
1627 | sltu AT,c_2,t_1 | ||
1628 | daddu t_2,AT | ||
1629 | daddu c_3,t_2 | ||
1630 | sltu AT,c_3,t_2 | ||
1631 | daddu c_1,AT | ||
1632 | dmultu a_2,a_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */ | ||
1633 | mflo t_1 | ||
1634 | mfhi t_2 | ||
1635 | daddu c_2,t_1 | ||
1636 | sltu AT,c_2,t_1 | ||
1637 | daddu t_2,AT | ||
1638 | daddu c_3,t_2 | ||
1639 | sltu AT,c_3,t_2 | ||
1640 | daddu c_1,AT | ||
1641 | sd c_2,32(a0) | ||
1642 | |||
1643 | dmultu a_0,a_5 /* mul_add_c2(a[0],b[5],c3,c1,c2); */ | ||
1644 | mflo t_1 | ||
1645 | mfhi t_2 | ||
1646 | daddu c_3,t_1 | ||
1647 | sltu AT,c_3,t_1 | ||
1648 | daddu a2,t_2,AT | ||
1649 | daddu c_1,a2 | ||
1650 | daddu c_3,t_1 | ||
1651 | sltu AT,c_3,t_1 | ||
1652 | daddu t_2,AT | ||
1653 | daddu c_1,t_2 | ||
1654 | sltu c_2,c_1,t_2 | ||
1655 | dmultu a_1,a_4 /* mul_add_c2(a[1],b[4],c3,c1,c2); */ | ||
1656 | mflo t_1 | ||
1657 | mfhi t_2 | ||
1658 | daddu c_3,t_1 | ||
1659 | sltu AT,c_3,t_1 | ||
1660 | daddu a2,t_2,AT | ||
1661 | daddu c_1,a2 | ||
1662 | sltu AT,c_1,a2 | ||
1663 | daddu c_2,AT | ||
1664 | daddu c_3,t_1 | ||
1665 | sltu AT,c_3,t_1 | ||
1666 | daddu t_2,AT | ||
1667 | daddu c_1,t_2 | ||
1668 | sltu AT,c_1,t_2 | ||
1669 | daddu c_2,AT | ||
1670 | dmultu a_2,a_3 /* mul_add_c2(a[2],b[3],c3,c1,c2); */ | ||
1671 | mflo t_1 | ||
1672 | mfhi t_2 | ||
1673 | daddu c_3,t_1 | ||
1674 | sltu AT,c_3,t_1 | ||
1675 | daddu a2,t_2,AT | ||
1676 | daddu c_1,a2 | ||
1677 | sltu AT,c_1,a2 | ||
1678 | daddu c_2,AT | ||
1679 | daddu c_3,t_1 | ||
1680 | sltu AT,c_3,t_1 | ||
1681 | daddu t_2,AT | ||
1682 | daddu c_1,t_2 | ||
1683 | sltu AT,c_1,t_2 | ||
1684 | daddu c_2,AT | ||
1685 | sd c_3,40(a0) | ||
1686 | |||
1687 | dmultu a_6,a_0 /* mul_add_c2(a[6],b[0],c1,c2,c3); */ | ||
1688 | mflo t_1 | ||
1689 | mfhi t_2 | ||
1690 | daddu c_1,t_1 | ||
1691 | sltu AT,c_1,t_1 | ||
1692 | daddu a2,t_2,AT | ||
1693 | daddu c_2,a2 | ||
1694 | daddu c_1,t_1 | ||
1695 | sltu AT,c_1,t_1 | ||
1696 | daddu t_2,AT | ||
1697 | daddu c_2,t_2 | ||
1698 | sltu c_3,c_2,t_2 | ||
1699 | dmultu a_5,a_1 /* mul_add_c2(a[5],b[1],c1,c2,c3); */ | ||
1700 | mflo t_1 | ||
1701 | mfhi t_2 | ||
1702 | daddu c_1,t_1 | ||
1703 | sltu AT,c_1,t_1 | ||
1704 | daddu a2,t_2,AT | ||
1705 | daddu c_2,a2 | ||
1706 | sltu AT,c_2,a2 | ||
1707 | daddu c_3,AT | ||
1708 | daddu c_1,t_1 | ||
1709 | sltu AT,c_1,t_1 | ||
1710 | daddu t_2,AT | ||
1711 | daddu c_2,t_2 | ||
1712 | sltu AT,c_2,t_2 | ||
1713 | daddu c_3,AT | ||
1714 | dmultu a_4,a_2 /* mul_add_c2(a[4],b[2],c1,c2,c3); */ | ||
1715 | mflo t_1 | ||
1716 | mfhi t_2 | ||
1717 | daddu c_1,t_1 | ||
1718 | sltu AT,c_1,t_1 | ||
1719 | daddu a2,t_2,AT | ||
1720 | daddu c_2,a2 | ||
1721 | sltu AT,c_2,a2 | ||
1722 | daddu c_3,AT | ||
1723 | daddu c_1,t_1 | ||
1724 | sltu AT,c_1,t_1 | ||
1725 | daddu t_2,AT | ||
1726 | daddu c_2,t_2 | ||
1727 | sltu AT,c_2,t_2 | ||
1728 | daddu c_3,AT | ||
1729 | dmultu a_3,a_3 /* mul_add_c(a[3],b[3],c1,c2,c3); */ | ||
1730 | mflo t_1 | ||
1731 | mfhi t_2 | ||
1732 | daddu c_1,t_1 | ||
1733 | sltu AT,c_1,t_1 | ||
1734 | daddu t_2,AT | ||
1735 | daddu c_2,t_2 | ||
1736 | sltu AT,c_2,t_2 | ||
1737 | daddu c_3,AT | ||
1738 | sd c_1,48(a0) | ||
1739 | |||
1740 | dmultu a_0,a_7 /* mul_add_c2(a[0],b[7],c2,c3,c1); */ | ||
1741 | mflo t_1 | ||
1742 | mfhi t_2 | ||
1743 | daddu c_2,t_1 | ||
1744 | sltu AT,c_2,t_1 | ||
1745 | daddu a2,t_2,AT | ||
1746 | daddu c_3,a2 | ||
1747 | daddu c_2,t_1 | ||
1748 | sltu AT,c_2,t_1 | ||
1749 | daddu t_2,AT | ||
1750 | daddu c_3,t_2 | ||
1751 | sltu c_1,c_3,t_2 | ||
1752 | dmultu a_1,a_6 /* mul_add_c2(a[1],b[6],c2,c3,c1); */ | ||
1753 | mflo t_1 | ||
1754 | mfhi t_2 | ||
1755 | daddu c_2,t_1 | ||
1756 | sltu AT,c_2,t_1 | ||
1757 | daddu a2,t_2,AT | ||
1758 | daddu c_3,a2 | ||
1759 | sltu AT,c_3,a2 | ||
1760 | daddu c_1,AT | ||
1761 | daddu c_2,t_1 | ||
1762 | sltu AT,c_2,t_1 | ||
1763 | daddu t_2,AT | ||
1764 | daddu c_3,t_2 | ||
1765 | sltu AT,c_3,t_2 | ||
1766 | daddu c_1,AT | ||
1767 | dmultu a_2,a_5 /* mul_add_c2(a[2],b[5],c2,c3,c1); */ | ||
1768 | mflo t_1 | ||
1769 | mfhi t_2 | ||
1770 | daddu c_2,t_1 | ||
1771 | sltu AT,c_2,t_1 | ||
1772 | daddu a2,t_2,AT | ||
1773 | daddu c_3,a2 | ||
1774 | sltu AT,c_3,a2 | ||
1775 | daddu c_1,AT | ||
1776 | daddu c_2,t_1 | ||
1777 | sltu AT,c_2,t_1 | ||
1778 | daddu t_2,AT | ||
1779 | daddu c_3,t_2 | ||
1780 | sltu AT,c_3,t_2 | ||
1781 | daddu c_1,AT | ||
1782 | dmultu a_3,a_4 /* mul_add_c2(a[3],b[4],c2,c3,c1); */ | ||
1783 | mflo t_1 | ||
1784 | mfhi t_2 | ||
1785 | daddu c_2,t_1 | ||
1786 | sltu AT,c_2,t_1 | ||
1787 | daddu a2,t_2,AT | ||
1788 | daddu c_3,a2 | ||
1789 | sltu AT,c_3,a2 | ||
1790 | daddu c_1,AT | ||
1791 | daddu c_2,t_1 | ||
1792 | sltu AT,c_2,t_1 | ||
1793 | daddu t_2,AT | ||
1794 | daddu c_3,t_2 | ||
1795 | sltu AT,c_3,t_2 | ||
1796 | daddu c_1,AT | ||
1797 | sd c_2,56(a0) | ||
1798 | |||
1799 | dmultu a_7,a_1 /* mul_add_c2(a[7],b[1],c3,c1,c2); */ | ||
1800 | mflo t_1 | ||
1801 | mfhi t_2 | ||
1802 | daddu c_3,t_1 | ||
1803 | sltu AT,c_3,t_1 | ||
1804 | daddu a2,t_2,AT | ||
1805 | daddu c_1,a2 | ||
1806 | daddu c_3,t_1 | ||
1807 | sltu AT,c_3,t_1 | ||
1808 | daddu t_2,AT | ||
1809 | daddu c_1,t_2 | ||
1810 | sltu c_2,c_1,t_2 | ||
1811 | dmultu a_6,a_2 /* mul_add_c2(a[6],b[2],c3,c1,c2); */ | ||
1812 | mflo t_1 | ||
1813 | mfhi t_2 | ||
1814 | daddu c_3,t_1 | ||
1815 | sltu AT,c_3,t_1 | ||
1816 | daddu a2,t_2,AT | ||
1817 | daddu c_1,a2 | ||
1818 | sltu AT,c_1,a2 | ||
1819 | daddu c_2,AT | ||
1820 | daddu c_3,t_1 | ||
1821 | sltu AT,c_3,t_1 | ||
1822 | daddu t_2,AT | ||
1823 | daddu c_1,t_2 | ||
1824 | sltu AT,c_1,t_2 | ||
1825 | daddu c_2,AT | ||
1826 | dmultu a_5,a_3 /* mul_add_c2(a[5],b[3],c3,c1,c2); */ | ||
1827 | mflo t_1 | ||
1828 | mfhi t_2 | ||
1829 | daddu c_3,t_1 | ||
1830 | sltu AT,c_3,t_1 | ||
1831 | daddu a2,t_2,AT | ||
1832 | daddu c_1,a2 | ||
1833 | sltu AT,c_1,a2 | ||
1834 | daddu c_2,AT | ||
1835 | daddu c_3,t_1 | ||
1836 | sltu AT,c_3,t_1 | ||
1837 | daddu t_2,AT | ||
1838 | daddu c_1,t_2 | ||
1839 | sltu AT,c_1,t_2 | ||
1840 | daddu c_2,AT | ||
1841 | dmultu a_4,a_4 /* mul_add_c(a[4],b[4],c3,c1,c2); */ | ||
1842 | mflo t_1 | ||
1843 | mfhi t_2 | ||
1844 | daddu c_3,t_1 | ||
1845 | sltu AT,c_3,t_1 | ||
1846 | daddu t_2,AT | ||
1847 | daddu c_1,t_2 | ||
1848 | sltu AT,c_1,t_2 | ||
1849 | daddu c_2,AT | ||
1850 | sd c_3,64(a0) | ||
1851 | |||
1852 | dmultu a_2,a_7 /* mul_add_c2(a[2],b[7],c1,c2,c3); */ | ||
1853 | mflo t_1 | ||
1854 | mfhi t_2 | ||
1855 | daddu c_1,t_1 | ||
1856 | sltu AT,c_1,t_1 | ||
1857 | daddu a2,t_2,AT | ||
1858 | daddu c_2,a2 | ||
1859 | daddu c_1,t_1 | ||
1860 | sltu AT,c_1,t_1 | ||
1861 | daddu t_2,AT | ||
1862 | daddu c_2,t_2 | ||
1863 | sltu c_3,c_2,t_2 | ||
1864 | dmultu a_3,a_6 /* mul_add_c2(a[3],b[6],c1,c2,c3); */ | ||
1865 | mflo t_1 | ||
1866 | mfhi t_2 | ||
1867 | daddu c_1,t_1 | ||
1868 | sltu AT,c_1,t_1 | ||
1869 | daddu a2,t_2,AT | ||
1870 | daddu c_2,a2 | ||
1871 | sltu AT,c_2,a2 | ||
1872 | daddu c_3,AT | ||
1873 | daddu c_1,t_1 | ||
1874 | sltu AT,c_1,t_1 | ||
1875 | daddu t_2,AT | ||
1876 | daddu c_2,t_2 | ||
1877 | sltu AT,c_2,t_2 | ||
1878 | daddu c_3,AT | ||
1879 | dmultu a_4,a_5 /* mul_add_c2(a[4],b[5],c1,c2,c3); */ | ||
1880 | mflo t_1 | ||
1881 | mfhi t_2 | ||
1882 | daddu c_1,t_1 | ||
1883 | sltu AT,c_1,t_1 | ||
1884 | daddu a2,t_2,AT | ||
1885 | daddu c_2,a2 | ||
1886 | sltu AT,c_2,a2 | ||
1887 | daddu c_3,AT | ||
1888 | daddu c_1,t_1 | ||
1889 | sltu AT,c_1,t_1 | ||
1890 | daddu t_2,AT | ||
1891 | daddu c_2,t_2 | ||
1892 | sltu AT,c_2,t_2 | ||
1893 | daddu c_3,AT | ||
1894 | sd c_1,72(a0) | ||
1895 | |||
1896 | dmultu a_7,a_3 /* mul_add_c2(a[7],b[3],c2,c3,c1); */ | ||
1897 | mflo t_1 | ||
1898 | mfhi t_2 | ||
1899 | daddu c_2,t_1 | ||
1900 | sltu AT,c_2,t_1 | ||
1901 | daddu a2,t_2,AT | ||
1902 | daddu c_3,a2 | ||
1903 | daddu c_2,t_1 | ||
1904 | sltu AT,c_2,t_1 | ||
1905 | daddu t_2,AT | ||
1906 | daddu c_3,t_2 | ||
1907 | sltu c_1,c_3,t_2 | ||
1908 | dmultu a_6,a_4 /* mul_add_c2(a[6],b[4],c2,c3,c1); */ | ||
1909 | mflo t_1 | ||
1910 | mfhi t_2 | ||
1911 | daddu c_2,t_1 | ||
1912 | sltu AT,c_2,t_1 | ||
1913 | daddu a2,t_2,AT | ||
1914 | daddu c_3,a2 | ||
1915 | sltu AT,c_3,a2 | ||
1916 | daddu c_1,AT | ||
1917 | daddu c_2,t_1 | ||
1918 | sltu AT,c_2,t_1 | ||
1919 | daddu t_2,AT | ||
1920 | daddu c_3,t_2 | ||
1921 | sltu AT,c_3,t_2 | ||
1922 | daddu c_1,AT | ||
1923 | dmultu a_5,a_5 /* mul_add_c(a[5],b[5],c2,c3,c1); */ | ||
1924 | mflo t_1 | ||
1925 | mfhi t_2 | ||
1926 | daddu c_2,t_1 | ||
1927 | sltu AT,c_2,t_1 | ||
1928 | daddu t_2,AT | ||
1929 | daddu c_3,t_2 | ||
1930 | sltu AT,c_3,t_2 | ||
1931 | daddu c_1,AT | ||
1932 | sd c_2,80(a0) | ||
1933 | |||
1934 | dmultu a_4,a_7 /* mul_add_c2(a[4],b[7],c3,c1,c2); */ | ||
1935 | mflo t_1 | ||
1936 | mfhi t_2 | ||
1937 | daddu c_3,t_1 | ||
1938 | sltu AT,c_3,t_1 | ||
1939 | daddu a2,t_2,AT | ||
1940 | daddu c_1,a2 | ||
1941 | daddu c_3,t_1 | ||
1942 | sltu AT,c_3,t_1 | ||
1943 | daddu t_2,AT | ||
1944 | daddu c_1,t_2 | ||
1945 | sltu c_2,c_1,t_2 | ||
1946 | dmultu a_5,a_6 /* mul_add_c2(a[5],b[6],c3,c1,c2); */ | ||
1947 | mflo t_1 | ||
1948 | mfhi t_2 | ||
1949 | daddu c_3,t_1 | ||
1950 | sltu AT,c_3,t_1 | ||
1951 | daddu a2,t_2,AT | ||
1952 | daddu c_1,a2 | ||
1953 | sltu AT,c_1,a2 | ||
1954 | daddu c_2,AT | ||
1955 | daddu c_3,t_1 | ||
1956 | sltu AT,c_3,t_1 | ||
1957 | daddu t_2,AT | ||
1958 | daddu c_1,t_2 | ||
1959 | sltu AT,c_1,t_2 | ||
1960 | daddu c_2,AT | ||
1961 | sd c_3,88(a0) | ||
1962 | |||
1963 | dmultu a_7,a_5 /* mul_add_c2(a[7],b[5],c1,c2,c3); */ | ||
1964 | mflo t_1 | ||
1965 | mfhi t_2 | ||
1966 | daddu c_1,t_1 | ||
1967 | sltu AT,c_1,t_1 | ||
1968 | daddu a2,t_2,AT | ||
1969 | daddu c_2,a2 | ||
1970 | daddu c_1,t_1 | ||
1971 | sltu AT,c_1,t_1 | ||
1972 | daddu t_2,AT | ||
1973 | daddu c_2,t_2 | ||
1974 | sltu c_3,c_2,t_2 | ||
1975 | dmultu a_6,a_6 /* mul_add_c(a[6],b[6],c1,c2,c3); */ | ||
1976 | mflo t_1 | ||
1977 | mfhi t_2 | ||
1978 | daddu c_1,t_1 | ||
1979 | sltu AT,c_1,t_1 | ||
1980 | daddu t_2,AT | ||
1981 | daddu c_2,t_2 | ||
1982 | sltu AT,c_2,t_2 | ||
1983 | daddu c_3,AT | ||
1984 | sd c_1,96(a0) | ||
1985 | |||
1986 | dmultu a_6,a_7 /* mul_add_c2(a[6],b[7],c2,c3,c1); */ | ||
1987 | mflo t_1 | ||
1988 | mfhi t_2 | ||
1989 | daddu c_2,t_1 | ||
1990 | sltu AT,c_2,t_1 | ||
1991 | daddu a2,t_2,AT | ||
1992 | daddu c_3,a2 | ||
1993 | daddu c_2,t_1 | ||
1994 | sltu AT,c_2,t_1 | ||
1995 | daddu t_2,AT | ||
1996 | daddu c_3,t_2 | ||
1997 | sltu c_1,c_3,t_2 | ||
1998 | sd c_2,104(a0) | ||
1999 | |||
2000 | dmultu a_7,a_7 /* mul_add_c(a[7],b[7],c3,c1,c2); */ | ||
2001 | mflo t_1 | ||
2002 | mfhi t_2 | ||
2003 | daddu c_3,t_1 | ||
2004 | sltu AT,c_3,t_1 | ||
2005 | daddu t_2,AT | ||
2006 | daddu c_1,t_2 | ||
2007 | sd c_3,112(a0) | ||
2008 | sd c_1,120(a0) | ||
2009 | |||
2010 | jr ra | ||
2011 | END(bn_sqr_comba8) | ||
2012 | |||
2013 | .align 5 | ||
2014 | LEAF(bn_sqr_comba4) | ||
2015 | .set reorder | ||
2016 | ld a_0,0(a1) | ||
2017 | ld a_1,8(a1) | ||
2018 | ld a_2,16(a1) | ||
2019 | ld a_3,24(a1) | ||
2020 | dmultu a_0,a_0 /* mul_add_c(a[0],b[0],c1,c2,c3); */ | ||
2021 | mflo c_1 | ||
2022 | mfhi c_2 | ||
2023 | sd c_1,0(a0) | ||
2024 | |||
2025 | dmultu a_0,a_1 /* mul_add_c2(a[0],b[1],c2,c3,c1); */ | ||
2026 | mflo t_1 | ||
2027 | mfhi t_2 | ||
2028 | daddu c_2,t_1 | ||
2029 | sltu AT,c_2,t_1 | ||
2030 | daddu c_3,t_2,AT | ||
2031 | daddu c_2,t_1 | ||
2032 | sltu AT,c_2,t_1 | ||
2033 | daddu t_2,AT | ||
2034 | daddu c_3,t_2 | ||
2035 | sltu c_1,c_3,t_2 | ||
2036 | sd c_2,8(a0) | ||
2037 | |||
2038 | dmultu a_2,a_0 /* mul_add_c2(a[2],b[0],c3,c1,c2); */ | ||
2039 | mflo t_1 | ||
2040 | mfhi t_2 | ||
2041 | daddu c_3,t_1 | ||
2042 | sltu AT,c_3,t_1 | ||
2043 | daddu a2,t_2,AT | ||
2044 | daddu c_1,a2 | ||
2045 | daddu c_3,t_1 | ||
2046 | sltu AT,c_3,t_1 | ||
2047 | daddu t_2,AT | ||
2048 | daddu c_1,t_2 | ||
2049 | sltu c_2,c_1,t_2 | ||
2050 | dmultu a_1,a_1 /* mul_add_c(a[1],b[1],c3,c1,c2); */ | ||
2051 | mflo t_1 | ||
2052 | mfhi t_2 | ||
2053 | daddu c_3,t_1 | ||
2054 | sltu AT,c_3,t_1 | ||
2055 | daddu t_2,AT | ||
2056 | daddu c_1,t_2 | ||
2057 | sltu AT,c_1,t_2 | ||
2058 | daddu c_2,AT | ||
2059 | sd c_3,16(a0) | ||
2060 | |||
2061 | dmultu a_0,a_3 /* mul_add_c2(a[0],b[3],c1,c2,c3); */ | ||
2062 | mflo t_1 | ||
2063 | mfhi t_2 | ||
2064 | daddu c_1,t_1 | ||
2065 | sltu AT,c_1,t_1 | ||
2066 | daddu a2,t_2,AT | ||
2067 | daddu c_2,a2 | ||
2068 | daddu c_1,t_1 | ||
2069 | sltu AT,c_1,t_1 | ||
2070 | daddu t_2,AT | ||
2071 | daddu c_2,t_2 | ||
2072 | sltu c_3,c_2,t_2 | ||
2073 | dmultu a_1,a_2 /* mul_add_c(a2[1],b[2],c1,c2,c3); */ | ||
2074 | mflo t_1 | ||
2075 | mfhi t_2 | ||
2076 | daddu c_1,t_1 | ||
2077 | sltu AT,c_1,t_1 | ||
2078 | daddu a2,t_2,AT | ||
2079 | daddu c_2,a2 | ||
2080 | sltu AT,c_2,a2 | ||
2081 | daddu c_3,AT | ||
2082 | daddu c_1,t_1 | ||
2083 | sltu AT,c_1,t_1 | ||
2084 | daddu t_2,AT | ||
2085 | daddu c_2,t_2 | ||
2086 | sltu AT,c_2,t_2 | ||
2087 | daddu c_3,AT | ||
2088 | sd c_1,24(a0) | ||
2089 | |||
2090 | dmultu a_3,a_1 /* mul_add_c2(a[3],b[1],c2,c3,c1); */ | ||
2091 | mflo t_1 | ||
2092 | mfhi t_2 | ||
2093 | daddu c_2,t_1 | ||
2094 | sltu AT,c_2,t_1 | ||
2095 | daddu a2,t_2,AT | ||
2096 | daddu c_3,a2 | ||
2097 | daddu c_2,t_1 | ||
2098 | sltu AT,c_2,t_1 | ||
2099 | daddu t_2,AT | ||
2100 | daddu c_3,t_2 | ||
2101 | sltu c_1,c_3,t_2 | ||
2102 | dmultu a_2,a_2 /* mul_add_c(a[2],b[2],c2,c3,c1); */ | ||
2103 | mflo t_1 | ||
2104 | mfhi t_2 | ||
2105 | daddu c_2,t_1 | ||
2106 | sltu AT,c_2,t_1 | ||
2107 | daddu t_2,AT | ||
2108 | daddu c_3,t_2 | ||
2109 | sltu AT,c_3,t_2 | ||
2110 | daddu c_1,AT | ||
2111 | sd c_2,32(a0) | ||
2112 | |||
2113 | dmultu a_2,a_3 /* mul_add_c2(a[2],b[3],c3,c1,c2); */ | ||
2114 | mflo t_1 | ||
2115 | mfhi t_2 | ||
2116 | daddu c_3,t_1 | ||
2117 | sltu AT,c_3,t_1 | ||
2118 | daddu a2,t_2,AT | ||
2119 | daddu c_1,a2 | ||
2120 | daddu c_3,t_1 | ||
2121 | sltu AT,c_3,t_1 | ||
2122 | daddu t_2,AT | ||
2123 | daddu c_1,t_2 | ||
2124 | sltu c_2,c_1,t_2 | ||
2125 | sd c_3,40(a0) | ||
2126 | |||
2127 | dmultu a_3,a_3 /* mul_add_c(a[3],b[3],c1,c2,c3); */ | ||
2128 | mflo t_1 | ||
2129 | mfhi t_2 | ||
2130 | daddu c_1,t_1 | ||
2131 | sltu AT,c_1,t_1 | ||
2132 | daddu t_2,AT | ||
2133 | daddu c_2,t_2 | ||
2134 | sd c_1,48(a0) | ||
2135 | sd c_2,56(a0) | ||
2136 | |||
2137 | jr ra | ||
2138 | END(bn_sqr_comba4) | ||
diff --git a/src/lib/libcrypto/bn/asm/sparc.s b/src/lib/libcrypto/bn/asm/sparc.s deleted file mode 100644 index f9e533caa8..0000000000 --- a/src/lib/libcrypto/bn/asm/sparc.s +++ /dev/null | |||
@@ -1,462 +0,0 @@ | |||
1 | .file "bn_mulw.c" | ||
2 | gcc2_compiled.: | ||
3 | .section ".text" | ||
4 | .align 4 | ||
5 | .global bn_mul_add_words | ||
6 | .type bn_mul_add_words,#function | ||
7 | .proc 016 | ||
8 | bn_mul_add_words: | ||
9 | !#PROLOGUE# 0 | ||
10 | save %sp,-112,%sp | ||
11 | !#PROLOGUE# 1 | ||
12 | mov %i0,%o0 | ||
13 | mov %i1,%o2 | ||
14 | mov %i2,%g1 | ||
15 | mov %i3,%o1 | ||
16 | mov 0,%i4 | ||
17 | add %o0,12,%g4 | ||
18 | add %o2,12,%o7 | ||
19 | .LL2: | ||
20 | mov %i4,%i3 | ||
21 | mov 0,%i2 | ||
22 | ld [%o0],%g2 | ||
23 | mov %g2,%i1 | ||
24 | ld [%o2],%g2 | ||
25 | mov 0,%i0 | ||
26 | umul %o1,%g2,%g3 | ||
27 | rd %y,%g2 | ||
28 | addcc %g3,%i1,%g3 | ||
29 | addx %g2,%i0,%g2 | ||
30 | addcc %g3,%i3,%g3 | ||
31 | addx %g2,%i2,%g2 | ||
32 | st %g3,[%o0] | ||
33 | mov %g2,%i5 | ||
34 | mov 0,%i4 | ||
35 | addcc %g1,-1,%g1 | ||
36 | be .LL3 | ||
37 | mov %i5,%i4 | ||
38 | mov %i4,%i3 | ||
39 | mov 0,%i2 | ||
40 | ld [%g4-8],%g2 | ||
41 | mov %g2,%i1 | ||
42 | ld [%o7-8],%g2 | ||
43 | mov 0,%i0 | ||
44 | umul %o1,%g2,%g3 | ||
45 | rd %y,%g2 | ||
46 | addcc %g3,%i1,%g3 | ||
47 | addx %g2,%i0,%g2 | ||
48 | addcc %g3,%i3,%g3 | ||
49 | addx %g2,%i2,%g2 | ||
50 | st %g3,[%g4-8] | ||
51 | mov %g2,%i5 | ||
52 | mov 0,%i4 | ||
53 | addcc %g1,-1,%g1 | ||
54 | be .LL3 | ||
55 | mov %i5,%i4 | ||
56 | mov %i4,%i3 | ||
57 | mov 0,%i2 | ||
58 | ld [%g4-4],%g2 | ||
59 | mov %g2,%i1 | ||
60 | ld [%o7-4],%g2 | ||
61 | mov 0,%i0 | ||
62 | umul %o1,%g2,%g3 | ||
63 | rd %y,%g2 | ||
64 | addcc %g3,%i1,%g3 | ||
65 | addx %g2,%i0,%g2 | ||
66 | addcc %g3,%i3,%g3 | ||
67 | addx %g2,%i2,%g2 | ||
68 | st %g3,[%g4-4] | ||
69 | mov %g2,%i5 | ||
70 | mov 0,%i4 | ||
71 | addcc %g1,-1,%g1 | ||
72 | be .LL3 | ||
73 | mov %i5,%i4 | ||
74 | mov %i4,%i3 | ||
75 | mov 0,%i2 | ||
76 | ld [%g4],%g2 | ||
77 | mov %g2,%i1 | ||
78 | ld [%o7],%g2 | ||
79 | mov 0,%i0 | ||
80 | umul %o1,%g2,%g3 | ||
81 | rd %y,%g2 | ||
82 | addcc %g3,%i1,%g3 | ||
83 | addx %g2,%i0,%g2 | ||
84 | addcc %g3,%i3,%g3 | ||
85 | addx %g2,%i2,%g2 | ||
86 | st %g3,[%g4] | ||
87 | mov %g2,%i5 | ||
88 | mov 0,%i4 | ||
89 | addcc %g1,-1,%g1 | ||
90 | be .LL3 | ||
91 | mov %i5,%i4 | ||
92 | add %o7,16,%o7 | ||
93 | add %o2,16,%o2 | ||
94 | add %g4,16,%g4 | ||
95 | b .LL2 | ||
96 | add %o0,16,%o0 | ||
97 | .LL3: | ||
98 | ret | ||
99 | restore %g0,%i4,%o0 | ||
100 | .LLfe1: | ||
101 | .size bn_mul_add_words,.LLfe1-bn_mul_add_words | ||
102 | .align 4 | ||
103 | .global bn_mul_words | ||
104 | .type bn_mul_words,#function | ||
105 | .proc 016 | ||
106 | bn_mul_words: | ||
107 | !#PROLOGUE# 0 | ||
108 | save %sp,-112,%sp | ||
109 | !#PROLOGUE# 1 | ||
110 | mov %i0,%o7 | ||
111 | mov %i1,%o0 | ||
112 | mov %i2,%i4 | ||
113 | mov %i3,%g4 | ||
114 | mov 0,%i0 | ||
115 | add %o7,12,%g1 | ||
116 | add %o0,12,%i5 | ||
117 | .LL18: | ||
118 | mov %i0,%g3 | ||
119 | mov 0,%g2 | ||
120 | ld [%o0],%i2 | ||
121 | umul %g4,%i2,%i3 | ||
122 | rd %y,%i2 | ||
123 | addcc %i3,%g3,%i3 | ||
124 | addx %i2,%g2,%i2 | ||
125 | st %i3,[%o7] | ||
126 | mov %i2,%i1 | ||
127 | mov 0,%i0 | ||
128 | addcc %i4,-1,%i4 | ||
129 | be .LL19 | ||
130 | mov %i1,%i0 | ||
131 | mov %i0,%g3 | ||
132 | mov 0,%g2 | ||
133 | ld [%i5-8],%i2 | ||
134 | umul %g4,%i2,%i3 | ||
135 | rd %y,%i2 | ||
136 | addcc %i3,%g3,%i3 | ||
137 | addx %i2,%g2,%i2 | ||
138 | st %i3,[%g1-8] | ||
139 | mov %i2,%i1 | ||
140 | mov 0,%i0 | ||
141 | addcc %i4,-1,%i4 | ||
142 | be .LL19 | ||
143 | mov %i1,%i0 | ||
144 | mov %i0,%g3 | ||
145 | mov 0,%g2 | ||
146 | ld [%i5-4],%i2 | ||
147 | umul %g4,%i2,%i3 | ||
148 | rd %y,%i2 | ||
149 | addcc %i3,%g3,%i3 | ||
150 | addx %i2,%g2,%i2 | ||
151 | st %i3,[%g1-4] | ||
152 | mov %i2,%i1 | ||
153 | mov 0,%i0 | ||
154 | addcc %i4,-1,%i4 | ||
155 | be .LL19 | ||
156 | mov %i1,%i0 | ||
157 | mov %i0,%g3 | ||
158 | mov 0,%g2 | ||
159 | ld [%i5],%i2 | ||
160 | umul %g4,%i2,%i3 | ||
161 | rd %y,%i2 | ||
162 | addcc %i3,%g3,%i3 | ||
163 | addx %i2,%g2,%i2 | ||
164 | st %i3,[%g1] | ||
165 | mov %i2,%i1 | ||
166 | mov 0,%i0 | ||
167 | addcc %i4,-1,%i4 | ||
168 | be .LL19 | ||
169 | mov %i1,%i0 | ||
170 | add %i5,16,%i5 | ||
171 | add %o0,16,%o0 | ||
172 | add %g1,16,%g1 | ||
173 | b .LL18 | ||
174 | add %o7,16,%o7 | ||
175 | .LL19: | ||
176 | ret | ||
177 | restore | ||
178 | .LLfe2: | ||
179 | .size bn_mul_words,.LLfe2-bn_mul_words | ||
180 | .align 4 | ||
181 | .global bn_sqr_words | ||
182 | .type bn_sqr_words,#function | ||
183 | .proc 020 | ||
184 | bn_sqr_words: | ||
185 | !#PROLOGUE# 0 | ||
186 | !#PROLOGUE# 1 | ||
187 | mov %o0,%g4 | ||
188 | add %g4,28,%o3 | ||
189 | add %o1,12,%g1 | ||
190 | .LL34: | ||
191 | ld [%o1],%o0 | ||
192 | addcc %o2,-1,%o2 | ||
193 | umul %o0,%o0,%o5 | ||
194 | rd %y,%o4 | ||
195 | st %o5,[%g4] | ||
196 | mov %o4,%g3 | ||
197 | mov 0,%g2 | ||
198 | be .LL35 | ||
199 | st %g3,[%o3-24] | ||
200 | ld [%g1-8],%o0 | ||
201 | addcc %o2,-1,%o2 | ||
202 | umul %o0,%o0,%o5 | ||
203 | rd %y,%o4 | ||
204 | st %o5,[%o3-20] | ||
205 | mov %o4,%g3 | ||
206 | mov 0,%g2 | ||
207 | be .LL35 | ||
208 | st %g3,[%o3-16] | ||
209 | ld [%g1-4],%o0 | ||
210 | addcc %o2,-1,%o2 | ||
211 | umul %o0,%o0,%o5 | ||
212 | rd %y,%o4 | ||
213 | st %o5,[%o3-12] | ||
214 | mov %o4,%g3 | ||
215 | mov 0,%g2 | ||
216 | be .LL35 | ||
217 | st %g3,[%o3-8] | ||
218 | ld [%g1],%o0 | ||
219 | addcc %o2,-1,%o2 | ||
220 | umul %o0,%o0,%o5 | ||
221 | rd %y,%o4 | ||
222 | st %o5,[%o3-4] | ||
223 | mov %o4,%g3 | ||
224 | mov 0,%g2 | ||
225 | be .LL35 | ||
226 | st %g3,[%o3] | ||
227 | add %g1,16,%g1 | ||
228 | add %o1,16,%o1 | ||
229 | add %o3,32,%o3 | ||
230 | b .LL34 | ||
231 | add %g4,32,%g4 | ||
232 | .LL35: | ||
233 | retl | ||
234 | nop | ||
235 | .LLfe3: | ||
236 | .size bn_sqr_words,.LLfe3-bn_sqr_words | ||
237 | .align 4 | ||
238 | .global bn_add_words | ||
239 | .type bn_add_words,#function | ||
240 | .proc 016 | ||
241 | bn_add_words: | ||
242 | !#PROLOGUE# 0 | ||
243 | save %sp,-112,%sp | ||
244 | !#PROLOGUE# 1 | ||
245 | mov %i0,%o2 | ||
246 | mov %i1,%o3 | ||
247 | mov %i2,%o4 | ||
248 | mov %i3,%i5 | ||
249 | mov 0,%o0 | ||
250 | mov 0,%o1 | ||
251 | add %o2,12,%o7 | ||
252 | add %o4,12,%g4 | ||
253 | b .LL42 | ||
254 | add %o3,12,%g1 | ||
255 | .LL45: | ||
256 | add %i5,-1,%i5 | ||
257 | mov %i4,%g3 | ||
258 | ld [%g4-8],%i4 | ||
259 | mov 0,%g2 | ||
260 | mov %i4,%i1 | ||
261 | mov 0,%i0 | ||
262 | addcc %g3,%i1,%g3 | ||
263 | addx %g2,%i0,%g2 | ||
264 | addcc %o1,%g3,%o1 | ||
265 | addx %o0,%g2,%o0 | ||
266 | st %o1,[%o7-8] | ||
267 | mov %o0,%i3 | ||
268 | mov 0,%i2 | ||
269 | mov %i2,%o0 | ||
270 | mov %i3,%o1 | ||
271 | cmp %i5,0 | ||
272 | ble .LL43 | ||
273 | add %i5,-1,%i5 | ||
274 | ld [%g1-4],%i4 | ||
275 | mov %i4,%g3 | ||
276 | ld [%g4-4],%i4 | ||
277 | mov 0,%g2 | ||
278 | mov %i4,%i1 | ||
279 | mov 0,%i0 | ||
280 | addcc %g3,%i1,%g3 | ||
281 | addx %g2,%i0,%g2 | ||
282 | addcc %o1,%g3,%o1 | ||
283 | addx %o0,%g2,%o0 | ||
284 | st %o1,[%o7-4] | ||
285 | mov %o0,%i3 | ||
286 | mov 0,%i2 | ||
287 | mov %i2,%o0 | ||
288 | mov %i3,%o1 | ||
289 | cmp %i5,0 | ||
290 | ble .LL43 | ||
291 | add %i5,-1,%i5 | ||
292 | ld [%g1],%i4 | ||
293 | mov %i4,%g3 | ||
294 | ld [%g4],%i4 | ||
295 | mov 0,%g2 | ||
296 | mov %i4,%i1 | ||
297 | mov 0,%i0 | ||
298 | addcc %g3,%i1,%g3 | ||
299 | addx %g2,%i0,%g2 | ||
300 | addcc %o1,%g3,%o1 | ||
301 | addx %o0,%g2,%o0 | ||
302 | st %o1,[%o7] | ||
303 | mov %o0,%i3 | ||
304 | mov 0,%i2 | ||
305 | mov %i2,%o0 | ||
306 | mov %i3,%o1 | ||
307 | cmp %i5,0 | ||
308 | ble .LL43 | ||
309 | add %g1,16,%g1 | ||
310 | add %o3,16,%o3 | ||
311 | add %g4,16,%g4 | ||
312 | add %o4,16,%o4 | ||
313 | add %o7,16,%o7 | ||
314 | add %o2,16,%o2 | ||
315 | .LL42: | ||
316 | ld [%o3],%i4 | ||
317 | add %i5,-1,%i5 | ||
318 | mov %i4,%g3 | ||
319 | ld [%o4],%i4 | ||
320 | mov 0,%g2 | ||
321 | mov %i4,%i1 | ||
322 | mov 0,%i0 | ||
323 | addcc %g3,%i1,%g3 | ||
324 | addx %g2,%i0,%g2 | ||
325 | addcc %o1,%g3,%o1 | ||
326 | addx %o0,%g2,%o0 | ||
327 | st %o1,[%o2] | ||
328 | mov %o0,%i3 | ||
329 | mov 0,%i2 | ||
330 | mov %i2,%o0 | ||
331 | mov %i3,%o1 | ||
332 | cmp %i5,0 | ||
333 | bg,a .LL45 | ||
334 | ld [%g1-8],%i4 | ||
335 | .LL43: | ||
336 | ret | ||
337 | restore %g0,%o1,%o0 | ||
338 | .LLfe4: | ||
339 | .size bn_add_words,.LLfe4-bn_add_words | ||
340 | .section ".rodata" | ||
341 | .align 8 | ||
342 | .LLC0: | ||
343 | .asciz "Division would overflow (%d)\n" | ||
344 | .section ".text" | ||
345 | .align 4 | ||
346 | .global bn_div64 | ||
347 | .type bn_div64,#function | ||
348 | .proc 016 | ||
349 | bn_div64: | ||
350 | !#PROLOGUE# 0 | ||
351 | save %sp,-112,%sp | ||
352 | !#PROLOGUE# 1 | ||
353 | mov 0,%l1 | ||
354 | cmp %i2,0 | ||
355 | bne .LL51 | ||
356 | mov 2,%l0 | ||
357 | b .LL68 | ||
358 | mov -1,%i0 | ||
359 | .LL51: | ||
360 | call BN_num_bits_word,0 | ||
361 | mov %i2,%o0 | ||
362 | mov %o0,%o2 | ||
363 | cmp %o2,32 | ||
364 | be .LL52 | ||
365 | mov 1,%o0 | ||
366 | sll %o0,%o2,%o0 | ||
367 | cmp %i0,%o0 | ||
368 | bleu .LL69 | ||
369 | mov 32,%o0 | ||
370 | sethi %hi(__iob+32),%o0 | ||
371 | or %o0,%lo(__iob+32),%o0 | ||
372 | sethi %hi(.LLC0),%o1 | ||
373 | call fprintf,0 | ||
374 | or %o1,%lo(.LLC0),%o1 | ||
375 | call abort,0 | ||
376 | nop | ||
377 | .LL52: | ||
378 | mov 32,%o0 | ||
379 | .LL69: | ||
380 | cmp %i0,%i2 | ||
381 | blu .LL53 | ||
382 | sub %o0,%o2,%o2 | ||
383 | sub %i0,%i2,%i0 | ||
384 | .LL53: | ||
385 | cmp %o2,0 | ||
386 | be .LL54 | ||
387 | sll %i0,%o2,%o1 | ||
388 | sll %i2,%o2,%i2 | ||
389 | sub %o0,%o2,%o0 | ||
390 | srl %i1,%o0,%o0 | ||
391 | or %o1,%o0,%i0 | ||
392 | sll %i1,%o2,%i1 | ||
393 | .LL54: | ||
394 | srl %i2,16,%g2 | ||
395 | sethi %hi(65535),%o0 | ||
396 | or %o0,%lo(65535),%o1 | ||
397 | and %i2,%o1,%g3 | ||
398 | mov %o0,%g4 | ||
399 | sethi %hi(-65536),%o7 | ||
400 | mov %o1,%g1 | ||
401 | .LL55: | ||
402 | srl %i0,16,%o0 | ||
403 | cmp %o0,%g2 | ||
404 | be .LL59 | ||
405 | or %g4,%lo(65535),%o3 | ||
406 | wr %g0,%g0,%y | ||
407 | nop | ||
408 | nop | ||
409 | nop | ||
410 | udiv %i0,%g2,%o3 | ||
411 | .LL59: | ||
412 | and %i1,%o7,%o0 | ||
413 | srl %o0,16,%o5 | ||
414 | smul %o3,%g3,%o4 | ||
415 | smul %o3,%g2,%o2 | ||
416 | .LL60: | ||
417 | sub %i0,%o2,%o1 | ||
418 | andcc %o1,%o7,%g0 | ||
419 | bne .LL61 | ||
420 | sll %o1,16,%o0 | ||
421 | add %o0,%o5,%o0 | ||
422 | cmp %o4,%o0 | ||
423 | bleu .LL61 | ||
424 | sub %o4,%g3,%o4 | ||
425 | sub %o2,%g2,%o2 | ||
426 | b .LL60 | ||
427 | add %o3,-1,%o3 | ||
428 | .LL61: | ||
429 | smul %o3,%g2,%o2 | ||
430 | smul %o3,%g3,%o0 | ||
431 | srl %o0,16,%o1 | ||
432 | sll %o0,16,%o0 | ||
433 | and %o0,%o7,%o0 | ||
434 | cmp %i1,%o0 | ||
435 | bgeu .LL65 | ||
436 | add %o2,%o1,%o2 | ||
437 | add %o2,1,%o2 | ||
438 | .LL65: | ||
439 | cmp %i0,%o2 | ||
440 | bgeu .LL66 | ||
441 | sub %i1,%o0,%i1 | ||
442 | add %i0,%i2,%i0 | ||
443 | add %o3,-1,%o3 | ||
444 | .LL66: | ||
445 | addcc %l0,-1,%l0 | ||
446 | be .LL56 | ||
447 | sub %i0,%o2,%i0 | ||
448 | sll %o3,16,%l1 | ||
449 | sll %i0,16,%o0 | ||
450 | srl %i1,16,%o1 | ||
451 | or %o0,%o1,%i0 | ||
452 | and %i1,%g1,%o0 | ||
453 | b .LL55 | ||
454 | sll %o0,16,%i1 | ||
455 | .LL56: | ||
456 | or %l1,%o3,%i0 | ||
457 | .LL68: | ||
458 | ret | ||
459 | restore | ||
460 | .LLfe5: | ||
461 | .size bn_div64,.LLfe5-bn_div64 | ||
462 | .ident "GCC: (GNU) 2.7.2.3" | ||
diff --git a/src/lib/libcrypto/bn/asm/sparcv8.S b/src/lib/libcrypto/bn/asm/sparcv8.S new file mode 100644 index 0000000000..88c5dc480a --- /dev/null +++ b/src/lib/libcrypto/bn/asm/sparcv8.S | |||
@@ -0,0 +1,1458 @@ | |||
1 | .ident "sparcv8.s, Version 1.4" | ||
2 | .ident "SPARC v8 ISA artwork by Andy Polyakov <appro@fy.chalmers.se>" | ||
3 | |||
4 | /* | ||
5 | * ==================================================================== | ||
6 | * Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL | ||
7 | * project. | ||
8 | * | ||
9 | * Rights for redistribution and usage in source and binary forms are | ||
10 | * granted according to the OpenSSL license. Warranty of any kind is | ||
11 | * disclaimed. | ||
12 | * ==================================================================== | ||
13 | */ | ||
14 | |||
15 | /* | ||
16 | * This is my modest contributon to OpenSSL project (see | ||
17 | * http://www.openssl.org/ for more information about it) and is | ||
18 | * a drop-in SuperSPARC ISA replacement for crypto/bn/bn_asm.c | ||
19 | * module. For updates see http://fy.chalmers.se/~appro/hpe/. | ||
20 | * | ||
21 | * See bn_asm.sparc.v8plus.S for more details. | ||
22 | */ | ||
23 | |||
24 | /* | ||
25 | * Revision history. | ||
26 | * | ||
27 | * 1.1 - new loop unrolling model(*); | ||
28 | * 1.2 - made gas friendly; | ||
29 | * 1.3 - fixed problem with /usr/ccs/lib/cpp; | ||
30 | * 1.4 - some retunes; | ||
31 | * | ||
32 | * (*) see bn_asm.sparc.v8plus.S for details | ||
33 | */ | ||
34 | |||
35 | .section ".text",#alloc,#execinstr | ||
36 | .file "bn_asm.sparc.v8.S" | ||
37 | |||
38 | .align 32 | ||
39 | |||
40 | .global bn_mul_add_words | ||
41 | /* | ||
42 | * BN_ULONG bn_mul_add_words(rp,ap,num,w) | ||
43 | * BN_ULONG *rp,*ap; | ||
44 | * int num; | ||
45 | * BN_ULONG w; | ||
46 | */ | ||
47 | bn_mul_add_words: | ||
48 | cmp %o2,0 | ||
49 | bg,a .L_bn_mul_add_words_proceed | ||
50 | ld [%o1],%g2 | ||
51 | retl | ||
52 | clr %o0 | ||
53 | |||
54 | .L_bn_mul_add_words_proceed: | ||
55 | andcc %o2,-4,%g0 | ||
56 | bz .L_bn_mul_add_words_tail | ||
57 | clr %o5 | ||
58 | |||
59 | .L_bn_mul_add_words_loop: | ||
60 | ld [%o0],%o4 | ||
61 | ld [%o1+4],%g3 | ||
62 | umul %o3,%g2,%g2 | ||
63 | rd %y,%g1 | ||
64 | addcc %o4,%o5,%o4 | ||
65 | addx %g1,0,%g1 | ||
66 | addcc %o4,%g2,%o4 | ||
67 | st %o4,[%o0] | ||
68 | addx %g1,0,%o5 | ||
69 | |||
70 | ld [%o0+4],%o4 | ||
71 | ld [%o1+8],%g2 | ||
72 | umul %o3,%g3,%g3 | ||
73 | dec 4,%o2 | ||
74 | rd %y,%g1 | ||
75 | addcc %o4,%o5,%o4 | ||
76 | addx %g1,0,%g1 | ||
77 | addcc %o4,%g3,%o4 | ||
78 | st %o4,[%o0+4] | ||
79 | addx %g1,0,%o5 | ||
80 | |||
81 | ld [%o0+8],%o4 | ||
82 | ld [%o1+12],%g3 | ||
83 | umul %o3,%g2,%g2 | ||
84 | inc 16,%o1 | ||
85 | rd %y,%g1 | ||
86 | addcc %o4,%o5,%o4 | ||
87 | addx %g1,0,%g1 | ||
88 | addcc %o4,%g2,%o4 | ||
89 | st %o4,[%o0+8] | ||
90 | addx %g1,0,%o5 | ||
91 | |||
92 | ld [%o0+12],%o4 | ||
93 | umul %o3,%g3,%g3 | ||
94 | inc 16,%o0 | ||
95 | rd %y,%g1 | ||
96 | addcc %o4,%o5,%o4 | ||
97 | addx %g1,0,%g1 | ||
98 | addcc %o4,%g3,%o4 | ||
99 | st %o4,[%o0-4] | ||
100 | addx %g1,0,%o5 | ||
101 | andcc %o2,-4,%g0 | ||
102 | bnz,a .L_bn_mul_add_words_loop | ||
103 | ld [%o1],%g2 | ||
104 | |||
105 | tst %o2 | ||
106 | bnz,a .L_bn_mul_add_words_tail | ||
107 | ld [%o1],%g2 | ||
108 | .L_bn_mul_add_words_return: | ||
109 | retl | ||
110 | mov %o5,%o0 | ||
111 | nop | ||
112 | |||
113 | .L_bn_mul_add_words_tail: | ||
114 | ld [%o0],%o4 | ||
115 | umul %o3,%g2,%g2 | ||
116 | addcc %o4,%o5,%o4 | ||
117 | rd %y,%g1 | ||
118 | addx %g1,0,%g1 | ||
119 | addcc %o4,%g2,%o4 | ||
120 | addx %g1,0,%o5 | ||
121 | deccc %o2 | ||
122 | bz .L_bn_mul_add_words_return | ||
123 | st %o4,[%o0] | ||
124 | |||
125 | ld [%o1+4],%g2 | ||
126 | ld [%o0+4],%o4 | ||
127 | umul %o3,%g2,%g2 | ||
128 | rd %y,%g1 | ||
129 | addcc %o4,%o5,%o4 | ||
130 | addx %g1,0,%g1 | ||
131 | addcc %o4,%g2,%o4 | ||
132 | addx %g1,0,%o5 | ||
133 | deccc %o2 | ||
134 | bz .L_bn_mul_add_words_return | ||
135 | st %o4,[%o0+4] | ||
136 | |||
137 | ld [%o1+8],%g2 | ||
138 | ld [%o0+8],%o4 | ||
139 | umul %o3,%g2,%g2 | ||
140 | rd %y,%g1 | ||
141 | addcc %o4,%o5,%o4 | ||
142 | addx %g1,0,%g1 | ||
143 | addcc %o4,%g2,%o4 | ||
144 | st %o4,[%o0+8] | ||
145 | retl | ||
146 | addx %g1,0,%o0 | ||
147 | |||
148 | .type bn_mul_add_words,#function | ||
149 | .size bn_mul_add_words,(.-bn_mul_add_words) | ||
150 | |||
151 | .align 32 | ||
152 | |||
153 | .global bn_mul_words | ||
154 | /* | ||
155 | * BN_ULONG bn_mul_words(rp,ap,num,w) | ||
156 | * BN_ULONG *rp,*ap; | ||
157 | * int num; | ||
158 | * BN_ULONG w; | ||
159 | */ | ||
160 | bn_mul_words: | ||
161 | cmp %o2,0 | ||
162 | bg,a .L_bn_mul_words_proceeed | ||
163 | ld [%o1],%g2 | ||
164 | retl | ||
165 | clr %o0 | ||
166 | |||
167 | .L_bn_mul_words_proceeed: | ||
168 | andcc %o2,-4,%g0 | ||
169 | bz .L_bn_mul_words_tail | ||
170 | clr %o5 | ||
171 | |||
172 | .L_bn_mul_words_loop: | ||
173 | ld [%o1+4],%g3 | ||
174 | umul %o3,%g2,%g2 | ||
175 | addcc %g2,%o5,%g2 | ||
176 | rd %y,%g1 | ||
177 | addx %g1,0,%o5 | ||
178 | st %g2,[%o0] | ||
179 | |||
180 | ld [%o1+8],%g2 | ||
181 | umul %o3,%g3,%g3 | ||
182 | addcc %g3,%o5,%g3 | ||
183 | rd %y,%g1 | ||
184 | dec 4,%o2 | ||
185 | addx %g1,0,%o5 | ||
186 | st %g3,[%o0+4] | ||
187 | |||
188 | ld [%o1+12],%g3 | ||
189 | umul %o3,%g2,%g2 | ||
190 | addcc %g2,%o5,%g2 | ||
191 | rd %y,%g1 | ||
192 | inc 16,%o1 | ||
193 | st %g2,[%o0+8] | ||
194 | addx %g1,0,%o5 | ||
195 | |||
196 | umul %o3,%g3,%g3 | ||
197 | addcc %g3,%o5,%g3 | ||
198 | rd %y,%g1 | ||
199 | inc 16,%o0 | ||
200 | addx %g1,0,%o5 | ||
201 | st %g3,[%o0-4] | ||
202 | andcc %o2,-4,%g0 | ||
203 | nop | ||
204 | bnz,a .L_bn_mul_words_loop | ||
205 | ld [%o1],%g2 | ||
206 | |||
207 | tst %o2 | ||
208 | bnz,a .L_bn_mul_words_tail | ||
209 | ld [%o1],%g2 | ||
210 | .L_bn_mul_words_return: | ||
211 | retl | ||
212 | mov %o5,%o0 | ||
213 | nop | ||
214 | |||
215 | .L_bn_mul_words_tail: | ||
216 | umul %o3,%g2,%g2 | ||
217 | addcc %g2,%o5,%g2 | ||
218 | rd %y,%g1 | ||
219 | addx %g1,0,%o5 | ||
220 | deccc %o2 | ||
221 | bz .L_bn_mul_words_return | ||
222 | st %g2,[%o0] | ||
223 | nop | ||
224 | |||
225 | ld [%o1+4],%g2 | ||
226 | umul %o3,%g2,%g2 | ||
227 | addcc %g2,%o5,%g2 | ||
228 | rd %y,%g1 | ||
229 | addx %g1,0,%o5 | ||
230 | deccc %o2 | ||
231 | bz .L_bn_mul_words_return | ||
232 | st %g2,[%o0+4] | ||
233 | |||
234 | ld [%o1+8],%g2 | ||
235 | umul %o3,%g2,%g2 | ||
236 | addcc %g2,%o5,%g2 | ||
237 | rd %y,%g1 | ||
238 | st %g2,[%o0+8] | ||
239 | retl | ||
240 | addx %g1,0,%o0 | ||
241 | |||
242 | .type bn_mul_words,#function | ||
243 | .size bn_mul_words,(.-bn_mul_words) | ||
244 | |||
245 | .align 32 | ||
246 | .global bn_sqr_words | ||
247 | /* | ||
248 | * void bn_sqr_words(r,a,n) | ||
249 | * BN_ULONG *r,*a; | ||
250 | * int n; | ||
251 | */ | ||
252 | bn_sqr_words: | ||
253 | cmp %o2,0 | ||
254 | bg,a .L_bn_sqr_words_proceeed | ||
255 | ld [%o1],%g2 | ||
256 | retl | ||
257 | clr %o0 | ||
258 | |||
259 | .L_bn_sqr_words_proceeed: | ||
260 | andcc %o2,-4,%g0 | ||
261 | bz .L_bn_sqr_words_tail | ||
262 | clr %o5 | ||
263 | |||
264 | .L_bn_sqr_words_loop: | ||
265 | ld [%o1+4],%g3 | ||
266 | umul %g2,%g2,%o4 | ||
267 | st %o4,[%o0] | ||
268 | rd %y,%o5 | ||
269 | st %o5,[%o0+4] | ||
270 | |||
271 | ld [%o1+8],%g2 | ||
272 | umul %g3,%g3,%o4 | ||
273 | dec 4,%o2 | ||
274 | st %o4,[%o0+8] | ||
275 | rd %y,%o5 | ||
276 | st %o5,[%o0+12] | ||
277 | nop | ||
278 | |||
279 | ld [%o1+12],%g3 | ||
280 | umul %g2,%g2,%o4 | ||
281 | st %o4,[%o0+16] | ||
282 | rd %y,%o5 | ||
283 | inc 16,%o1 | ||
284 | st %o5,[%o0+20] | ||
285 | |||
286 | umul %g3,%g3,%o4 | ||
287 | inc 32,%o0 | ||
288 | st %o4,[%o0-8] | ||
289 | rd %y,%o5 | ||
290 | st %o5,[%o0-4] | ||
291 | andcc %o2,-4,%g2 | ||
292 | bnz,a .L_bn_sqr_words_loop | ||
293 | ld [%o1],%g2 | ||
294 | |||
295 | tst %o2 | ||
296 | nop | ||
297 | bnz,a .L_bn_sqr_words_tail | ||
298 | ld [%o1],%g2 | ||
299 | .L_bn_sqr_words_return: | ||
300 | retl | ||
301 | clr %o0 | ||
302 | |||
303 | .L_bn_sqr_words_tail: | ||
304 | umul %g2,%g2,%o4 | ||
305 | st %o4,[%o0] | ||
306 | deccc %o2 | ||
307 | rd %y,%o5 | ||
308 | bz .L_bn_sqr_words_return | ||
309 | st %o5,[%o0+4] | ||
310 | |||
311 | ld [%o1+4],%g2 | ||
312 | umul %g2,%g2,%o4 | ||
313 | st %o4,[%o0+8] | ||
314 | deccc %o2 | ||
315 | rd %y,%o5 | ||
316 | nop | ||
317 | bz .L_bn_sqr_words_return | ||
318 | st %o5,[%o0+12] | ||
319 | |||
320 | ld [%o1+8],%g2 | ||
321 | umul %g2,%g2,%o4 | ||
322 | st %o4,[%o0+16] | ||
323 | rd %y,%o5 | ||
324 | st %o5,[%o0+20] | ||
325 | retl | ||
326 | clr %o0 | ||
327 | |||
328 | .type bn_sqr_words,#function | ||
329 | .size bn_sqr_words,(.-bn_sqr_words) | ||
330 | |||
331 | .align 32 | ||
332 | |||
333 | .global bn_div_words | ||
334 | /* | ||
335 | * BN_ULONG bn_div_words(h,l,d) | ||
336 | * BN_ULONG h,l,d; | ||
337 | */ | ||
338 | bn_div_words: | ||
339 | wr %o0,%y | ||
340 | udiv %o1,%o2,%o0 | ||
341 | retl | ||
342 | nop | ||
343 | |||
344 | .type bn_div_words,#function | ||
345 | .size bn_div_words,(.-bn_div_words) | ||
346 | |||
347 | .align 32 | ||
348 | |||
349 | .global bn_add_words | ||
350 | /* | ||
351 | * BN_ULONG bn_add_words(rp,ap,bp,n) | ||
352 | * BN_ULONG *rp,*ap,*bp; | ||
353 | * int n; | ||
354 | */ | ||
355 | bn_add_words: | ||
356 | cmp %o3,0 | ||
357 | bg,a .L_bn_add_words_proceed | ||
358 | ld [%o1],%o4 | ||
359 | retl | ||
360 | clr %o0 | ||
361 | |||
362 | .L_bn_add_words_proceed: | ||
363 | andcc %o3,-4,%g0 | ||
364 | bz .L_bn_add_words_tail | ||
365 | clr %g1 | ||
366 | ba .L_bn_add_words_warn_loop | ||
367 | addcc %g0,0,%g0 ! clear carry flag | ||
368 | |||
369 | .L_bn_add_words_loop: | ||
370 | ld [%o1],%o4 | ||
371 | .L_bn_add_words_warn_loop: | ||
372 | ld [%o2],%o5 | ||
373 | ld [%o1+4],%g3 | ||
374 | ld [%o2+4],%g4 | ||
375 | dec 4,%o3 | ||
376 | addxcc %o5,%o4,%o5 | ||
377 | st %o5,[%o0] | ||
378 | |||
379 | ld [%o1+8],%o4 | ||
380 | ld [%o2+8],%o5 | ||
381 | inc 16,%o1 | ||
382 | addxcc %g3,%g4,%g3 | ||
383 | st %g3,[%o0+4] | ||
384 | |||
385 | ld [%o1-4],%g3 | ||
386 | ld [%o2+12],%g4 | ||
387 | inc 16,%o2 | ||
388 | addxcc %o5,%o4,%o5 | ||
389 | st %o5,[%o0+8] | ||
390 | |||
391 | inc 16,%o0 | ||
392 | addxcc %g3,%g4,%g3 | ||
393 | st %g3,[%o0-4] | ||
394 | addx %g0,0,%g1 | ||
395 | andcc %o3,-4,%g0 | ||
396 | bnz,a .L_bn_add_words_loop | ||
397 | addcc %g1,-1,%g0 | ||
398 | |||
399 | tst %o3 | ||
400 | bnz,a .L_bn_add_words_tail | ||
401 | ld [%o1],%o4 | ||
402 | .L_bn_add_words_return: | ||
403 | retl | ||
404 | mov %g1,%o0 | ||
405 | |||
406 | .L_bn_add_words_tail: | ||
407 | addcc %g1,-1,%g0 | ||
408 | ld [%o2],%o5 | ||
409 | addxcc %o5,%o4,%o5 | ||
410 | addx %g0,0,%g1 | ||
411 | deccc %o3 | ||
412 | bz .L_bn_add_words_return | ||
413 | st %o5,[%o0] | ||
414 | |||
415 | ld [%o1+4],%o4 | ||
416 | addcc %g1,-1,%g0 | ||
417 | ld [%o2+4],%o5 | ||
418 | addxcc %o5,%o4,%o5 | ||
419 | addx %g0,0,%g1 | ||
420 | deccc %o3 | ||
421 | bz .L_bn_add_words_return | ||
422 | st %o5,[%o0+4] | ||
423 | |||
424 | ld [%o1+8],%o4 | ||
425 | addcc %g1,-1,%g0 | ||
426 | ld [%o2+8],%o5 | ||
427 | addxcc %o5,%o4,%o5 | ||
428 | st %o5,[%o0+8] | ||
429 | retl | ||
430 | addx %g0,0,%o0 | ||
431 | |||
432 | .type bn_add_words,#function | ||
433 | .size bn_add_words,(.-bn_add_words) | ||
434 | |||
435 | .align 32 | ||
436 | |||
437 | .global bn_sub_words | ||
438 | /* | ||
439 | * BN_ULONG bn_sub_words(rp,ap,bp,n) | ||
440 | * BN_ULONG *rp,*ap,*bp; | ||
441 | * int n; | ||
442 | */ | ||
443 | bn_sub_words: | ||
444 | cmp %o3,0 | ||
445 | bg,a .L_bn_sub_words_proceed | ||
446 | ld [%o1],%o4 | ||
447 | retl | ||
448 | clr %o0 | ||
449 | |||
450 | .L_bn_sub_words_proceed: | ||
451 | andcc %o3,-4,%g0 | ||
452 | bz .L_bn_sub_words_tail | ||
453 | clr %g1 | ||
454 | ba .L_bn_sub_words_warm_loop | ||
455 | addcc %g0,0,%g0 ! clear carry flag | ||
456 | |||
457 | .L_bn_sub_words_loop: | ||
458 | ld [%o1],%o4 | ||
459 | .L_bn_sub_words_warm_loop: | ||
460 | ld [%o2],%o5 | ||
461 | ld [%o1+4],%g3 | ||
462 | ld [%o2+4],%g4 | ||
463 | dec 4,%o3 | ||
464 | subxcc %o4,%o5,%o5 | ||
465 | st %o5,[%o0] | ||
466 | |||
467 | ld [%o1+8],%o4 | ||
468 | ld [%o2+8],%o5 | ||
469 | inc 16,%o1 | ||
470 | subxcc %g3,%g4,%g4 | ||
471 | st %g4,[%o0+4] | ||
472 | |||
473 | ld [%o1-4],%g3 | ||
474 | ld [%o2+12],%g4 | ||
475 | inc 16,%o2 | ||
476 | subxcc %o4,%o5,%o5 | ||
477 | st %o5,[%o0+8] | ||
478 | |||
479 | inc 16,%o0 | ||
480 | subxcc %g3,%g4,%g4 | ||
481 | st %g4,[%o0-4] | ||
482 | addx %g0,0,%g1 | ||
483 | andcc %o3,-4,%g0 | ||
484 | bnz,a .L_bn_sub_words_loop | ||
485 | addcc %g1,-1,%g0 | ||
486 | |||
487 | tst %o3 | ||
488 | nop | ||
489 | bnz,a .L_bn_sub_words_tail | ||
490 | ld [%o1],%o4 | ||
491 | .L_bn_sub_words_return: | ||
492 | retl | ||
493 | mov %g1,%o0 | ||
494 | |||
495 | .L_bn_sub_words_tail: | ||
496 | addcc %g1,-1,%g0 | ||
497 | ld [%o2],%o5 | ||
498 | subxcc %o4,%o5,%o5 | ||
499 | addx %g0,0,%g1 | ||
500 | deccc %o3 | ||
501 | bz .L_bn_sub_words_return | ||
502 | st %o5,[%o0] | ||
503 | nop | ||
504 | |||
505 | ld [%o1+4],%o4 | ||
506 | addcc %g1,-1,%g0 | ||
507 | ld [%o2+4],%o5 | ||
508 | subxcc %o4,%o5,%o5 | ||
509 | addx %g0,0,%g1 | ||
510 | deccc %o3 | ||
511 | bz .L_bn_sub_words_return | ||
512 | st %o5,[%o0+4] | ||
513 | |||
514 | ld [%o1+8],%o4 | ||
515 | addcc %g1,-1,%g0 | ||
516 | ld [%o2+8],%o5 | ||
517 | subxcc %o4,%o5,%o5 | ||
518 | st %o5,[%o0+8] | ||
519 | retl | ||
520 | addx %g0,0,%o0 | ||
521 | |||
522 | .type bn_sub_words,#function | ||
523 | .size bn_sub_words,(.-bn_sub_words) | ||
524 | |||
525 | #define FRAME_SIZE -96 | ||
526 | |||
527 | /* | ||
528 | * Here is register usage map for *all* routines below. | ||
529 | */ | ||
530 | #define t_1 %o0 | ||
531 | #define t_2 %o1 | ||
532 | #define c_1 %o2 | ||
533 | #define c_2 %o3 | ||
534 | #define c_3 %o4 | ||
535 | |||
536 | #define ap(I) [%i1+4*I] | ||
537 | #define bp(I) [%i2+4*I] | ||
538 | #define rp(I) [%i0+4*I] | ||
539 | |||
540 | #define a_0 %l0 | ||
541 | #define a_1 %l1 | ||
542 | #define a_2 %l2 | ||
543 | #define a_3 %l3 | ||
544 | #define a_4 %l4 | ||
545 | #define a_5 %l5 | ||
546 | #define a_6 %l6 | ||
547 | #define a_7 %l7 | ||
548 | |||
549 | #define b_0 %i3 | ||
550 | #define b_1 %i4 | ||
551 | #define b_2 %i5 | ||
552 | #define b_3 %o5 | ||
553 | #define b_4 %g1 | ||
554 | #define b_5 %g2 | ||
555 | #define b_6 %g3 | ||
556 | #define b_7 %g4 | ||
557 | |||
558 | .align 32 | ||
559 | .global bn_mul_comba8 | ||
560 | /* | ||
561 | * void bn_mul_comba8(r,a,b) | ||
562 | * BN_ULONG *r,*a,*b; | ||
563 | */ | ||
564 | bn_mul_comba8: | ||
565 | save %sp,FRAME_SIZE,%sp | ||
566 | ld ap(0),a_0 | ||
567 | ld bp(0),b_0 | ||
568 | umul a_0,b_0,c_1 !=!mul_add_c(a[0],b[0],c1,c2,c3); | ||
569 | ld bp(1),b_1 | ||
570 | rd %y,c_2 | ||
571 | st c_1,rp(0) !r[0]=c1; | ||
572 | |||
573 | umul a_0,b_1,t_1 !=!mul_add_c(a[0],b[1],c2,c3,c1); | ||
574 | ld ap(1),a_1 | ||
575 | addcc c_2,t_1,c_2 | ||
576 | rd %y,t_2 | ||
577 | addxcc %g0,t_2,c_3 != | ||
578 | addx %g0,%g0,c_1 | ||
579 | ld ap(2),a_2 | ||
580 | umul a_1,b_0,t_1 !mul_add_c(a[1],b[0],c2,c3,c1); | ||
581 | addcc c_2,t_1,c_2 != | ||
582 | rd %y,t_2 | ||
583 | addxcc c_3,t_2,c_3 | ||
584 | st c_2,rp(1) !r[1]=c2; | ||
585 | addx c_1,%g0,c_1 != | ||
586 | |||
587 | umul a_2,b_0,t_1 !mul_add_c(a[2],b[0],c3,c1,c2); | ||
588 | addcc c_3,t_1,c_3 | ||
589 | rd %y,t_2 | ||
590 | addxcc c_1,t_2,c_1 != | ||
591 | addx %g0,%g0,c_2 | ||
592 | ld bp(2),b_2 | ||
593 | umul a_1,b_1,t_1 !mul_add_c(a[1],b[1],c3,c1,c2); | ||
594 | addcc c_3,t_1,c_3 != | ||
595 | rd %y,t_2 | ||
596 | addxcc c_1,t_2,c_1 | ||
597 | ld bp(3),b_3 | ||
598 | addx c_2,%g0,c_2 != | ||
599 | umul a_0,b_2,t_1 !mul_add_c(a[0],b[2],c3,c1,c2); | ||
600 | addcc c_3,t_1,c_3 | ||
601 | rd %y,t_2 | ||
602 | addxcc c_1,t_2,c_1 != | ||
603 | addx c_2,%g0,c_2 | ||
604 | st c_3,rp(2) !r[2]=c3; | ||
605 | |||
606 | umul a_0,b_3,t_1 !mul_add_c(a[0],b[3],c1,c2,c3); | ||
607 | addcc c_1,t_1,c_1 != | ||
608 | rd %y,t_2 | ||
609 | addxcc c_2,t_2,c_2 | ||
610 | addx %g0,%g0,c_3 | ||
611 | umul a_1,b_2,t_1 !=!mul_add_c(a[1],b[2],c1,c2,c3); | ||
612 | addcc c_1,t_1,c_1 | ||
613 | rd %y,t_2 | ||
614 | addxcc c_2,t_2,c_2 | ||
615 | addx c_3,%g0,c_3 != | ||
616 | ld ap(3),a_3 | ||
617 | umul a_2,b_1,t_1 !mul_add_c(a[2],b[1],c1,c2,c3); | ||
618 | addcc c_1,t_1,c_1 | ||
619 | rd %y,t_2 != | ||
620 | addxcc c_2,t_2,c_2 | ||
621 | addx c_3,%g0,c_3 | ||
622 | ld ap(4),a_4 | ||
623 | umul a_3,b_0,t_1 !mul_add_c(a[3],b[0],c1,c2,c3);!= | ||
624 | addcc c_1,t_1,c_1 | ||
625 | rd %y,t_2 | ||
626 | addxcc c_2,t_2,c_2 | ||
627 | addx c_3,%g0,c_3 != | ||
628 | st c_1,rp(3) !r[3]=c1; | ||
629 | |||
630 | umul a_4,b_0,t_1 !mul_add_c(a[4],b[0],c2,c3,c1); | ||
631 | addcc c_2,t_1,c_2 | ||
632 | rd %y,t_2 != | ||
633 | addxcc c_3,t_2,c_3 | ||
634 | addx %g0,%g0,c_1 | ||
635 | umul a_3,b_1,t_1 !mul_add_c(a[3],b[1],c2,c3,c1); | ||
636 | addcc c_2,t_1,c_2 != | ||
637 | rd %y,t_2 | ||
638 | addxcc c_3,t_2,c_3 | ||
639 | addx c_1,%g0,c_1 | ||
640 | umul a_2,b_2,t_1 !=!mul_add_c(a[2],b[2],c2,c3,c1); | ||
641 | addcc c_2,t_1,c_2 | ||
642 | rd %y,t_2 | ||
643 | addxcc c_3,t_2,c_3 | ||
644 | addx c_1,%g0,c_1 != | ||
645 | ld bp(4),b_4 | ||
646 | umul a_1,b_3,t_1 !mul_add_c(a[1],b[3],c2,c3,c1); | ||
647 | addcc c_2,t_1,c_2 | ||
648 | rd %y,t_2 != | ||
649 | addxcc c_3,t_2,c_3 | ||
650 | addx c_1,%g0,c_1 | ||
651 | ld bp(5),b_5 | ||
652 | umul a_0,b_4,t_1 !=!mul_add_c(a[0],b[4],c2,c3,c1); | ||
653 | addcc c_2,t_1,c_2 | ||
654 | rd %y,t_2 | ||
655 | addxcc c_3,t_2,c_3 | ||
656 | addx c_1,%g0,c_1 != | ||
657 | st c_2,rp(4) !r[4]=c2; | ||
658 | |||
659 | umul a_0,b_5,t_1 !mul_add_c(a[0],b[5],c3,c1,c2); | ||
660 | addcc c_3,t_1,c_3 | ||
661 | rd %y,t_2 != | ||
662 | addxcc c_1,t_2,c_1 | ||
663 | addx %g0,%g0,c_2 | ||
664 | umul a_1,b_4,t_1 !mul_add_c(a[1],b[4],c3,c1,c2); | ||
665 | addcc c_3,t_1,c_3 != | ||
666 | rd %y,t_2 | ||
667 | addxcc c_1,t_2,c_1 | ||
668 | addx c_2,%g0,c_2 | ||
669 | umul a_2,b_3,t_1 !=!mul_add_c(a[2],b[3],c3,c1,c2); | ||
670 | addcc c_3,t_1,c_3 | ||
671 | rd %y,t_2 | ||
672 | addxcc c_1,t_2,c_1 | ||
673 | addx c_2,%g0,c_2 != | ||
674 | umul a_3,b_2,t_1 !mul_add_c(a[3],b[2],c3,c1,c2); | ||
675 | addcc c_3,t_1,c_3 | ||
676 | rd %y,t_2 | ||
677 | addxcc c_1,t_2,c_1 != | ||
678 | addx c_2,%g0,c_2 | ||
679 | ld ap(5),a_5 | ||
680 | umul a_4,b_1,t_1 !mul_add_c(a[4],b[1],c3,c1,c2); | ||
681 | addcc c_3,t_1,c_3 != | ||
682 | rd %y,t_2 | ||
683 | addxcc c_1,t_2,c_1 | ||
684 | ld ap(6),a_6 | ||
685 | addx c_2,%g0,c_2 != | ||
686 | umul a_5,b_0,t_1 !mul_add_c(a[5],b[0],c3,c1,c2); | ||
687 | addcc c_3,t_1,c_3 | ||
688 | rd %y,t_2 | ||
689 | addxcc c_1,t_2,c_1 != | ||
690 | addx c_2,%g0,c_2 | ||
691 | st c_3,rp(5) !r[5]=c3; | ||
692 | |||
693 | umul a_6,b_0,t_1 !mul_add_c(a[6],b[0],c1,c2,c3); | ||
694 | addcc c_1,t_1,c_1 != | ||
695 | rd %y,t_2 | ||
696 | addxcc c_2,t_2,c_2 | ||
697 | addx %g0,%g0,c_3 | ||
698 | umul a_5,b_1,t_1 !=!mul_add_c(a[5],b[1],c1,c2,c3); | ||
699 | addcc c_1,t_1,c_1 | ||
700 | rd %y,t_2 | ||
701 | addxcc c_2,t_2,c_2 | ||
702 | addx c_3,%g0,c_3 != | ||
703 | umul a_4,b_2,t_1 !mul_add_c(a[4],b[2],c1,c2,c3); | ||
704 | addcc c_1,t_1,c_1 | ||
705 | rd %y,t_2 | ||
706 | addxcc c_2,t_2,c_2 != | ||
707 | addx c_3,%g0,c_3 | ||
708 | umul a_3,b_3,t_1 !mul_add_c(a[3],b[3],c1,c2,c3); | ||
709 | addcc c_1,t_1,c_1 | ||
710 | rd %y,t_2 != | ||
711 | addxcc c_2,t_2,c_2 | ||
712 | addx c_3,%g0,c_3 | ||
713 | umul a_2,b_4,t_1 !mul_add_c(a[2],b[4],c1,c2,c3); | ||
714 | addcc c_1,t_1,c_1 != | ||
715 | rd %y,t_2 | ||
716 | addxcc c_2,t_2,c_2 | ||
717 | ld bp(6),b_6 | ||
718 | addx c_3,%g0,c_3 != | ||
719 | umul a_1,b_5,t_1 !mul_add_c(a[1],b[5],c1,c2,c3); | ||
720 | addcc c_1,t_1,c_1 | ||
721 | rd %y,t_2 | ||
722 | addxcc c_2,t_2,c_2 != | ||
723 | addx c_3,%g0,c_3 | ||
724 | ld bp(7),b_7 | ||
725 | umul a_0,b_6,t_1 !mul_add_c(a[0],b[6],c1,c2,c3); | ||
726 | addcc c_1,t_1,c_1 != | ||
727 | rd %y,t_2 | ||
728 | addxcc c_2,t_2,c_2 | ||
729 | st c_1,rp(6) !r[6]=c1; | ||
730 | addx c_3,%g0,c_3 != | ||
731 | |||
732 | umul a_0,b_7,t_1 !mul_add_c(a[0],b[7],c2,c3,c1); | ||
733 | addcc c_2,t_1,c_2 | ||
734 | rd %y,t_2 | ||
735 | addxcc c_3,t_2,c_3 != | ||
736 | addx %g0,%g0,c_1 | ||
737 | umul a_1,b_6,t_1 !mul_add_c(a[1],b[6],c2,c3,c1); | ||
738 | addcc c_2,t_1,c_2 | ||
739 | rd %y,t_2 != | ||
740 | addxcc c_3,t_2,c_3 | ||
741 | addx c_1,%g0,c_1 | ||
742 | umul a_2,b_5,t_1 !mul_add_c(a[2],b[5],c2,c3,c1); | ||
743 | addcc c_2,t_1,c_2 != | ||
744 | rd %y,t_2 | ||
745 | addxcc c_3,t_2,c_3 | ||
746 | addx c_1,%g0,c_1 | ||
747 | umul a_3,b_4,t_1 !=!mul_add_c(a[3],b[4],c2,c3,c1); | ||
748 | addcc c_2,t_1,c_2 | ||
749 | rd %y,t_2 | ||
750 | addxcc c_3,t_2,c_3 | ||
751 | addx c_1,%g0,c_1 != | ||
752 | umul a_4,b_3,t_1 !mul_add_c(a[4],b[3],c2,c3,c1); | ||
753 | addcc c_2,t_1,c_2 | ||
754 | rd %y,t_2 | ||
755 | addxcc c_3,t_2,c_3 != | ||
756 | addx c_1,%g0,c_1 | ||
757 | umul a_5,b_2,t_1 !mul_add_c(a[5],b[2],c2,c3,c1); | ||
758 | addcc c_2,t_1,c_2 | ||
759 | rd %y,t_2 != | ||
760 | addxcc c_3,t_2,c_3 | ||
761 | addx c_1,%g0,c_1 | ||
762 | ld ap(7),a_7 | ||
763 | umul a_6,b_1,t_1 !=!mul_add_c(a[6],b[1],c2,c3,c1); | ||
764 | addcc c_2,t_1,c_2 | ||
765 | rd %y,t_2 | ||
766 | addxcc c_3,t_2,c_3 | ||
767 | addx c_1,%g0,c_1 != | ||
768 | umul a_7,b_0,t_1 !mul_add_c(a[7],b[0],c2,c3,c1); | ||
769 | addcc c_2,t_1,c_2 | ||
770 | rd %y,t_2 | ||
771 | addxcc c_3,t_2,c_3 != | ||
772 | addx c_1,%g0,c_1 | ||
773 | st c_2,rp(7) !r[7]=c2; | ||
774 | |||
775 | umul a_7,b_1,t_1 !mul_add_c(a[7],b[1],c3,c1,c2); | ||
776 | addcc c_3,t_1,c_3 != | ||
777 | rd %y,t_2 | ||
778 | addxcc c_1,t_2,c_1 | ||
779 | addx %g0,%g0,c_2 | ||
780 | umul a_6,b_2,t_1 !=!mul_add_c(a[6],b[2],c3,c1,c2); | ||
781 | addcc c_3,t_1,c_3 | ||
782 | rd %y,t_2 | ||
783 | addxcc c_1,t_2,c_1 | ||
784 | addx c_2,%g0,c_2 != | ||
785 | umul a_5,b_3,t_1 !mul_add_c(a[5],b[3],c3,c1,c2); | ||
786 | addcc c_3,t_1,c_3 | ||
787 | rd %y,t_2 | ||
788 | addxcc c_1,t_2,c_1 != | ||
789 | addx c_2,%g0,c_2 | ||
790 | umul a_4,b_4,t_1 !mul_add_c(a[4],b[4],c3,c1,c2); | ||
791 | addcc c_3,t_1,c_3 | ||
792 | rd %y,t_2 != | ||
793 | addxcc c_1,t_2,c_1 | ||
794 | addx c_2,%g0,c_2 | ||
795 | umul a_3,b_5,t_1 !mul_add_c(a[3],b[5],c3,c1,c2); | ||
796 | addcc c_3,t_1,c_3 != | ||
797 | rd %y,t_2 | ||
798 | addxcc c_1,t_2,c_1 | ||
799 | addx c_2,%g0,c_2 | ||
800 | umul a_2,b_6,t_1 !=!mul_add_c(a[2],b[6],c3,c1,c2); | ||
801 | addcc c_3,t_1,c_3 | ||
802 | rd %y,t_2 | ||
803 | addxcc c_1,t_2,c_1 | ||
804 | addx c_2,%g0,c_2 != | ||
805 | umul a_1,b_7,t_1 !mul_add_c(a[1],b[7],c3,c1,c2); | ||
806 | addcc c_3,t_1,c_3 | ||
807 | rd %y,t_2 | ||
808 | addxcc c_1,t_2,c_1 ! | ||
809 | addx c_2,%g0,c_2 | ||
810 | st c_3,rp(8) !r[8]=c3; | ||
811 | |||
812 | umul a_2,b_7,t_1 !mul_add_c(a[2],b[7],c1,c2,c3); | ||
813 | addcc c_1,t_1,c_1 != | ||
814 | rd %y,t_2 | ||
815 | addxcc c_2,t_2,c_2 | ||
816 | addx %g0,%g0,c_3 | ||
817 | umul a_3,b_6,t_1 !=!mul_add_c(a[3],b[6],c1,c2,c3); | ||
818 | addcc c_1,t_1,c_1 | ||
819 | rd %y,t_2 | ||
820 | addxcc c_2,t_2,c_2 | ||
821 | addx c_3,%g0,c_3 != | ||
822 | umul a_4,b_5,t_1 !mul_add_c(a[4],b[5],c1,c2,c3); | ||
823 | addcc c_1,t_1,c_1 | ||
824 | rd %y,t_2 | ||
825 | addxcc c_2,t_2,c_2 != | ||
826 | addx c_3,%g0,c_3 | ||
827 | umul a_5,b_4,t_1 !mul_add_c(a[5],b[4],c1,c2,c3); | ||
828 | addcc c_1,t_1,c_1 | ||
829 | rd %y,t_2 != | ||
830 | addxcc c_2,t_2,c_2 | ||
831 | addx c_3,%g0,c_3 | ||
832 | umul a_6,b_3,t_1 !mul_add_c(a[6],b[3],c1,c2,c3); | ||
833 | addcc c_1,t_1,c_1 != | ||
834 | rd %y,t_2 | ||
835 | addxcc c_2,t_2,c_2 | ||
836 | addx c_3,%g0,c_3 | ||
837 | umul a_7,b_2,t_1 !=!mul_add_c(a[7],b[2],c1,c2,c3); | ||
838 | addcc c_1,t_1,c_1 | ||
839 | rd %y,t_2 | ||
840 | addxcc c_2,t_2,c_2 | ||
841 | addx c_3,%g0,c_3 != | ||
842 | st c_1,rp(9) !r[9]=c1; | ||
843 | |||
844 | umul a_7,b_3,t_1 !mul_add_c(a[7],b[3],c2,c3,c1); | ||
845 | addcc c_2,t_1,c_2 | ||
846 | rd %y,t_2 != | ||
847 | addxcc c_3,t_2,c_3 | ||
848 | addx %g0,%g0,c_1 | ||
849 | umul a_6,b_4,t_1 !mul_add_c(a[6],b[4],c2,c3,c1); | ||
850 | addcc c_2,t_1,c_2 != | ||
851 | rd %y,t_2 | ||
852 | addxcc c_3,t_2,c_3 | ||
853 | addx c_1,%g0,c_1 | ||
854 | umul a_5,b_5,t_1 !=!mul_add_c(a[5],b[5],c2,c3,c1); | ||
855 | addcc c_2,t_1,c_2 | ||
856 | rd %y,t_2 | ||
857 | addxcc c_3,t_2,c_3 | ||
858 | addx c_1,%g0,c_1 != | ||
859 | umul a_4,b_6,t_1 !mul_add_c(a[4],b[6],c2,c3,c1); | ||
860 | addcc c_2,t_1,c_2 | ||
861 | rd %y,t_2 | ||
862 | addxcc c_3,t_2,c_3 != | ||
863 | addx c_1,%g0,c_1 | ||
864 | umul a_3,b_7,t_1 !mul_add_c(a[3],b[7],c2,c3,c1); | ||
865 | addcc c_2,t_1,c_2 | ||
866 | rd %y,t_2 != | ||
867 | addxcc c_3,t_2,c_3 | ||
868 | addx c_1,%g0,c_1 | ||
869 | st c_2,rp(10) !r[10]=c2; | ||
870 | |||
871 | umul a_4,b_7,t_1 !=!mul_add_c(a[4],b[7],c3,c1,c2); | ||
872 | addcc c_3,t_1,c_3 | ||
873 | rd %y,t_2 | ||
874 | addxcc c_1,t_2,c_1 | ||
875 | addx %g0,%g0,c_2 != | ||
876 | umul a_5,b_6,t_1 !mul_add_c(a[5],b[6],c3,c1,c2); | ||
877 | addcc c_3,t_1,c_3 | ||
878 | rd %y,t_2 | ||
879 | addxcc c_1,t_2,c_1 != | ||
880 | addx c_2,%g0,c_2 | ||
881 | umul a_6,b_5,t_1 !mul_add_c(a[6],b[5],c3,c1,c2); | ||
882 | addcc c_3,t_1,c_3 | ||
883 | rd %y,t_2 != | ||
884 | addxcc c_1,t_2,c_1 | ||
885 | addx c_2,%g0,c_2 | ||
886 | umul a_7,b_4,t_1 !mul_add_c(a[7],b[4],c3,c1,c2); | ||
887 | addcc c_3,t_1,c_3 != | ||
888 | rd %y,t_2 | ||
889 | addxcc c_1,t_2,c_1 | ||
890 | st c_3,rp(11) !r[11]=c3; | ||
891 | addx c_2,%g0,c_2 != | ||
892 | |||
893 | umul a_7,b_5,t_1 !mul_add_c(a[7],b[5],c1,c2,c3); | ||
894 | addcc c_1,t_1,c_1 | ||
895 | rd %y,t_2 | ||
896 | addxcc c_2,t_2,c_2 != | ||
897 | addx %g0,%g0,c_3 | ||
898 | umul a_6,b_6,t_1 !mul_add_c(a[6],b[6],c1,c2,c3); | ||
899 | addcc c_1,t_1,c_1 | ||
900 | rd %y,t_2 != | ||
901 | addxcc c_2,t_2,c_2 | ||
902 | addx c_3,%g0,c_3 | ||
903 | umul a_5,b_7,t_1 !mul_add_c(a[5],b[7],c1,c2,c3); | ||
904 | addcc c_1,t_1,c_1 != | ||
905 | rd %y,t_2 | ||
906 | addxcc c_2,t_2,c_2 | ||
907 | st c_1,rp(12) !r[12]=c1; | ||
908 | addx c_3,%g0,c_3 != | ||
909 | |||
910 | umul a_6,b_7,t_1 !mul_add_c(a[6],b[7],c2,c3,c1); | ||
911 | addcc c_2,t_1,c_2 | ||
912 | rd %y,t_2 | ||
913 | addxcc c_3,t_2,c_3 != | ||
914 | addx %g0,%g0,c_1 | ||
915 | umul a_7,b_6,t_1 !mul_add_c(a[7],b[6],c2,c3,c1); | ||
916 | addcc c_2,t_1,c_2 | ||
917 | rd %y,t_2 != | ||
918 | addxcc c_3,t_2,c_3 | ||
919 | addx c_1,%g0,c_1 | ||
920 | st c_2,rp(13) !r[13]=c2; | ||
921 | |||
922 | umul a_7,b_7,t_1 !=!mul_add_c(a[7],b[7],c3,c1,c2); | ||
923 | addcc c_3,t_1,c_3 | ||
924 | rd %y,t_2 | ||
925 | addxcc c_1,t_2,c_1 | ||
926 | nop != | ||
927 | st c_3,rp(14) !r[14]=c3; | ||
928 | st c_1,rp(15) !r[15]=c1; | ||
929 | |||
930 | ret | ||
931 | restore %g0,%g0,%o0 | ||
932 | |||
933 | .type bn_mul_comba8,#function | ||
934 | .size bn_mul_comba8,(.-bn_mul_comba8) | ||
935 | |||
936 | .align 32 | ||
937 | |||
938 | .global bn_mul_comba4 | ||
939 | /* | ||
940 | * void bn_mul_comba4(r,a,b) | ||
941 | * BN_ULONG *r,*a,*b; | ||
942 | */ | ||
943 | bn_mul_comba4: | ||
944 | save %sp,FRAME_SIZE,%sp | ||
945 | ld ap(0),a_0 | ||
946 | ld bp(0),b_0 | ||
947 | umul a_0,b_0,c_1 !=!mul_add_c(a[0],b[0],c1,c2,c3); | ||
948 | ld bp(1),b_1 | ||
949 | rd %y,c_2 | ||
950 | st c_1,rp(0) !r[0]=c1; | ||
951 | |||
952 | umul a_0,b_1,t_1 !=!mul_add_c(a[0],b[1],c2,c3,c1); | ||
953 | ld ap(1),a_1 | ||
954 | addcc c_2,t_1,c_2 | ||
955 | rd %y,t_2 != | ||
956 | addxcc %g0,t_2,c_3 | ||
957 | addx %g0,%g0,c_1 | ||
958 | ld ap(2),a_2 | ||
959 | umul a_1,b_0,t_1 !=!mul_add_c(a[1],b[0],c2,c3,c1); | ||
960 | addcc c_2,t_1,c_2 | ||
961 | rd %y,t_2 | ||
962 | addxcc c_3,t_2,c_3 | ||
963 | addx c_1,%g0,c_1 != | ||
964 | st c_2,rp(1) !r[1]=c2; | ||
965 | |||
966 | umul a_2,b_0,t_1 !mul_add_c(a[2],b[0],c3,c1,c2); | ||
967 | addcc c_3,t_1,c_3 | ||
968 | rd %y,t_2 != | ||
969 | addxcc c_1,t_2,c_1 | ||
970 | addx %g0,%g0,c_2 | ||
971 | ld bp(2),b_2 | ||
972 | umul a_1,b_1,t_1 !=!mul_add_c(a[1],b[1],c3,c1,c2); | ||
973 | addcc c_3,t_1,c_3 | ||
974 | rd %y,t_2 | ||
975 | addxcc c_1,t_2,c_1 | ||
976 | addx c_2,%g0,c_2 != | ||
977 | ld bp(3),b_3 | ||
978 | umul a_0,b_2,t_1 !mul_add_c(a[0],b[2],c3,c1,c2); | ||
979 | addcc c_3,t_1,c_3 | ||
980 | rd %y,t_2 != | ||
981 | addxcc c_1,t_2,c_1 | ||
982 | addx c_2,%g0,c_2 | ||
983 | st c_3,rp(2) !r[2]=c3; | ||
984 | |||
985 | umul a_0,b_3,t_1 !=!mul_add_c(a[0],b[3],c1,c2,c3); | ||
986 | addcc c_1,t_1,c_1 | ||
987 | rd %y,t_2 | ||
988 | addxcc c_2,t_2,c_2 | ||
989 | addx %g0,%g0,c_3 != | ||
990 | umul a_1,b_2,t_1 !mul_add_c(a[1],b[2],c1,c2,c3); | ||
991 | addcc c_1,t_1,c_1 | ||
992 | rd %y,t_2 | ||
993 | addxcc c_2,t_2,c_2 != | ||
994 | addx c_3,%g0,c_3 | ||
995 | ld ap(3),a_3 | ||
996 | umul a_2,b_1,t_1 !mul_add_c(a[2],b[1],c1,c2,c3); | ||
997 | addcc c_1,t_1,c_1 != | ||
998 | rd %y,t_2 | ||
999 | addxcc c_2,t_2,c_2 | ||
1000 | addx c_3,%g0,c_3 | ||
1001 | umul a_3,b_0,t_1 !=!mul_add_c(a[3],b[0],c1,c2,c3); | ||
1002 | addcc c_1,t_1,c_1 | ||
1003 | rd %y,t_2 | ||
1004 | addxcc c_2,t_2,c_2 | ||
1005 | addx c_3,%g0,c_3 != | ||
1006 | st c_1,rp(3) !r[3]=c1; | ||
1007 | |||
1008 | umul a_3,b_1,t_1 !mul_add_c(a[3],b[1],c2,c3,c1); | ||
1009 | addcc c_2,t_1,c_2 | ||
1010 | rd %y,t_2 != | ||
1011 | addxcc c_3,t_2,c_3 | ||
1012 | addx %g0,%g0,c_1 | ||
1013 | umul a_2,b_2,t_1 !mul_add_c(a[2],b[2],c2,c3,c1); | ||
1014 | addcc c_2,t_1,c_2 != | ||
1015 | rd %y,t_2 | ||
1016 | addxcc c_3,t_2,c_3 | ||
1017 | addx c_1,%g0,c_1 | ||
1018 | umul a_1,b_3,t_1 !=!mul_add_c(a[1],b[3],c2,c3,c1); | ||
1019 | addcc c_2,t_1,c_2 | ||
1020 | rd %y,t_2 | ||
1021 | addxcc c_3,t_2,c_3 | ||
1022 | addx c_1,%g0,c_1 != | ||
1023 | st c_2,rp(4) !r[4]=c2; | ||
1024 | |||
1025 | umul a_2,b_3,t_1 !mul_add_c(a[2],b[3],c3,c1,c2); | ||
1026 | addcc c_3,t_1,c_3 | ||
1027 | rd %y,t_2 != | ||
1028 | addxcc c_1,t_2,c_1 | ||
1029 | addx %g0,%g0,c_2 | ||
1030 | umul a_3,b_2,t_1 !mul_add_c(a[3],b[2],c3,c1,c2); | ||
1031 | addcc c_3,t_1,c_3 != | ||
1032 | rd %y,t_2 | ||
1033 | addxcc c_1,t_2,c_1 | ||
1034 | st c_3,rp(5) !r[5]=c3; | ||
1035 | addx c_2,%g0,c_2 != | ||
1036 | |||
1037 | umul a_3,b_3,t_1 !mul_add_c(a[3],b[3],c1,c2,c3); | ||
1038 | addcc c_1,t_1,c_1 | ||
1039 | rd %y,t_2 | ||
1040 | addxcc c_2,t_2,c_2 != | ||
1041 | st c_1,rp(6) !r[6]=c1; | ||
1042 | st c_2,rp(7) !r[7]=c2; | ||
1043 | |||
1044 | ret | ||
1045 | restore %g0,%g0,%o0 | ||
1046 | |||
1047 | .type bn_mul_comba4,#function | ||
1048 | .size bn_mul_comba4,(.-bn_mul_comba4) | ||
1049 | |||
1050 | .align 32 | ||
1051 | |||
1052 | .global bn_sqr_comba8 | ||
1053 | bn_sqr_comba8: | ||
1054 | save %sp,FRAME_SIZE,%sp | ||
1055 | ld ap(0),a_0 | ||
1056 | ld ap(1),a_1 | ||
1057 | umul a_0,a_0,c_1 !=!sqr_add_c(a,0,c1,c2,c3); | ||
1058 | rd %y,c_2 | ||
1059 | st c_1,rp(0) !r[0]=c1; | ||
1060 | |||
1061 | ld ap(2),a_2 | ||
1062 | umul a_0,a_1,t_1 !=!sqr_add_c2(a,1,0,c2,c3,c1); | ||
1063 | addcc c_2,t_1,c_2 | ||
1064 | rd %y,t_2 | ||
1065 | addxcc %g0,t_2,c_3 | ||
1066 | addx %g0,%g0,c_1 != | ||
1067 | addcc c_2,t_1,c_2 | ||
1068 | addxcc c_3,t_2,c_3 | ||
1069 | st c_2,rp(1) !r[1]=c2; | ||
1070 | addx c_1,%g0,c_1 != | ||
1071 | |||
1072 | umul a_2,a_0,t_1 !sqr_add_c2(a,2,0,c3,c1,c2); | ||
1073 | addcc c_3,t_1,c_3 | ||
1074 | rd %y,t_2 | ||
1075 | addxcc c_1,t_2,c_1 != | ||
1076 | addx %g0,%g0,c_2 | ||
1077 | addcc c_3,t_1,c_3 | ||
1078 | addxcc c_1,t_2,c_1 | ||
1079 | addx c_2,%g0,c_2 != | ||
1080 | ld ap(3),a_3 | ||
1081 | umul a_1,a_1,t_1 !sqr_add_c(a,1,c3,c1,c2); | ||
1082 | addcc c_3,t_1,c_3 | ||
1083 | rd %y,t_2 != | ||
1084 | addxcc c_1,t_2,c_1 | ||
1085 | addx c_2,%g0,c_2 | ||
1086 | st c_3,rp(2) !r[2]=c3; | ||
1087 | |||
1088 | umul a_0,a_3,t_1 !=!sqr_add_c2(a,3,0,c1,c2,c3); | ||
1089 | addcc c_1,t_1,c_1 | ||
1090 | rd %y,t_2 | ||
1091 | addxcc c_2,t_2,c_2 | ||
1092 | addx %g0,%g0,c_3 != | ||
1093 | addcc c_1,t_1,c_1 | ||
1094 | addxcc c_2,t_2,c_2 | ||
1095 | ld ap(4),a_4 | ||
1096 | addx c_3,%g0,c_3 != | ||
1097 | umul a_1,a_2,t_1 !sqr_add_c2(a,2,1,c1,c2,c3); | ||
1098 | addcc c_1,t_1,c_1 | ||
1099 | rd %y,t_2 | ||
1100 | addxcc c_2,t_2,c_2 != | ||
1101 | addx c_3,%g0,c_3 | ||
1102 | addcc c_1,t_1,c_1 | ||
1103 | addxcc c_2,t_2,c_2 | ||
1104 | addx c_3,%g0,c_3 != | ||
1105 | st c_1,rp(3) !r[3]=c1; | ||
1106 | |||
1107 | umul a_4,a_0,t_1 !sqr_add_c2(a,4,0,c2,c3,c1); | ||
1108 | addcc c_2,t_1,c_2 | ||
1109 | rd %y,t_2 != | ||
1110 | addxcc c_3,t_2,c_3 | ||
1111 | addx %g0,%g0,c_1 | ||
1112 | addcc c_2,t_1,c_2 | ||
1113 | addxcc c_3,t_2,c_3 != | ||
1114 | addx c_1,%g0,c_1 | ||
1115 | umul a_3,a_1,t_1 !sqr_add_c2(a,3,1,c2,c3,c1); | ||
1116 | addcc c_2,t_1,c_2 | ||
1117 | rd %y,t_2 != | ||
1118 | addxcc c_3,t_2,c_3 | ||
1119 | addx c_1,%g0,c_1 | ||
1120 | addcc c_2,t_1,c_2 | ||
1121 | addxcc c_3,t_2,c_3 != | ||
1122 | addx c_1,%g0,c_1 | ||
1123 | ld ap(5),a_5 | ||
1124 | umul a_2,a_2,t_1 !sqr_add_c(a,2,c2,c3,c1); | ||
1125 | addcc c_2,t_1,c_2 != | ||
1126 | rd %y,t_2 | ||
1127 | addxcc c_3,t_2,c_3 | ||
1128 | st c_2,rp(4) !r[4]=c2; | ||
1129 | addx c_1,%g0,c_1 != | ||
1130 | |||
1131 | umul a_0,a_5,t_1 !sqr_add_c2(a,5,0,c3,c1,c2); | ||
1132 | addcc c_3,t_1,c_3 | ||
1133 | rd %y,t_2 | ||
1134 | addxcc c_1,t_2,c_1 != | ||
1135 | addx %g0,%g0,c_2 | ||
1136 | addcc c_3,t_1,c_3 | ||
1137 | addxcc c_1,t_2,c_1 | ||
1138 | addx c_2,%g0,c_2 != | ||
1139 | umul a_1,a_4,t_1 !sqr_add_c2(a,4,1,c3,c1,c2); | ||
1140 | addcc c_3,t_1,c_3 | ||
1141 | rd %y,t_2 | ||
1142 | addxcc c_1,t_2,c_1 != | ||
1143 | addx c_2,%g0,c_2 | ||
1144 | addcc c_3,t_1,c_3 | ||
1145 | addxcc c_1,t_2,c_1 | ||
1146 | addx c_2,%g0,c_2 != | ||
1147 | ld ap(6),a_6 | ||
1148 | umul a_2,a_3,t_1 !sqr_add_c2(a,3,2,c3,c1,c2); | ||
1149 | addcc c_3,t_1,c_3 | ||
1150 | rd %y,t_2 != | ||
1151 | addxcc c_1,t_2,c_1 | ||
1152 | addx c_2,%g0,c_2 | ||
1153 | addcc c_3,t_1,c_3 | ||
1154 | addxcc c_1,t_2,c_1 != | ||
1155 | addx c_2,%g0,c_2 | ||
1156 | st c_3,rp(5) !r[5]=c3; | ||
1157 | |||
1158 | umul a_6,a_0,t_1 !sqr_add_c2(a,6,0,c1,c2,c3); | ||
1159 | addcc c_1,t_1,c_1 != | ||
1160 | rd %y,t_2 | ||
1161 | addxcc c_2,t_2,c_2 | ||
1162 | addx %g0,%g0,c_3 | ||
1163 | addcc c_1,t_1,c_1 != | ||
1164 | addxcc c_2,t_2,c_2 | ||
1165 | addx c_3,%g0,c_3 | ||
1166 | umul a_5,a_1,t_1 !sqr_add_c2(a,5,1,c1,c2,c3); | ||
1167 | addcc c_1,t_1,c_1 != | ||
1168 | rd %y,t_2 | ||
1169 | addxcc c_2,t_2,c_2 | ||
1170 | addx c_3,%g0,c_3 | ||
1171 | addcc c_1,t_1,c_1 != | ||
1172 | addxcc c_2,t_2,c_2 | ||
1173 | addx c_3,%g0,c_3 | ||
1174 | umul a_4,a_2,t_1 !sqr_add_c2(a,4,2,c1,c2,c3); | ||
1175 | addcc c_1,t_1,c_1 != | ||
1176 | rd %y,t_2 | ||
1177 | addxcc c_2,t_2,c_2 | ||
1178 | addx c_3,%g0,c_3 | ||
1179 | addcc c_1,t_1,c_1 != | ||
1180 | addxcc c_2,t_2,c_2 | ||
1181 | addx c_3,%g0,c_3 | ||
1182 | ld ap(7),a_7 | ||
1183 | umul a_3,a_3,t_1 !=!sqr_add_c(a,3,c1,c2,c3); | ||
1184 | addcc c_1,t_1,c_1 | ||
1185 | rd %y,t_2 | ||
1186 | addxcc c_2,t_2,c_2 | ||
1187 | addx c_3,%g0,c_3 != | ||
1188 | st c_1,rp(6) !r[6]=c1; | ||
1189 | |||
1190 | umul a_0,a_7,t_1 !sqr_add_c2(a,7,0,c2,c3,c1); | ||
1191 | addcc c_2,t_1,c_2 | ||
1192 | rd %y,t_2 != | ||
1193 | addxcc c_3,t_2,c_3 | ||
1194 | addx %g0,%g0,c_1 | ||
1195 | addcc c_2,t_1,c_2 | ||
1196 | addxcc c_3,t_2,c_3 != | ||
1197 | addx c_1,%g0,c_1 | ||
1198 | umul a_1,a_6,t_1 !sqr_add_c2(a,6,1,c2,c3,c1); | ||
1199 | addcc c_2,t_1,c_2 | ||
1200 | rd %y,t_2 != | ||
1201 | addxcc c_3,t_2,c_3 | ||
1202 | addx c_1,%g0,c_1 | ||
1203 | addcc c_2,t_1,c_2 | ||
1204 | addxcc c_3,t_2,c_3 != | ||
1205 | addx c_1,%g0,c_1 | ||
1206 | umul a_2,a_5,t_1 !sqr_add_c2(a,5,2,c2,c3,c1); | ||
1207 | addcc c_2,t_1,c_2 | ||
1208 | rd %y,t_2 != | ||
1209 | addxcc c_3,t_2,c_3 | ||
1210 | addx c_1,%g0,c_1 | ||
1211 | addcc c_2,t_1,c_2 | ||
1212 | addxcc c_3,t_2,c_3 != | ||
1213 | addx c_1,%g0,c_1 | ||
1214 | umul a_3,a_4,t_1 !sqr_add_c2(a,4,3,c2,c3,c1); | ||
1215 | addcc c_2,t_1,c_2 | ||
1216 | rd %y,t_2 != | ||
1217 | addxcc c_3,t_2,c_3 | ||
1218 | addx c_1,%g0,c_1 | ||
1219 | addcc c_2,t_1,c_2 | ||
1220 | addxcc c_3,t_2,c_3 != | ||
1221 | addx c_1,%g0,c_1 | ||
1222 | st c_2,rp(7) !r[7]=c2; | ||
1223 | |||
1224 | umul a_7,a_1,t_1 !sqr_add_c2(a,7,1,c3,c1,c2); | ||
1225 | addcc c_3,t_1,c_3 != | ||
1226 | rd %y,t_2 | ||
1227 | addxcc c_1,t_2,c_1 | ||
1228 | addx %g0,%g0,c_2 | ||
1229 | addcc c_3,t_1,c_3 != | ||
1230 | addxcc c_1,t_2,c_1 | ||
1231 | addx c_2,%g0,c_2 | ||
1232 | umul a_6,a_2,t_1 !sqr_add_c2(a,6,2,c3,c1,c2); | ||
1233 | addcc c_3,t_1,c_3 != | ||
1234 | rd %y,t_2 | ||
1235 | addxcc c_1,t_2,c_1 | ||
1236 | addx c_2,%g0,c_2 | ||
1237 | addcc c_3,t_1,c_3 != | ||
1238 | addxcc c_1,t_2,c_1 | ||
1239 | addx c_2,%g0,c_2 | ||
1240 | umul a_5,a_3,t_1 !sqr_add_c2(a,5,3,c3,c1,c2); | ||
1241 | addcc c_3,t_1,c_3 != | ||
1242 | rd %y,t_2 | ||
1243 | addxcc c_1,t_2,c_1 | ||
1244 | addx c_2,%g0,c_2 | ||
1245 | addcc c_3,t_1,c_3 != | ||
1246 | addxcc c_1,t_2,c_1 | ||
1247 | addx c_2,%g0,c_2 | ||
1248 | umul a_4,a_4,t_1 !sqr_add_c(a,4,c3,c1,c2); | ||
1249 | addcc c_3,t_1,c_3 != | ||
1250 | rd %y,t_2 | ||
1251 | addxcc c_1,t_2,c_1 | ||
1252 | st c_3,rp(8) !r[8]=c3; | ||
1253 | addx c_2,%g0,c_2 != | ||
1254 | |||
1255 | umul a_2,a_7,t_1 !sqr_add_c2(a,7,2,c1,c2,c3); | ||
1256 | addcc c_1,t_1,c_1 | ||
1257 | rd %y,t_2 | ||
1258 | addxcc c_2,t_2,c_2 != | ||
1259 | addx %g0,%g0,c_3 | ||
1260 | addcc c_1,t_1,c_1 | ||
1261 | addxcc c_2,t_2,c_2 | ||
1262 | addx c_3,%g0,c_3 != | ||
1263 | umul a_3,a_6,t_1 !sqr_add_c2(a,6,3,c1,c2,c3); | ||
1264 | addcc c_1,t_1,c_1 | ||
1265 | rd %y,t_2 | ||
1266 | addxcc c_2,t_2,c_2 != | ||
1267 | addx c_3,%g0,c_3 | ||
1268 | addcc c_1,t_1,c_1 | ||
1269 | addxcc c_2,t_2,c_2 | ||
1270 | addx c_3,%g0,c_3 != | ||
1271 | umul a_4,a_5,t_1 !sqr_add_c2(a,5,4,c1,c2,c3); | ||
1272 | addcc c_1,t_1,c_1 | ||
1273 | rd %y,t_2 | ||
1274 | addxcc c_2,t_2,c_2 != | ||
1275 | addx c_3,%g0,c_3 | ||
1276 | addcc c_1,t_1,c_1 | ||
1277 | addxcc c_2,t_2,c_2 | ||
1278 | addx c_3,%g0,c_3 != | ||
1279 | st c_1,rp(9) !r[9]=c1; | ||
1280 | |||
1281 | umul a_7,a_3,t_1 !sqr_add_c2(a,7,3,c2,c3,c1); | ||
1282 | addcc c_2,t_1,c_2 | ||
1283 | rd %y,t_2 != | ||
1284 | addxcc c_3,t_2,c_3 | ||
1285 | addx %g0,%g0,c_1 | ||
1286 | addcc c_2,t_1,c_2 | ||
1287 | addxcc c_3,t_2,c_3 != | ||
1288 | addx c_1,%g0,c_1 | ||
1289 | umul a_6,a_4,t_1 !sqr_add_c2(a,6,4,c2,c3,c1); | ||
1290 | addcc c_2,t_1,c_2 | ||
1291 | rd %y,t_2 != | ||
1292 | addxcc c_3,t_2,c_3 | ||
1293 | addx c_1,%g0,c_1 | ||
1294 | addcc c_2,t_1,c_2 | ||
1295 | addxcc c_3,t_2,c_3 != | ||
1296 | addx c_1,%g0,c_1 | ||
1297 | umul a_5,a_5,t_1 !sqr_add_c(a,5,c2,c3,c1); | ||
1298 | addcc c_2,t_1,c_2 | ||
1299 | rd %y,t_2 != | ||
1300 | addxcc c_3,t_2,c_3 | ||
1301 | addx c_1,%g0,c_1 | ||
1302 | st c_2,rp(10) !r[10]=c2; | ||
1303 | |||
1304 | umul a_4,a_7,t_1 !=!sqr_add_c2(a,7,4,c3,c1,c2); | ||
1305 | addcc c_3,t_1,c_3 | ||
1306 | rd %y,t_2 | ||
1307 | addxcc c_1,t_2,c_1 | ||
1308 | addx %g0,%g0,c_2 != | ||
1309 | addcc c_3,t_1,c_3 | ||
1310 | addxcc c_1,t_2,c_1 | ||
1311 | addx c_2,%g0,c_2 | ||
1312 | umul a_5,a_6,t_1 !=!sqr_add_c2(a,6,5,c3,c1,c2); | ||
1313 | addcc c_3,t_1,c_3 | ||
1314 | rd %y,t_2 | ||
1315 | addxcc c_1,t_2,c_1 | ||
1316 | addx c_2,%g0,c_2 != | ||
1317 | addcc c_3,t_1,c_3 | ||
1318 | addxcc c_1,t_2,c_1 | ||
1319 | st c_3,rp(11) !r[11]=c3; | ||
1320 | addx c_2,%g0,c_2 != | ||
1321 | |||
1322 | umul a_7,a_5,t_1 !sqr_add_c2(a,7,5,c1,c2,c3); | ||
1323 | addcc c_1,t_1,c_1 | ||
1324 | rd %y,t_2 | ||
1325 | addxcc c_2,t_2,c_2 != | ||
1326 | addx %g0,%g0,c_3 | ||
1327 | addcc c_1,t_1,c_1 | ||
1328 | addxcc c_2,t_2,c_2 | ||
1329 | addx c_3,%g0,c_3 != | ||
1330 | umul a_6,a_6,t_1 !sqr_add_c(a,6,c1,c2,c3); | ||
1331 | addcc c_1,t_1,c_1 | ||
1332 | rd %y,t_2 | ||
1333 | addxcc c_2,t_2,c_2 != | ||
1334 | addx c_3,%g0,c_3 | ||
1335 | st c_1,rp(12) !r[12]=c1; | ||
1336 | |||
1337 | umul a_6,a_7,t_1 !sqr_add_c2(a,7,6,c2,c3,c1); | ||
1338 | addcc c_2,t_1,c_2 != | ||
1339 | rd %y,t_2 | ||
1340 | addxcc c_3,t_2,c_3 | ||
1341 | addx %g0,%g0,c_1 | ||
1342 | addcc c_2,t_1,c_2 != | ||
1343 | addxcc c_3,t_2,c_3 | ||
1344 | st c_2,rp(13) !r[13]=c2; | ||
1345 | addx c_1,%g0,c_1 != | ||
1346 | |||
1347 | umul a_7,a_7,t_1 !sqr_add_c(a,7,c3,c1,c2); | ||
1348 | addcc c_3,t_1,c_3 | ||
1349 | rd %y,t_2 | ||
1350 | addxcc c_1,t_2,c_1 != | ||
1351 | st c_3,rp(14) !r[14]=c3; | ||
1352 | st c_1,rp(15) !r[15]=c1; | ||
1353 | |||
1354 | ret | ||
1355 | restore %g0,%g0,%o0 | ||
1356 | |||
1357 | .type bn_sqr_comba8,#function | ||
1358 | .size bn_sqr_comba8,(.-bn_sqr_comba8) | ||
1359 | |||
1360 | .align 32 | ||
1361 | |||
1362 | .global bn_sqr_comba4 | ||
1363 | /* | ||
1364 | * void bn_sqr_comba4(r,a) | ||
1365 | * BN_ULONG *r,*a; | ||
1366 | */ | ||
1367 | bn_sqr_comba4: | ||
1368 | save %sp,FRAME_SIZE,%sp | ||
1369 | ld ap(0),a_0 | ||
1370 | umul a_0,a_0,c_1 !sqr_add_c(a,0,c1,c2,c3); | ||
1371 | ld ap(1),a_1 != | ||
1372 | rd %y,c_2 | ||
1373 | st c_1,rp(0) !r[0]=c1; | ||
1374 | |||
1375 | ld ap(2),a_2 | ||
1376 | umul a_0,a_1,t_1 !=!sqr_add_c2(a,1,0,c2,c3,c1); | ||
1377 | addcc c_2,t_1,c_2 | ||
1378 | rd %y,t_2 | ||
1379 | addxcc %g0,t_2,c_3 | ||
1380 | addx %g0,%g0,c_1 != | ||
1381 | addcc c_2,t_1,c_2 | ||
1382 | addxcc c_3,t_2,c_3 | ||
1383 | addx c_1,%g0,c_1 != | ||
1384 | st c_2,rp(1) !r[1]=c2; | ||
1385 | |||
1386 | umul a_2,a_0,t_1 !sqr_add_c2(a,2,0,c3,c1,c2); | ||
1387 | addcc c_3,t_1,c_3 | ||
1388 | rd %y,t_2 != | ||
1389 | addxcc c_1,t_2,c_1 | ||
1390 | addx %g0,%g0,c_2 | ||
1391 | addcc c_3,t_1,c_3 | ||
1392 | addxcc c_1,t_2,c_1 != | ||
1393 | addx c_2,%g0,c_2 | ||
1394 | ld ap(3),a_3 | ||
1395 | umul a_1,a_1,t_1 !sqr_add_c(a,1,c3,c1,c2); | ||
1396 | addcc c_3,t_1,c_3 != | ||
1397 | rd %y,t_2 | ||
1398 | addxcc c_1,t_2,c_1 | ||
1399 | st c_3,rp(2) !r[2]=c3; | ||
1400 | addx c_2,%g0,c_2 != | ||
1401 | |||
1402 | umul a_0,a_3,t_1 !sqr_add_c2(a,3,0,c1,c2,c3); | ||
1403 | addcc c_1,t_1,c_1 | ||
1404 | rd %y,t_2 | ||
1405 | addxcc c_2,t_2,c_2 != | ||
1406 | addx %g0,%g0,c_3 | ||
1407 | addcc c_1,t_1,c_1 | ||
1408 | addxcc c_2,t_2,c_2 | ||
1409 | addx c_3,%g0,c_3 != | ||
1410 | umul a_1,a_2,t_1 !sqr_add_c2(a,2,1,c1,c2,c3); | ||
1411 | addcc c_1,t_1,c_1 | ||
1412 | rd %y,t_2 | ||
1413 | addxcc c_2,t_2,c_2 != | ||
1414 | addx c_3,%g0,c_3 | ||
1415 | addcc c_1,t_1,c_1 | ||
1416 | addxcc c_2,t_2,c_2 | ||
1417 | addx c_3,%g0,c_3 != | ||
1418 | st c_1,rp(3) !r[3]=c1; | ||
1419 | |||
1420 | umul a_3,a_1,t_1 !sqr_add_c2(a,3,1,c2,c3,c1); | ||
1421 | addcc c_2,t_1,c_2 | ||
1422 | rd %y,t_2 != | ||
1423 | addxcc c_3,t_2,c_3 | ||
1424 | addx %g0,%g0,c_1 | ||
1425 | addcc c_2,t_1,c_2 | ||
1426 | addxcc c_3,t_2,c_3 != | ||
1427 | addx c_1,%g0,c_1 | ||
1428 | umul a_2,a_2,t_1 !sqr_add_c(a,2,c2,c3,c1); | ||
1429 | addcc c_2,t_1,c_2 | ||
1430 | rd %y,t_2 != | ||
1431 | addxcc c_3,t_2,c_3 | ||
1432 | addx c_1,%g0,c_1 | ||
1433 | st c_2,rp(4) !r[4]=c2; | ||
1434 | |||
1435 | umul a_2,a_3,t_1 !=!sqr_add_c2(a,3,2,c3,c1,c2); | ||
1436 | addcc c_3,t_1,c_3 | ||
1437 | rd %y,t_2 | ||
1438 | addxcc c_1,t_2,c_1 | ||
1439 | addx %g0,%g0,c_2 != | ||
1440 | addcc c_3,t_1,c_3 | ||
1441 | addxcc c_1,t_2,c_1 | ||
1442 | st c_3,rp(5) !r[5]=c3; | ||
1443 | addx c_2,%g0,c_2 != | ||
1444 | |||
1445 | umul a_3,a_3,t_1 !sqr_add_c(a,3,c1,c2,c3); | ||
1446 | addcc c_1,t_1,c_1 | ||
1447 | rd %y,t_2 | ||
1448 | addxcc c_2,t_2,c_2 != | ||
1449 | st c_1,rp(6) !r[6]=c1; | ||
1450 | st c_2,rp(7) !r[7]=c2; | ||
1451 | |||
1452 | ret | ||
1453 | restore %g0,%g0,%o0 | ||
1454 | |||
1455 | .type bn_sqr_comba4,#function | ||
1456 | .size bn_sqr_comba4,(.-bn_sqr_comba4) | ||
1457 | |||
1458 | .align 32 | ||
diff --git a/src/lib/libcrypto/bn/asm/sparcv8plus.S b/src/lib/libcrypto/bn/asm/sparcv8plus.S new file mode 100644 index 0000000000..0074dfdb75 --- /dev/null +++ b/src/lib/libcrypto/bn/asm/sparcv8plus.S | |||
@@ -0,0 +1,1535 @@ | |||
1 | .ident "sparcv8plus.s, Version 1.4" | ||
2 | .ident "SPARC v9 ISA artwork by Andy Polyakov <appro@fy.chalmers.se>" | ||
3 | |||
4 | /* | ||
5 | * ==================================================================== | ||
6 | * Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL | ||
7 | * project. | ||
8 | * | ||
9 | * Rights for redistribution and usage in source and binary forms are | ||
10 | * granted according to the OpenSSL license. Warranty of any kind is | ||
11 | * disclaimed. | ||
12 | * ==================================================================== | ||
13 | */ | ||
14 | |||
15 | /* | ||
16 | * This is my modest contributon to OpenSSL project (see | ||
17 | * http://www.openssl.org/ for more information about it) and is | ||
18 | * a drop-in UltraSPARC ISA replacement for crypto/bn/bn_asm.c | ||
19 | * module. For updates see http://fy.chalmers.se/~appro/hpe/. | ||
20 | * | ||
21 | * Questions-n-answers. | ||
22 | * | ||
23 | * Q. How to compile? | ||
24 | * A. With SC4.x/SC5.x: | ||
25 | * | ||
26 | * cc -xarch=v8plus -c bn_asm.sparc.v8plus.S -o bn_asm.o | ||
27 | * | ||
28 | * and with gcc: | ||
29 | * | ||
30 | * gcc -mcpu=ultrasparc -c bn_asm.sparc.v8plus.S -o bn_asm.o | ||
31 | * | ||
32 | * or if above fails (it does if you have gas installed): | ||
33 | * | ||
34 | * gcc -E bn_asm.sparc.v8plus.S | as -xarch=v8plus /dev/fd/0 -o bn_asm.o | ||
35 | * | ||
36 | * Quick-n-dirty way to fuse the module into the library. | ||
37 | * Provided that the library is already configured and built | ||
38 | * (in 0.9.2 case with no-asm option): | ||
39 | * | ||
40 | * # cd crypto/bn | ||
41 | * # cp /some/place/bn_asm.sparc.v8plus.S . | ||
42 | * # cc -xarch=v8plus -c bn_asm.sparc.v8plus.S -o bn_asm.o | ||
43 | * # make | ||
44 | * # cd ../.. | ||
45 | * # make; make test | ||
46 | * | ||
47 | * Quick-n-dirty way to get rid of it: | ||
48 | * | ||
49 | * # cd crypto/bn | ||
50 | * # touch bn_asm.c | ||
51 | * # make | ||
52 | * # cd ../.. | ||
53 | * # make; make test | ||
54 | * | ||
55 | * Q. V8plus achitecture? What kind of beast is that? | ||
56 | * A. Well, it's rather a programming model than an architecture... | ||
57 | * It's actually v9-compliant, i.e. *any* UltraSPARC, CPU under | ||
58 | * special conditions, namely when kernel doesn't preserve upper | ||
59 | * 32 bits of otherwise 64-bit registers during a context switch. | ||
60 | * | ||
61 | * Q. Why just UltraSPARC? What about SuperSPARC? | ||
62 | * A. Original release did target UltraSPARC only. Now SuperSPARC | ||
63 | * version is provided along. Both version share bn_*comba[48] | ||
64 | * implementations (see comment later in code for explanation). | ||
65 | * But what's so special about this UltraSPARC implementation? | ||
66 | * Why didn't I let compiler do the job? Trouble is that most of | ||
67 | * available compilers (well, SC5.0 is the only exception) don't | ||
68 | * attempt to take advantage of UltraSPARC's 64-bitness under | ||
69 | * 32-bit kernels even though it's perfectly possible (see next | ||
70 | * question). | ||
71 | * | ||
72 | * Q. 64-bit registers under 32-bit kernels? Didn't you just say it | ||
73 | * doesn't work? | ||
74 | * A. You can't adress *all* registers as 64-bit wide:-( The catch is | ||
75 | * that you actually may rely upon %o0-%o5 and %g1-%g4 being fully | ||
76 | * preserved if you're in a leaf function, i.e. such never calling | ||
77 | * any other functions. All functions in this module are leaf and | ||
78 | * 10 registers is a handful. And as a matter of fact none-"comba" | ||
79 | * routines don't require even that much and I could even afford to | ||
80 | * not allocate own stack frame for 'em:-) | ||
81 | * | ||
82 | * Q. What about 64-bit kernels? | ||
83 | * A. What about 'em? Just kidding:-) Pure 64-bit version is currently | ||
84 | * under evaluation and development... | ||
85 | * | ||
86 | * Q. What about shared libraries? | ||
87 | * A. What about 'em? Kidding again:-) Code does *not* contain any | ||
88 | * code position dependencies and it's safe to include it into | ||
89 | * shared library as is. | ||
90 | * | ||
91 | * Q. How much faster does it go? | ||
92 | * A. Do you have a good benchmark? In either case below is what I | ||
93 | * experience with crypto/bn/expspeed.c test program: | ||
94 | * | ||
95 | * v8plus module on U10/300MHz against bn_asm.c compiled with: | ||
96 | * | ||
97 | * cc-5.0 -xarch=v8plus -xO5 -xdepend +7-12% | ||
98 | * cc-4.2 -xarch=v8plus -xO5 -xdepend +25-35% | ||
99 | * egcs-1.1.2 -mcpu=ultrasparc -O3 +35-45% | ||
100 | * | ||
101 | * v8 module on SS10/60MHz against bn_asm.c compiled with: | ||
102 | * | ||
103 | * cc-5.0 -xarch=v8 -xO5 -xdepend +7-10% | ||
104 | * cc-4.2 -xarch=v8 -xO5 -xdepend +10% | ||
105 | * egcs-1.1.2 -mv8 -O3 +35-45% | ||
106 | * | ||
107 | * As you can see it's damn hard to beat the new Sun C compiler | ||
108 | * and it's in first place GNU C users who will appreciate this | ||
109 | * assembler implementation:-) | ||
110 | */ | ||
111 | |||
112 | /* | ||
113 | * Revision history. | ||
114 | * | ||
115 | * 1.0 - initial release; | ||
116 | * 1.1 - new loop unrolling model(*); | ||
117 | * - some more fine tuning; | ||
118 | * 1.2 - made gas friendly; | ||
119 | * - updates to documentation concerning v9; | ||
120 | * - new performance comparison matrix; | ||
121 | * 1.3 - fixed problem with /usr/ccs/lib/cpp; | ||
122 | * 1.4 - native V9 bn_*_comba[48] implementation (15% more efficient) | ||
123 | * resulting in slight overall performance kick; | ||
124 | * - some retunes; | ||
125 | * - support for GNU as added; | ||
126 | * | ||
127 | * (*) Originally unrolled loop looked like this: | ||
128 | * for (;;) { | ||
129 | * op(p+0); if (--n==0) break; | ||
130 | * op(p+1); if (--n==0) break; | ||
131 | * op(p+2); if (--n==0) break; | ||
132 | * op(p+3); if (--n==0) break; | ||
133 | * p+=4; | ||
134 | * } | ||
135 | * I unroll according to following: | ||
136 | * while (n&~3) { | ||
137 | * op(p+0); op(p+1); op(p+2); op(p+3); | ||
138 | * p+=4; n=-4; | ||
139 | * } | ||
140 | * if (n) { | ||
141 | * op(p+0); if (--n==0) return; | ||
142 | * op(p+2); if (--n==0) return; | ||
143 | * op(p+3); return; | ||
144 | * } | ||
145 | */ | ||
146 | |||
147 | /* | ||
148 | * GNU assembler can't stand stuw:-( | ||
149 | */ | ||
150 | #define stuw st | ||
151 | |||
152 | .section ".text",#alloc,#execinstr | ||
153 | .file "bn_asm.sparc.v8plus.S" | ||
154 | |||
155 | .align 32 | ||
156 | |||
157 | .global bn_mul_add_words | ||
158 | /* | ||
159 | * BN_ULONG bn_mul_add_words(rp,ap,num,w) | ||
160 | * BN_ULONG *rp,*ap; | ||
161 | * int num; | ||
162 | * BN_ULONG w; | ||
163 | */ | ||
164 | bn_mul_add_words: | ||
165 | brgz,a %o2,.L_bn_mul_add_words_proceed | ||
166 | lduw [%o1],%g2 | ||
167 | retl | ||
168 | clr %o0 | ||
169 | |||
170 | .L_bn_mul_add_words_proceed: | ||
171 | srl %o3,%g0,%o3 ! clruw %o3 | ||
172 | andcc %o2,-4,%g0 | ||
173 | bz,pn %icc,.L_bn_mul_add_words_tail | ||
174 | clr %o5 | ||
175 | |||
176 | .L_bn_mul_add_words_loop: ! wow! 32 aligned! | ||
177 | lduw [%o0],%g1 | ||
178 | lduw [%o1+4],%g3 | ||
179 | mulx %o3,%g2,%g2 | ||
180 | add %g1,%o5,%o4 | ||
181 | nop | ||
182 | add %o4,%g2,%o4 | ||
183 | stuw %o4,[%o0] | ||
184 | srlx %o4,32,%o5 | ||
185 | |||
186 | lduw [%o0+4],%g1 | ||
187 | lduw [%o1+8],%g2 | ||
188 | mulx %o3,%g3,%g3 | ||
189 | add %g1,%o5,%o4 | ||
190 | dec 4,%o2 | ||
191 | add %o4,%g3,%o4 | ||
192 | stuw %o4,[%o0+4] | ||
193 | srlx %o4,32,%o5 | ||
194 | |||
195 | lduw [%o0+8],%g1 | ||
196 | lduw [%o1+12],%g3 | ||
197 | mulx %o3,%g2,%g2 | ||
198 | add %g1,%o5,%o4 | ||
199 | inc 16,%o1 | ||
200 | add %o4,%g2,%o4 | ||
201 | stuw %o4,[%o0+8] | ||
202 | srlx %o4,32,%o5 | ||
203 | |||
204 | lduw [%o0+12],%g1 | ||
205 | mulx %o3,%g3,%g3 | ||
206 | add %g1,%o5,%o4 | ||
207 | inc 16,%o0 | ||
208 | add %o4,%g3,%o4 | ||
209 | andcc %o2,-4,%g0 | ||
210 | stuw %o4,[%o0-4] | ||
211 | srlx %o4,32,%o5 | ||
212 | bnz,a,pt %icc,.L_bn_mul_add_words_loop | ||
213 | lduw [%o1],%g2 | ||
214 | |||
215 | brnz,a,pn %o2,.L_bn_mul_add_words_tail | ||
216 | lduw [%o1],%g2 | ||
217 | .L_bn_mul_add_words_return: | ||
218 | retl | ||
219 | mov %o5,%o0 | ||
220 | |||
221 | .L_bn_mul_add_words_tail: | ||
222 | lduw [%o0],%g1 | ||
223 | mulx %o3,%g2,%g2 | ||
224 | add %g1,%o5,%o4 | ||
225 | dec %o2 | ||
226 | add %o4,%g2,%o4 | ||
227 | srlx %o4,32,%o5 | ||
228 | brz,pt %o2,.L_bn_mul_add_words_return | ||
229 | stuw %o4,[%o0] | ||
230 | |||
231 | lduw [%o1+4],%g2 | ||
232 | lduw [%o0+4],%g1 | ||
233 | mulx %o3,%g2,%g2 | ||
234 | add %g1,%o5,%o4 | ||
235 | dec %o2 | ||
236 | add %o4,%g2,%o4 | ||
237 | srlx %o4,32,%o5 | ||
238 | brz,pt %o2,.L_bn_mul_add_words_return | ||
239 | stuw %o4,[%o0+4] | ||
240 | |||
241 | lduw [%o1+8],%g2 | ||
242 | lduw [%o0+8],%g1 | ||
243 | mulx %o3,%g2,%g2 | ||
244 | add %g1,%o5,%o4 | ||
245 | add %o4,%g2,%o4 | ||
246 | stuw %o4,[%o0+8] | ||
247 | retl | ||
248 | srlx %o4,32,%o0 | ||
249 | |||
250 | .type bn_mul_add_words,#function | ||
251 | .size bn_mul_add_words,(.-bn_mul_add_words) | ||
252 | |||
253 | .align 32 | ||
254 | |||
255 | .global bn_mul_words | ||
256 | /* | ||
257 | * BN_ULONG bn_mul_words(rp,ap,num,w) | ||
258 | * BN_ULONG *rp,*ap; | ||
259 | * int num; | ||
260 | * BN_ULONG w; | ||
261 | */ | ||
262 | bn_mul_words: | ||
263 | brgz,a %o2,.L_bn_mul_words_proceeed | ||
264 | lduw [%o1],%g2 | ||
265 | retl | ||
266 | clr %o0 | ||
267 | |||
268 | .L_bn_mul_words_proceeed: | ||
269 | srl %o3,%g0,%o3 ! clruw %o3 | ||
270 | andcc %o2,-4,%g0 | ||
271 | bz,pn %icc,.L_bn_mul_words_tail | ||
272 | clr %o5 | ||
273 | |||
274 | .L_bn_mul_words_loop: ! wow! 32 aligned! | ||
275 | lduw [%o1+4],%g3 | ||
276 | mulx %o3,%g2,%g2 | ||
277 | add %g2,%o5,%o4 | ||
278 | nop | ||
279 | stuw %o4,[%o0] | ||
280 | srlx %o4,32,%o5 | ||
281 | |||
282 | lduw [%o1+8],%g2 | ||
283 | mulx %o3,%g3,%g3 | ||
284 | add %g3,%o5,%o4 | ||
285 | dec 4,%o2 | ||
286 | stuw %o4,[%o0+4] | ||
287 | srlx %o4,32,%o5 | ||
288 | |||
289 | lduw [%o1+12],%g3 | ||
290 | mulx %o3,%g2,%g2 | ||
291 | add %g2,%o5,%o4 | ||
292 | inc 16,%o1 | ||
293 | stuw %o4,[%o0+8] | ||
294 | srlx %o4,32,%o5 | ||
295 | |||
296 | mulx %o3,%g3,%g3 | ||
297 | add %g3,%o5,%o4 | ||
298 | inc 16,%o0 | ||
299 | stuw %o4,[%o0-4] | ||
300 | srlx %o4,32,%o5 | ||
301 | andcc %o2,-4,%g0 | ||
302 | bnz,a,pt %icc,.L_bn_mul_words_loop | ||
303 | lduw [%o1],%g2 | ||
304 | nop | ||
305 | nop | ||
306 | |||
307 | brnz,a,pn %o2,.L_bn_mul_words_tail | ||
308 | lduw [%o1],%g2 | ||
309 | .L_bn_mul_words_return: | ||
310 | retl | ||
311 | mov %o5,%o0 | ||
312 | |||
313 | .L_bn_mul_words_tail: | ||
314 | mulx %o3,%g2,%g2 | ||
315 | add %g2,%o5,%o4 | ||
316 | dec %o2 | ||
317 | srlx %o4,32,%o5 | ||
318 | brz,pt %o2,.L_bn_mul_words_return | ||
319 | stuw %o4,[%o0] | ||
320 | |||
321 | lduw [%o1+4],%g2 | ||
322 | mulx %o3,%g2,%g2 | ||
323 | add %g2,%o5,%o4 | ||
324 | dec %o2 | ||
325 | srlx %o4,32,%o5 | ||
326 | brz,pt %o2,.L_bn_mul_words_return | ||
327 | stuw %o4,[%o0+4] | ||
328 | |||
329 | lduw [%o1+8],%g2 | ||
330 | mulx %o3,%g2,%g2 | ||
331 | add %g2,%o5,%o4 | ||
332 | stuw %o4,[%o0+8] | ||
333 | retl | ||
334 | srlx %o4,32,%o0 | ||
335 | |||
336 | .type bn_mul_words,#function | ||
337 | .size bn_mul_words,(.-bn_mul_words) | ||
338 | |||
339 | .align 32 | ||
340 | .global bn_sqr_words | ||
341 | /* | ||
342 | * void bn_sqr_words(r,a,n) | ||
343 | * BN_ULONG *r,*a; | ||
344 | * int n; | ||
345 | */ | ||
346 | bn_sqr_words: | ||
347 | brgz,a %o2,.L_bn_sqr_words_proceeed | ||
348 | lduw [%o1],%g2 | ||
349 | retl | ||
350 | clr %o0 | ||
351 | |||
352 | .L_bn_sqr_words_proceeed: | ||
353 | andcc %o2,-4,%g0 | ||
354 | nop | ||
355 | bz,pn %icc,.L_bn_sqr_words_tail | ||
356 | nop | ||
357 | |||
358 | .L_bn_sqr_words_loop: ! wow! 32 aligned! | ||
359 | lduw [%o1+4],%g3 | ||
360 | mulx %g2,%g2,%o4 | ||
361 | stuw %o4,[%o0] | ||
362 | srlx %o4,32,%o5 | ||
363 | stuw %o5,[%o0+4] | ||
364 | nop | ||
365 | |||
366 | lduw [%o1+8],%g2 | ||
367 | mulx %g3,%g3,%o4 | ||
368 | dec 4,%o2 | ||
369 | stuw %o4,[%o0+8] | ||
370 | srlx %o4,32,%o5 | ||
371 | stuw %o5,[%o0+12] | ||
372 | |||
373 | lduw [%o1+12],%g3 | ||
374 | mulx %g2,%g2,%o4 | ||
375 | srlx %o4,32,%o5 | ||
376 | stuw %o4,[%o0+16] | ||
377 | inc 16,%o1 | ||
378 | stuw %o5,[%o0+20] | ||
379 | |||
380 | mulx %g3,%g3,%o4 | ||
381 | inc 32,%o0 | ||
382 | stuw %o4,[%o0-8] | ||
383 | srlx %o4,32,%o5 | ||
384 | andcc %o2,-4,%g2 | ||
385 | stuw %o5,[%o0-4] | ||
386 | bnz,a,pt %icc,.L_bn_sqr_words_loop | ||
387 | lduw [%o1],%g2 | ||
388 | nop | ||
389 | |||
390 | brnz,a,pn %o2,.L_bn_sqr_words_tail | ||
391 | lduw [%o1],%g2 | ||
392 | .L_bn_sqr_words_return: | ||
393 | retl | ||
394 | clr %o0 | ||
395 | |||
396 | .L_bn_sqr_words_tail: | ||
397 | mulx %g2,%g2,%o4 | ||
398 | dec %o2 | ||
399 | stuw %o4,[%o0] | ||
400 | srlx %o4,32,%o5 | ||
401 | brz,pt %o2,.L_bn_sqr_words_return | ||
402 | stuw %o5,[%o0+4] | ||
403 | |||
404 | lduw [%o1+4],%g2 | ||
405 | mulx %g2,%g2,%o4 | ||
406 | dec %o2 | ||
407 | stuw %o4,[%o0+8] | ||
408 | srlx %o4,32,%o5 | ||
409 | brz,pt %o2,.L_bn_sqr_words_return | ||
410 | stuw %o5,[%o0+12] | ||
411 | |||
412 | lduw [%o1+8],%g2 | ||
413 | mulx %g2,%g2,%o4 | ||
414 | srlx %o4,32,%o5 | ||
415 | stuw %o4,[%o0+16] | ||
416 | stuw %o5,[%o0+20] | ||
417 | retl | ||
418 | clr %o0 | ||
419 | |||
420 | .type bn_sqr_words,#function | ||
421 | .size bn_sqr_words,(.-bn_sqr_words) | ||
422 | |||
423 | .align 32 | ||
424 | .global bn_div_words | ||
425 | /* | ||
426 | * BN_ULONG bn_div_words(h,l,d) | ||
427 | * BN_ULONG h,l,d; | ||
428 | */ | ||
429 | bn_div_words: | ||
430 | sllx %o0,32,%o0 | ||
431 | or %o0,%o1,%o0 | ||
432 | udivx %o0,%o2,%o0 | ||
433 | retl | ||
434 | srl %o0,%g0,%o0 ! clruw %o0 | ||
435 | |||
436 | .type bn_div_words,#function | ||
437 | .size bn_div_words,(.-bn_div_words) | ||
438 | |||
439 | .align 32 | ||
440 | |||
441 | .global bn_add_words | ||
442 | /* | ||
443 | * BN_ULONG bn_add_words(rp,ap,bp,n) | ||
444 | * BN_ULONG *rp,*ap,*bp; | ||
445 | * int n; | ||
446 | */ | ||
447 | bn_add_words: | ||
448 | brgz,a %o3,.L_bn_add_words_proceed | ||
449 | lduw [%o1],%o4 | ||
450 | retl | ||
451 | clr %o0 | ||
452 | |||
453 | .L_bn_add_words_proceed: | ||
454 | andcc %o3,-4,%g0 | ||
455 | bz,pn %icc,.L_bn_add_words_tail | ||
456 | addcc %g0,0,%g0 ! clear carry flag | ||
457 | nop | ||
458 | |||
459 | .L_bn_add_words_loop: ! wow! 32 aligned! | ||
460 | dec 4,%o3 | ||
461 | lduw [%o2],%o5 | ||
462 | lduw [%o1+4],%g1 | ||
463 | lduw [%o2+4],%g2 | ||
464 | lduw [%o1+8],%g3 | ||
465 | lduw [%o2+8],%g4 | ||
466 | addccc %o5,%o4,%o5 | ||
467 | stuw %o5,[%o0] | ||
468 | |||
469 | lduw [%o1+12],%o4 | ||
470 | lduw [%o2+12],%o5 | ||
471 | inc 16,%o1 | ||
472 | addccc %g1,%g2,%g1 | ||
473 | stuw %g1,[%o0+4] | ||
474 | |||
475 | inc 16,%o2 | ||
476 | addccc %g3,%g4,%g3 | ||
477 | stuw %g3,[%o0+8] | ||
478 | |||
479 | inc 16,%o0 | ||
480 | addccc %o5,%o4,%o5 | ||
481 | stuw %o5,[%o0-4] | ||
482 | and %o3,-4,%g1 | ||
483 | brnz,a,pt %g1,.L_bn_add_words_loop | ||
484 | lduw [%o1],%o4 | ||
485 | |||
486 | brnz,a,pn %o3,.L_bn_add_words_tail | ||
487 | lduw [%o1],%o4 | ||
488 | .L_bn_add_words_return: | ||
489 | clr %o0 | ||
490 | retl | ||
491 | movcs %icc,1,%o0 | ||
492 | nop | ||
493 | |||
494 | .L_bn_add_words_tail: | ||
495 | lduw [%o2],%o5 | ||
496 | dec %o3 | ||
497 | addccc %o5,%o4,%o5 | ||
498 | brz,pt %o3,.L_bn_add_words_return | ||
499 | stuw %o5,[%o0] | ||
500 | |||
501 | lduw [%o1+4],%o4 | ||
502 | lduw [%o2+4],%o5 | ||
503 | dec %o3 | ||
504 | addccc %o5,%o4,%o5 | ||
505 | brz,pt %o3,.L_bn_add_words_return | ||
506 | stuw %o5,[%o0+4] | ||
507 | |||
508 | lduw [%o1+8],%o4 | ||
509 | lduw [%o2+8],%o5 | ||
510 | addccc %o5,%o4,%o5 | ||
511 | stuw %o5,[%o0+8] | ||
512 | clr %o0 | ||
513 | retl | ||
514 | movcs %icc,1,%o0 | ||
515 | |||
516 | .type bn_add_words,#function | ||
517 | .size bn_add_words,(.-bn_add_words) | ||
518 | |||
519 | .global bn_sub_words | ||
520 | /* | ||
521 | * BN_ULONG bn_sub_words(rp,ap,bp,n) | ||
522 | * BN_ULONG *rp,*ap,*bp; | ||
523 | * int n; | ||
524 | */ | ||
525 | bn_sub_words: | ||
526 | brgz,a %o3,.L_bn_sub_words_proceed | ||
527 | lduw [%o1],%o4 | ||
528 | retl | ||
529 | clr %o0 | ||
530 | |||
531 | .L_bn_sub_words_proceed: | ||
532 | andcc %o3,-4,%g0 | ||
533 | bz,pn %icc,.L_bn_sub_words_tail | ||
534 | addcc %g0,0,%g0 ! clear carry flag | ||
535 | nop | ||
536 | |||
537 | .L_bn_sub_words_loop: ! wow! 32 aligned! | ||
538 | dec 4,%o3 | ||
539 | lduw [%o2],%o5 | ||
540 | lduw [%o1+4],%g1 | ||
541 | lduw [%o2+4],%g2 | ||
542 | lduw [%o1+8],%g3 | ||
543 | lduw [%o2+8],%g4 | ||
544 | subccc %o4,%o5,%o5 | ||
545 | stuw %o5,[%o0] | ||
546 | |||
547 | lduw [%o1+12],%o4 | ||
548 | lduw [%o2+12],%o5 | ||
549 | inc 16,%o1 | ||
550 | subccc %g1,%g2,%g2 | ||
551 | stuw %g2,[%o0+4] | ||
552 | |||
553 | inc 16,%o2 | ||
554 | subccc %g3,%g4,%g4 | ||
555 | stuw %g4,[%o0+8] | ||
556 | |||
557 | inc 16,%o0 | ||
558 | subccc %o4,%o5,%o5 | ||
559 | stuw %o5,[%o0-4] | ||
560 | and %o3,-4,%g1 | ||
561 | brnz,a,pt %g1,.L_bn_sub_words_loop | ||
562 | lduw [%o1],%o4 | ||
563 | |||
564 | brnz,a,pn %o3,.L_bn_sub_words_tail | ||
565 | lduw [%o1],%o4 | ||
566 | .L_bn_sub_words_return: | ||
567 | clr %o0 | ||
568 | retl | ||
569 | movcs %icc,1,%o0 | ||
570 | nop | ||
571 | |||
572 | .L_bn_sub_words_tail: ! wow! 32 aligned! | ||
573 | lduw [%o2],%o5 | ||
574 | dec %o3 | ||
575 | subccc %o4,%o5,%o5 | ||
576 | brz,pt %o3,.L_bn_sub_words_return | ||
577 | stuw %o5,[%o0] | ||
578 | |||
579 | lduw [%o1+4],%o4 | ||
580 | lduw [%o2+4],%o5 | ||
581 | dec %o3 | ||
582 | subccc %o4,%o5,%o5 | ||
583 | brz,pt %o3,.L_bn_sub_words_return | ||
584 | stuw %o5,[%o0+4] | ||
585 | |||
586 | lduw [%o1+8],%o4 | ||
587 | lduw [%o2+8],%o5 | ||
588 | subccc %o4,%o5,%o5 | ||
589 | stuw %o5,[%o0+8] | ||
590 | clr %o0 | ||
591 | retl | ||
592 | movcs %icc,1,%o0 | ||
593 | |||
594 | .type bn_sub_words,#function | ||
595 | .size bn_sub_words,(.-bn_sub_words) | ||
596 | |||
597 | /* | ||
598 | * Code below depends on the fact that upper parts of the %l0-%l7 | ||
599 | * and %i0-%i7 are zeroed by kernel after context switch. In | ||
600 | * previous versions this comment stated that "the trouble is that | ||
601 | * it's not feasible to implement the mumbo-jumbo in less V9 | ||
602 | * instructions:-(" which apparently isn't true thanks to | ||
603 | * 'bcs,a %xcc,.+8; inc %rd' pair. But the performance improvement | ||
604 | * results not from the shorter code, but from elimination of | ||
605 | * multicycle none-pairable 'rd %y,%rd' instructions. | ||
606 | * | ||
607 | * Andy. | ||
608 | */ | ||
609 | |||
610 | #define FRAME_SIZE -96 | ||
611 | |||
612 | /* | ||
613 | * Here is register usage map for *all* routines below. | ||
614 | */ | ||
615 | #define t_1 %o0 | ||
616 | #define t_2 %o1 | ||
617 | #define c_12 %o2 | ||
618 | #define c_3 %o3 | ||
619 | |||
620 | #define ap(I) [%i1+4*I] | ||
621 | #define bp(I) [%i2+4*I] | ||
622 | #define rp(I) [%i0+4*I] | ||
623 | |||
624 | #define a_0 %l0 | ||
625 | #define a_1 %l1 | ||
626 | #define a_2 %l2 | ||
627 | #define a_3 %l3 | ||
628 | #define a_4 %l4 | ||
629 | #define a_5 %l5 | ||
630 | #define a_6 %l6 | ||
631 | #define a_7 %l7 | ||
632 | |||
633 | #define b_0 %i3 | ||
634 | #define b_1 %i4 | ||
635 | #define b_2 %i5 | ||
636 | #define b_3 %o4 | ||
637 | #define b_4 %o5 | ||
638 | #define b_5 %o7 | ||
639 | #define b_6 %g1 | ||
640 | #define b_7 %g4 | ||
641 | |||
642 | .align 32 | ||
643 | .global bn_mul_comba8 | ||
644 | /* | ||
645 | * void bn_mul_comba8(r,a,b) | ||
646 | * BN_ULONG *r,*a,*b; | ||
647 | */ | ||
648 | bn_mul_comba8: | ||
649 | save %sp,FRAME_SIZE,%sp | ||
650 | mov 1,t_2 | ||
651 | lduw ap(0),a_0 | ||
652 | sllx t_2,32,t_2 | ||
653 | lduw bp(0),b_0 != | ||
654 | lduw bp(1),b_1 | ||
655 | mulx a_0,b_0,t_1 !mul_add_c(a[0],b[0],c1,c2,c3); | ||
656 | srlx t_1,32,c_12 | ||
657 | stuw t_1,rp(0) !=!r[0]=c1; | ||
658 | |||
659 | lduw ap(1),a_1 | ||
660 | mulx a_0,b_1,t_1 !mul_add_c(a[0],b[1],c2,c3,c1); | ||
661 | addcc c_12,t_1,c_12 | ||
662 | clr c_3 != | ||
663 | bcs,a %xcc,.+8 | ||
664 | add c_3,t_2,c_3 | ||
665 | lduw ap(2),a_2 | ||
666 | mulx a_1,b_0,t_1 !=!mul_add_c(a[1],b[0],c2,c3,c1); | ||
667 | addcc c_12,t_1,t_1 | ||
668 | bcs,a %xcc,.+8 | ||
669 | add c_3,t_2,c_3 | ||
670 | srlx t_1,32,c_12 != | ||
671 | stuw t_1,rp(1) !r[1]=c2; | ||
672 | or c_12,c_3,c_12 | ||
673 | |||
674 | mulx a_2,b_0,t_1 !mul_add_c(a[2],b[0],c3,c1,c2); | ||
675 | addcc c_12,t_1,c_12 != | ||
676 | clr c_3 | ||
677 | bcs,a %xcc,.+8 | ||
678 | add c_3,t_2,c_3 | ||
679 | lduw bp(2),b_2 != | ||
680 | mulx a_1,b_1,t_1 !mul_add_c(a[1],b[1],c3,c1,c2); | ||
681 | addcc c_12,t_1,c_12 | ||
682 | bcs,a %xcc,.+8 | ||
683 | add c_3,t_2,c_3 != | ||
684 | lduw bp(3),b_3 | ||
685 | mulx a_0,b_2,t_1 !mul_add_c(a[0],b[2],c3,c1,c2); | ||
686 | addcc c_12,t_1,t_1 | ||
687 | bcs,a %xcc,.+8 != | ||
688 | add c_3,t_2,c_3 | ||
689 | srlx t_1,32,c_12 | ||
690 | stuw t_1,rp(2) !r[2]=c3; | ||
691 | or c_12,c_3,c_12 != | ||
692 | |||
693 | mulx a_0,b_3,t_1 !mul_add_c(a[0],b[3],c1,c2,c3); | ||
694 | addcc c_12,t_1,c_12 | ||
695 | clr c_3 | ||
696 | bcs,a %xcc,.+8 != | ||
697 | add c_3,t_2,c_3 | ||
698 | mulx a_1,b_2,t_1 !=!mul_add_c(a[1],b[2],c1,c2,c3); | ||
699 | addcc c_12,t_1,c_12 | ||
700 | bcs,a %xcc,.+8 != | ||
701 | add c_3,t_2,c_3 | ||
702 | lduw ap(3),a_3 | ||
703 | mulx a_2,b_1,t_1 !mul_add_c(a[2],b[1],c1,c2,c3); | ||
704 | addcc c_12,t_1,c_12 != | ||
705 | bcs,a %xcc,.+8 | ||
706 | add c_3,t_2,c_3 | ||
707 | lduw ap(4),a_4 | ||
708 | mulx a_3,b_0,t_1 !=!mul_add_c(a[3],b[0],c1,c2,c3);!= | ||
709 | addcc c_12,t_1,t_1 | ||
710 | bcs,a %xcc,.+8 | ||
711 | add c_3,t_2,c_3 | ||
712 | srlx t_1,32,c_12 != | ||
713 | stuw t_1,rp(3) !r[3]=c1; | ||
714 | or c_12,c_3,c_12 | ||
715 | |||
716 | mulx a_4,b_0,t_1 !mul_add_c(a[4],b[0],c2,c3,c1); | ||
717 | addcc c_12,t_1,c_12 != | ||
718 | clr c_3 | ||
719 | bcs,a %xcc,.+8 | ||
720 | add c_3,t_2,c_3 | ||
721 | mulx a_3,b_1,t_1 !=!mul_add_c(a[3],b[1],c2,c3,c1); | ||
722 | addcc c_12,t_1,c_12 | ||
723 | bcs,a %xcc,.+8 | ||
724 | add c_3,t_2,c_3 | ||
725 | mulx a_2,b_2,t_1 !=!mul_add_c(a[2],b[2],c2,c3,c1); | ||
726 | addcc c_12,t_1,c_12 | ||
727 | bcs,a %xcc,.+8 | ||
728 | add c_3,t_2,c_3 | ||
729 | lduw bp(4),b_4 != | ||
730 | mulx a_1,b_3,t_1 !mul_add_c(a[1],b[3],c2,c3,c1); | ||
731 | addcc c_12,t_1,c_12 | ||
732 | bcs,a %xcc,.+8 | ||
733 | add c_3,t_2,c_3 != | ||
734 | lduw bp(5),b_5 | ||
735 | mulx a_0,b_4,t_1 !mul_add_c(a[0],b[4],c2,c3,c1); | ||
736 | addcc c_12,t_1,t_1 | ||
737 | bcs,a %xcc,.+8 != | ||
738 | add c_3,t_2,c_3 | ||
739 | srlx t_1,32,c_12 | ||
740 | stuw t_1,rp(4) !r[4]=c2; | ||
741 | or c_12,c_3,c_12 != | ||
742 | |||
743 | mulx a_0,b_5,t_1 !mul_add_c(a[0],b[5],c3,c1,c2); | ||
744 | addcc c_12,t_1,c_12 | ||
745 | clr c_3 | ||
746 | bcs,a %xcc,.+8 != | ||
747 | add c_3,t_2,c_3 | ||
748 | mulx a_1,b_4,t_1 !mul_add_c(a[1],b[4],c3,c1,c2); | ||
749 | addcc c_12,t_1,c_12 | ||
750 | bcs,a %xcc,.+8 != | ||
751 | add c_3,t_2,c_3 | ||
752 | mulx a_2,b_3,t_1 !mul_add_c(a[2],b[3],c3,c1,c2); | ||
753 | addcc c_12,t_1,c_12 | ||
754 | bcs,a %xcc,.+8 != | ||
755 | add c_3,t_2,c_3 | ||
756 | mulx a_3,b_2,t_1 !mul_add_c(a[3],b[2],c3,c1,c2); | ||
757 | addcc c_12,t_1,c_12 | ||
758 | bcs,a %xcc,.+8 != | ||
759 | add c_3,t_2,c_3 | ||
760 | lduw ap(5),a_5 | ||
761 | mulx a_4,b_1,t_1 !mul_add_c(a[4],b[1],c3,c1,c2); | ||
762 | addcc c_12,t_1,c_12 != | ||
763 | bcs,a %xcc,.+8 | ||
764 | add c_3,t_2,c_3 | ||
765 | lduw ap(6),a_6 | ||
766 | mulx a_5,b_0,t_1 !=!mul_add_c(a[5],b[0],c3,c1,c2); | ||
767 | addcc c_12,t_1,t_1 | ||
768 | bcs,a %xcc,.+8 | ||
769 | add c_3,t_2,c_3 | ||
770 | srlx t_1,32,c_12 != | ||
771 | stuw t_1,rp(5) !r[5]=c3; | ||
772 | or c_12,c_3,c_12 | ||
773 | |||
774 | mulx a_6,b_0,t_1 !mul_add_c(a[6],b[0],c1,c2,c3); | ||
775 | addcc c_12,t_1,c_12 != | ||
776 | clr c_3 | ||
777 | bcs,a %xcc,.+8 | ||
778 | add c_3,t_2,c_3 | ||
779 | mulx a_5,b_1,t_1 !=!mul_add_c(a[5],b[1],c1,c2,c3); | ||
780 | addcc c_12,t_1,c_12 | ||
781 | bcs,a %xcc,.+8 | ||
782 | add c_3,t_2,c_3 | ||
783 | mulx a_4,b_2,t_1 !=!mul_add_c(a[4],b[2],c1,c2,c3); | ||
784 | addcc c_12,t_1,c_12 | ||
785 | bcs,a %xcc,.+8 | ||
786 | add c_3,t_2,c_3 | ||
787 | mulx a_3,b_3,t_1 !=!mul_add_c(a[3],b[3],c1,c2,c3); | ||
788 | addcc c_12,t_1,c_12 | ||
789 | bcs,a %xcc,.+8 | ||
790 | add c_3,t_2,c_3 | ||
791 | mulx a_2,b_4,t_1 !=!mul_add_c(a[2],b[4],c1,c2,c3); | ||
792 | addcc c_12,t_1,c_12 | ||
793 | bcs,a %xcc,.+8 | ||
794 | add c_3,t_2,c_3 | ||
795 | lduw bp(6),b_6 != | ||
796 | mulx a_1,b_5,t_1 !mul_add_c(a[1],b[5],c1,c2,c3); | ||
797 | addcc c_12,t_1,c_12 | ||
798 | bcs,a %xcc,.+8 | ||
799 | add c_3,t_2,c_3 != | ||
800 | lduw bp(7),b_7 | ||
801 | mulx a_0,b_6,t_1 !mul_add_c(a[0],b[6],c1,c2,c3); | ||
802 | addcc c_12,t_1,t_1 | ||
803 | bcs,a %xcc,.+8 != | ||
804 | add c_3,t_2,c_3 | ||
805 | srlx t_1,32,c_12 | ||
806 | stuw t_1,rp(6) !r[6]=c1; | ||
807 | or c_12,c_3,c_12 != | ||
808 | |||
809 | mulx a_0,b_7,t_1 !mul_add_c(a[0],b[7],c2,c3,c1); | ||
810 | addcc c_12,t_1,c_12 | ||
811 | clr c_3 | ||
812 | bcs,a %xcc,.+8 != | ||
813 | add c_3,t_2,c_3 | ||
814 | mulx a_1,b_6,t_1 !mul_add_c(a[1],b[6],c2,c3,c1); | ||
815 | addcc c_12,t_1,c_12 | ||
816 | bcs,a %xcc,.+8 != | ||
817 | add c_3,t_2,c_3 | ||
818 | mulx a_2,b_5,t_1 !mul_add_c(a[2],b[5],c2,c3,c1); | ||
819 | addcc c_12,t_1,c_12 | ||
820 | bcs,a %xcc,.+8 != | ||
821 | add c_3,t_2,c_3 | ||
822 | mulx a_3,b_4,t_1 !mul_add_c(a[3],b[4],c2,c3,c1); | ||
823 | addcc c_12,t_1,c_12 | ||
824 | bcs,a %xcc,.+8 != | ||
825 | add c_3,t_2,c_3 | ||
826 | mulx a_4,b_3,t_1 !mul_add_c(a[4],b[3],c2,c3,c1); | ||
827 | addcc c_12,t_1,c_12 | ||
828 | bcs,a %xcc,.+8 != | ||
829 | add c_3,t_2,c_3 | ||
830 | mulx a_5,b_2,t_1 !mul_add_c(a[5],b[2],c2,c3,c1); | ||
831 | addcc c_12,t_1,c_12 | ||
832 | bcs,a %xcc,.+8 != | ||
833 | add c_3,t_2,c_3 | ||
834 | lduw ap(7),a_7 | ||
835 | mulx a_6,b_1,t_1 !=!mul_add_c(a[6],b[1],c2,c3,c1); | ||
836 | addcc c_12,t_1,c_12 | ||
837 | bcs,a %xcc,.+8 | ||
838 | add c_3,t_2,c_3 | ||
839 | mulx a_7,b_0,t_1 !=!mul_add_c(a[7],b[0],c2,c3,c1); | ||
840 | addcc c_12,t_1,t_1 | ||
841 | bcs,a %xcc,.+8 | ||
842 | add c_3,t_2,c_3 | ||
843 | srlx t_1,32,c_12 != | ||
844 | stuw t_1,rp(7) !r[7]=c2; | ||
845 | or c_12,c_3,c_12 | ||
846 | |||
847 | mulx a_7,b_1,t_1 !=!mul_add_c(a[7],b[1],c3,c1,c2); | ||
848 | addcc c_12,t_1,c_12 | ||
849 | clr c_3 | ||
850 | bcs,a %xcc,.+8 | ||
851 | add c_3,t_2,c_3 != | ||
852 | mulx a_6,b_2,t_1 !mul_add_c(a[6],b[2],c3,c1,c2); | ||
853 | addcc c_12,t_1,c_12 | ||
854 | bcs,a %xcc,.+8 | ||
855 | add c_3,t_2,c_3 != | ||
856 | mulx a_5,b_3,t_1 !mul_add_c(a[5],b[3],c3,c1,c2); | ||
857 | addcc c_12,t_1,c_12 | ||
858 | bcs,a %xcc,.+8 | ||
859 | add c_3,t_2,c_3 != | ||
860 | mulx a_4,b_4,t_1 !mul_add_c(a[4],b[4],c3,c1,c2); | ||
861 | addcc c_12,t_1,c_12 | ||
862 | bcs,a %xcc,.+8 | ||
863 | add c_3,t_2,c_3 != | ||
864 | mulx a_3,b_5,t_1 !mul_add_c(a[3],b[5],c3,c1,c2); | ||
865 | addcc c_12,t_1,c_12 | ||
866 | bcs,a %xcc,.+8 | ||
867 | add c_3,t_2,c_3 != | ||
868 | mulx a_2,b_6,t_1 !mul_add_c(a[2],b[6],c3,c1,c2); | ||
869 | addcc c_12,t_1,c_12 | ||
870 | bcs,a %xcc,.+8 | ||
871 | add c_3,t_2,c_3 != | ||
872 | mulx a_1,b_7,t_1 !mul_add_c(a[1],b[7],c3,c1,c2); | ||
873 | addcc c_12,t_1,t_1 | ||
874 | bcs,a %xcc,.+8 | ||
875 | add c_3,t_2,c_3 != | ||
876 | srlx t_1,32,c_12 | ||
877 | stuw t_1,rp(8) !r[8]=c3; | ||
878 | or c_12,c_3,c_12 | ||
879 | |||
880 | mulx a_2,b_7,t_1 !=!mul_add_c(a[2],b[7],c1,c2,c3); | ||
881 | addcc c_12,t_1,c_12 | ||
882 | clr c_3 | ||
883 | bcs,a %xcc,.+8 | ||
884 | add c_3,t_2,c_3 != | ||
885 | mulx a_3,b_6,t_1 !mul_add_c(a[3],b[6],c1,c2,c3); | ||
886 | addcc c_12,t_1,c_12 | ||
887 | bcs,a %xcc,.+8 != | ||
888 | add c_3,t_2,c_3 | ||
889 | mulx a_4,b_5,t_1 !mul_add_c(a[4],b[5],c1,c2,c3); | ||
890 | addcc c_12,t_1,c_12 | ||
891 | bcs,a %xcc,.+8 != | ||
892 | add c_3,t_2,c_3 | ||
893 | mulx a_5,b_4,t_1 !mul_add_c(a[5],b[4],c1,c2,c3); | ||
894 | addcc c_12,t_1,c_12 | ||
895 | bcs,a %xcc,.+8 != | ||
896 | add c_3,t_2,c_3 | ||
897 | mulx a_6,b_3,t_1 !mul_add_c(a[6],b[3],c1,c2,c3); | ||
898 | addcc c_12,t_1,c_12 | ||
899 | bcs,a %xcc,.+8 != | ||
900 | add c_3,t_2,c_3 | ||
901 | mulx a_7,b_2,t_1 !mul_add_c(a[7],b[2],c1,c2,c3); | ||
902 | addcc c_12,t_1,t_1 | ||
903 | bcs,a %xcc,.+8 != | ||
904 | add c_3,t_2,c_3 | ||
905 | srlx t_1,32,c_12 | ||
906 | stuw t_1,rp(9) !r[9]=c1; | ||
907 | or c_12,c_3,c_12 != | ||
908 | |||
909 | mulx a_7,b_3,t_1 !mul_add_c(a[7],b[3],c2,c3,c1); | ||
910 | addcc c_12,t_1,c_12 | ||
911 | clr c_3 | ||
912 | bcs,a %xcc,.+8 != | ||
913 | add c_3,t_2,c_3 | ||
914 | mulx a_6,b_4,t_1 !mul_add_c(a[6],b[4],c2,c3,c1); | ||
915 | addcc c_12,t_1,c_12 | ||
916 | bcs,a %xcc,.+8 != | ||
917 | add c_3,t_2,c_3 | ||
918 | mulx a_5,b_5,t_1 !mul_add_c(a[5],b[5],c2,c3,c1); | ||
919 | addcc c_12,t_1,c_12 | ||
920 | bcs,a %xcc,.+8 != | ||
921 | add c_3,t_2,c_3 | ||
922 | mulx a_4,b_6,t_1 !mul_add_c(a[4],b[6],c2,c3,c1); | ||
923 | addcc c_12,t_1,c_12 | ||
924 | bcs,a %xcc,.+8 != | ||
925 | add c_3,t_2,c_3 | ||
926 | mulx a_3,b_7,t_1 !mul_add_c(a[3],b[7],c2,c3,c1); | ||
927 | addcc c_12,t_1,t_1 | ||
928 | bcs,a %xcc,.+8 != | ||
929 | add c_3,t_2,c_3 | ||
930 | srlx t_1,32,c_12 | ||
931 | stuw t_1,rp(10) !r[10]=c2; | ||
932 | or c_12,c_3,c_12 != | ||
933 | |||
934 | mulx a_4,b_7,t_1 !mul_add_c(a[4],b[7],c3,c1,c2); | ||
935 | addcc c_12,t_1,c_12 | ||
936 | clr c_3 | ||
937 | bcs,a %xcc,.+8 != | ||
938 | add c_3,t_2,c_3 | ||
939 | mulx a_5,b_6,t_1 !mul_add_c(a[5],b[6],c3,c1,c2); | ||
940 | addcc c_12,t_1,c_12 | ||
941 | bcs,a %xcc,.+8 != | ||
942 | add c_3,t_2,c_3 | ||
943 | mulx a_6,b_5,t_1 !mul_add_c(a[6],b[5],c3,c1,c2); | ||
944 | addcc c_12,t_1,c_12 | ||
945 | bcs,a %xcc,.+8 != | ||
946 | add c_3,t_2,c_3 | ||
947 | mulx a_7,b_4,t_1 !mul_add_c(a[7],b[4],c3,c1,c2); | ||
948 | addcc c_12,t_1,t_1 | ||
949 | bcs,a %xcc,.+8 != | ||
950 | add c_3,t_2,c_3 | ||
951 | srlx t_1,32,c_12 | ||
952 | stuw t_1,rp(11) !r[11]=c3; | ||
953 | or c_12,c_3,c_12 != | ||
954 | |||
955 | mulx a_7,b_5,t_1 !mul_add_c(a[7],b[5],c1,c2,c3); | ||
956 | addcc c_12,t_1,c_12 | ||
957 | clr c_3 | ||
958 | bcs,a %xcc,.+8 != | ||
959 | add c_3,t_2,c_3 | ||
960 | mulx a_6,b_6,t_1 !mul_add_c(a[6],b[6],c1,c2,c3); | ||
961 | addcc c_12,t_1,c_12 | ||
962 | bcs,a %xcc,.+8 != | ||
963 | add c_3,t_2,c_3 | ||
964 | mulx a_5,b_7,t_1 !mul_add_c(a[5],b[7],c1,c2,c3); | ||
965 | addcc c_12,t_1,t_1 | ||
966 | bcs,a %xcc,.+8 != | ||
967 | add c_3,t_2,c_3 | ||
968 | srlx t_1,32,c_12 | ||
969 | stuw t_1,rp(12) !r[12]=c1; | ||
970 | or c_12,c_3,c_12 != | ||
971 | |||
972 | mulx a_6,b_7,t_1 !mul_add_c(a[6],b[7],c2,c3,c1); | ||
973 | addcc c_12,t_1,c_12 | ||
974 | clr c_3 | ||
975 | bcs,a %xcc,.+8 != | ||
976 | add c_3,t_2,c_3 | ||
977 | mulx a_7,b_6,t_1 !mul_add_c(a[7],b[6],c2,c3,c1); | ||
978 | addcc c_12,t_1,t_1 | ||
979 | bcs,a %xcc,.+8 != | ||
980 | add c_3,t_2,c_3 | ||
981 | srlx t_1,32,c_12 | ||
982 | st t_1,rp(13) !r[13]=c2; | ||
983 | or c_12,c_3,c_12 != | ||
984 | |||
985 | mulx a_7,b_7,t_1 !mul_add_c(a[7],b[7],c3,c1,c2); | ||
986 | addcc c_12,t_1,t_1 | ||
987 | srlx t_1,32,c_12 != | ||
988 | stuw t_1,rp(14) !r[14]=c3; | ||
989 | stuw c_12,rp(15) !r[15]=c1; | ||
990 | |||
991 | ret | ||
992 | restore %g0,%g0,%o0 != | ||
993 | |||
994 | .type bn_mul_comba8,#function | ||
995 | .size bn_mul_comba8,(.-bn_mul_comba8) | ||
996 | |||
997 | .align 32 | ||
998 | |||
999 | .global bn_mul_comba4 | ||
1000 | /* | ||
1001 | * void bn_mul_comba4(r,a,b) | ||
1002 | * BN_ULONG *r,*a,*b; | ||
1003 | */ | ||
1004 | bn_mul_comba4: | ||
1005 | save %sp,FRAME_SIZE,%sp | ||
1006 | lduw ap(0),a_0 | ||
1007 | mov 1,t_2 | ||
1008 | lduw bp(0),b_0 | ||
1009 | sllx t_2,32,t_2 != | ||
1010 | lduw bp(1),b_1 | ||
1011 | mulx a_0,b_0,t_1 !mul_add_c(a[0],b[0],c1,c2,c3); | ||
1012 | srlx t_1,32,c_12 | ||
1013 | stuw t_1,rp(0) !=!r[0]=c1; | ||
1014 | |||
1015 | lduw ap(1),a_1 | ||
1016 | mulx a_0,b_1,t_1 !mul_add_c(a[0],b[1],c2,c3,c1); | ||
1017 | addcc c_12,t_1,c_12 | ||
1018 | clr c_3 != | ||
1019 | bcs,a %xcc,.+8 | ||
1020 | add c_3,t_2,c_3 | ||
1021 | lduw ap(2),a_2 | ||
1022 | mulx a_1,b_0,t_1 !=!mul_add_c(a[1],b[0],c2,c3,c1); | ||
1023 | addcc c_12,t_1,t_1 | ||
1024 | bcs,a %xcc,.+8 | ||
1025 | add c_3,t_2,c_3 | ||
1026 | srlx t_1,32,c_12 != | ||
1027 | stuw t_1,rp(1) !r[1]=c2; | ||
1028 | or c_12,c_3,c_12 | ||
1029 | |||
1030 | mulx a_2,b_0,t_1 !mul_add_c(a[2],b[0],c3,c1,c2); | ||
1031 | addcc c_12,t_1,c_12 != | ||
1032 | clr c_3 | ||
1033 | bcs,a %xcc,.+8 | ||
1034 | add c_3,t_2,c_3 | ||
1035 | lduw bp(2),b_2 != | ||
1036 | mulx a_1,b_1,t_1 !mul_add_c(a[1],b[1],c3,c1,c2); | ||
1037 | addcc c_12,t_1,c_12 | ||
1038 | bcs,a %xcc,.+8 | ||
1039 | add c_3,t_2,c_3 != | ||
1040 | lduw bp(3),b_3 | ||
1041 | mulx a_0,b_2,t_1 !mul_add_c(a[0],b[2],c3,c1,c2); | ||
1042 | addcc c_12,t_1,t_1 | ||
1043 | bcs,a %xcc,.+8 != | ||
1044 | add c_3,t_2,c_3 | ||
1045 | srlx t_1,32,c_12 | ||
1046 | stuw t_1,rp(2) !r[2]=c3; | ||
1047 | or c_12,c_3,c_12 != | ||
1048 | |||
1049 | mulx a_0,b_3,t_1 !mul_add_c(a[0],b[3],c1,c2,c3); | ||
1050 | addcc c_12,t_1,c_12 | ||
1051 | clr c_3 | ||
1052 | bcs,a %xcc,.+8 != | ||
1053 | add c_3,t_2,c_3 | ||
1054 | mulx a_1,b_2,t_1 !mul_add_c(a[1],b[2],c1,c2,c3); | ||
1055 | addcc c_12,t_1,c_12 | ||
1056 | bcs,a %xcc,.+8 != | ||
1057 | add c_3,t_2,c_3 | ||
1058 | lduw ap(3),a_3 | ||
1059 | mulx a_2,b_1,t_1 !mul_add_c(a[2],b[1],c1,c2,c3); | ||
1060 | addcc c_12,t_1,c_12 != | ||
1061 | bcs,a %xcc,.+8 | ||
1062 | add c_3,t_2,c_3 | ||
1063 | mulx a_3,b_0,t_1 !mul_add_c(a[3],b[0],c1,c2,c3);!= | ||
1064 | addcc c_12,t_1,t_1 != | ||
1065 | bcs,a %xcc,.+8 | ||
1066 | add c_3,t_2,c_3 | ||
1067 | srlx t_1,32,c_12 | ||
1068 | stuw t_1,rp(3) !=!r[3]=c1; | ||
1069 | or c_12,c_3,c_12 | ||
1070 | |||
1071 | mulx a_3,b_1,t_1 !mul_add_c(a[3],b[1],c2,c3,c1); | ||
1072 | addcc c_12,t_1,c_12 | ||
1073 | clr c_3 != | ||
1074 | bcs,a %xcc,.+8 | ||
1075 | add c_3,t_2,c_3 | ||
1076 | mulx a_2,b_2,t_1 !mul_add_c(a[2],b[2],c2,c3,c1); | ||
1077 | addcc c_12,t_1,c_12 != | ||
1078 | bcs,a %xcc,.+8 | ||
1079 | add c_3,t_2,c_3 | ||
1080 | mulx a_1,b_3,t_1 !mul_add_c(a[1],b[3],c2,c3,c1); | ||
1081 | addcc c_12,t_1,t_1 != | ||
1082 | bcs,a %xcc,.+8 | ||
1083 | add c_3,t_2,c_3 | ||
1084 | srlx t_1,32,c_12 | ||
1085 | stuw t_1,rp(4) !=!r[4]=c2; | ||
1086 | or c_12,c_3,c_12 | ||
1087 | |||
1088 | mulx a_2,b_3,t_1 !mul_add_c(a[2],b[3],c3,c1,c2); | ||
1089 | addcc c_12,t_1,c_12 | ||
1090 | clr c_3 != | ||
1091 | bcs,a %xcc,.+8 | ||
1092 | add c_3,t_2,c_3 | ||
1093 | mulx a_3,b_2,t_1 !mul_add_c(a[3],b[2],c3,c1,c2); | ||
1094 | addcc c_12,t_1,t_1 != | ||
1095 | bcs,a %xcc,.+8 | ||
1096 | add c_3,t_2,c_3 | ||
1097 | srlx t_1,32,c_12 | ||
1098 | stuw t_1,rp(5) !=!r[5]=c3; | ||
1099 | or c_12,c_3,c_12 | ||
1100 | |||
1101 | mulx a_3,b_3,t_1 !mul_add_c(a[3],b[3],c1,c2,c3); | ||
1102 | addcc c_12,t_1,t_1 | ||
1103 | srlx t_1,32,c_12 != | ||
1104 | stuw t_1,rp(6) !r[6]=c1; | ||
1105 | stuw c_12,rp(7) !r[7]=c2; | ||
1106 | |||
1107 | ret | ||
1108 | restore %g0,%g0,%o0 | ||
1109 | |||
1110 | .type bn_mul_comba4,#function | ||
1111 | .size bn_mul_comba4,(.-bn_mul_comba4) | ||
1112 | |||
1113 | .align 32 | ||
1114 | |||
1115 | .global bn_sqr_comba8 | ||
1116 | bn_sqr_comba8: | ||
1117 | save %sp,FRAME_SIZE,%sp | ||
1118 | mov 1,t_2 | ||
1119 | lduw ap(0),a_0 | ||
1120 | sllx t_2,32,t_2 | ||
1121 | lduw ap(1),a_1 | ||
1122 | mulx a_0,a_0,t_1 !sqr_add_c(a,0,c1,c2,c3); | ||
1123 | srlx t_1,32,c_12 | ||
1124 | stuw t_1,rp(0) !r[0]=c1; | ||
1125 | |||
1126 | lduw ap(2),a_2 | ||
1127 | mulx a_0,a_1,t_1 !=!sqr_add_c2(a,1,0,c2,c3,c1); | ||
1128 | addcc c_12,t_1,c_12 | ||
1129 | clr c_3 | ||
1130 | bcs,a %xcc,.+8 | ||
1131 | add c_3,t_2,c_3 | ||
1132 | addcc c_12,t_1,t_1 | ||
1133 | bcs,a %xcc,.+8 | ||
1134 | add c_3,t_2,c_3 | ||
1135 | srlx t_1,32,c_12 | ||
1136 | stuw t_1,rp(1) !r[1]=c2; | ||
1137 | or c_12,c_3,c_12 | ||
1138 | |||
1139 | mulx a_2,a_0,t_1 !sqr_add_c2(a,2,0,c3,c1,c2); | ||
1140 | addcc c_12,t_1,c_12 | ||
1141 | clr c_3 | ||
1142 | bcs,a %xcc,.+8 | ||
1143 | add c_3,t_2,c_3 | ||
1144 | addcc c_12,t_1,c_12 | ||
1145 | bcs,a %xcc,.+8 | ||
1146 | add c_3,t_2,c_3 | ||
1147 | lduw ap(3),a_3 | ||
1148 | mulx a_1,a_1,t_1 !sqr_add_c(a,1,c3,c1,c2); | ||
1149 | addcc c_12,t_1,t_1 | ||
1150 | bcs,a %xcc,.+8 | ||
1151 | add c_3,t_2,c_3 | ||
1152 | srlx t_1,32,c_12 | ||
1153 | stuw t_1,rp(2) !r[2]=c3; | ||
1154 | or c_12,c_3,c_12 | ||
1155 | |||
1156 | mulx a_0,a_3,t_1 !sqr_add_c2(a,3,0,c1,c2,c3); | ||
1157 | addcc c_12,t_1,c_12 | ||
1158 | clr c_3 | ||
1159 | bcs,a %xcc,.+8 | ||
1160 | add c_3,t_2,c_3 | ||
1161 | addcc c_12,t_1,c_12 | ||
1162 | bcs,a %xcc,.+8 | ||
1163 | add c_3,t_2,c_3 | ||
1164 | lduw ap(4),a_4 | ||
1165 | mulx a_1,a_2,t_1 !sqr_add_c2(a,2,1,c1,c2,c3); | ||
1166 | addcc c_12,t_1,c_12 | ||
1167 | bcs,a %xcc,.+8 | ||
1168 | add c_3,t_2,c_3 | ||
1169 | addcc c_12,t_1,t_1 | ||
1170 | bcs,a %xcc,.+8 | ||
1171 | add c_3,t_2,c_3 | ||
1172 | srlx t_1,32,c_12 | ||
1173 | st t_1,rp(3) !r[3]=c1; | ||
1174 | or c_12,c_3,c_12 | ||
1175 | |||
1176 | mulx a_4,a_0,t_1 !sqr_add_c2(a,4,0,c2,c3,c1); | ||
1177 | addcc c_12,t_1,c_12 | ||
1178 | clr c_3 | ||
1179 | bcs,a %xcc,.+8 | ||
1180 | add c_3,t_2,c_3 | ||
1181 | addcc c_12,t_1,c_12 | ||
1182 | bcs,a %xcc,.+8 | ||
1183 | add c_3,t_2,c_3 | ||
1184 | mulx a_3,a_1,t_1 !sqr_add_c2(a,3,1,c2,c3,c1); | ||
1185 | addcc c_12,t_1,c_12 | ||
1186 | bcs,a %xcc,.+8 | ||
1187 | add c_3,t_2,c_3 | ||
1188 | addcc c_12,t_1,c_12 | ||
1189 | bcs,a %xcc,.+8 | ||
1190 | add c_3,t_2,c_3 | ||
1191 | lduw ap(5),a_5 | ||
1192 | mulx a_2,a_2,t_1 !sqr_add_c(a,2,c2,c3,c1); | ||
1193 | addcc c_12,t_1,t_1 | ||
1194 | bcs,a %xcc,.+8 | ||
1195 | add c_3,t_2,c_3 | ||
1196 | srlx t_1,32,c_12 | ||
1197 | stuw t_1,rp(4) !r[4]=c2; | ||
1198 | or c_12,c_3,c_12 | ||
1199 | |||
1200 | mulx a_0,a_5,t_1 !sqr_add_c2(a,5,0,c3,c1,c2); | ||
1201 | addcc c_12,t_1,c_12 | ||
1202 | clr c_3 | ||
1203 | bcs,a %xcc,.+8 | ||
1204 | add c_3,t_2,c_3 | ||
1205 | addcc c_12,t_1,c_12 | ||
1206 | bcs,a %xcc,.+8 | ||
1207 | add c_3,t_2,c_3 | ||
1208 | mulx a_1,a_4,t_1 !sqr_add_c2(a,4,1,c3,c1,c2); | ||
1209 | addcc c_12,t_1,c_12 | ||
1210 | bcs,a %xcc,.+8 | ||
1211 | add c_3,t_2,c_3 | ||
1212 | addcc c_12,t_1,c_12 | ||
1213 | bcs,a %xcc,.+8 | ||
1214 | add c_3,t_2,c_3 | ||
1215 | lduw ap(6),a_6 | ||
1216 | mulx a_2,a_3,t_1 !sqr_add_c2(a,3,2,c3,c1,c2); | ||
1217 | addcc c_12,t_1,c_12 | ||
1218 | bcs,a %xcc,.+8 | ||
1219 | add c_3,t_2,c_3 | ||
1220 | addcc c_12,t_1,t_1 | ||
1221 | bcs,a %xcc,.+8 | ||
1222 | add c_3,t_2,c_3 | ||
1223 | srlx t_1,32,c_12 | ||
1224 | stuw t_1,rp(5) !r[5]=c3; | ||
1225 | or c_12,c_3,c_12 | ||
1226 | |||
1227 | mulx a_6,a_0,t_1 !sqr_add_c2(a,6,0,c1,c2,c3); | ||
1228 | addcc c_12,t_1,c_12 | ||
1229 | clr c_3 | ||
1230 | bcs,a %xcc,.+8 | ||
1231 | add c_3,t_2,c_3 | ||
1232 | addcc c_12,t_1,c_12 | ||
1233 | bcs,a %xcc,.+8 | ||
1234 | add c_3,t_2,c_3 | ||
1235 | mulx a_5,a_1,t_1 !sqr_add_c2(a,5,1,c1,c2,c3); | ||
1236 | addcc c_12,t_1,c_12 | ||
1237 | bcs,a %xcc,.+8 | ||
1238 | add c_3,t_2,c_3 | ||
1239 | addcc c_12,t_1,c_12 | ||
1240 | bcs,a %xcc,.+8 | ||
1241 | add c_3,t_2,c_3 | ||
1242 | mulx a_4,a_2,t_1 !sqr_add_c2(a,4,2,c1,c2,c3); | ||
1243 | addcc c_12,t_1,c_12 | ||
1244 | bcs,a %xcc,.+8 | ||
1245 | add c_3,t_2,c_3 | ||
1246 | addcc c_12,t_1,c_12 | ||
1247 | bcs,a %xcc,.+8 | ||
1248 | add c_3,t_2,c_3 | ||
1249 | lduw ap(7),a_7 | ||
1250 | mulx a_3,a_3,t_1 !=!sqr_add_c(a,3,c1,c2,c3); | ||
1251 | addcc c_12,t_1,t_1 | ||
1252 | bcs,a %xcc,.+8 | ||
1253 | add c_3,t_2,c_3 | ||
1254 | srlx t_1,32,c_12 | ||
1255 | stuw t_1,rp(6) !r[6]=c1; | ||
1256 | or c_12,c_3,c_12 | ||
1257 | |||
1258 | mulx a_0,a_7,t_1 !sqr_add_c2(a,7,0,c2,c3,c1); | ||
1259 | addcc c_12,t_1,c_12 | ||
1260 | clr c_3 | ||
1261 | bcs,a %xcc,.+8 | ||
1262 | add c_3,t_2,c_3 | ||
1263 | addcc c_12,t_1,c_12 | ||
1264 | bcs,a %xcc,.+8 | ||
1265 | add c_3,t_2,c_3 | ||
1266 | mulx a_1,a_6,t_1 !sqr_add_c2(a,6,1,c2,c3,c1); | ||
1267 | addcc c_12,t_1,c_12 | ||
1268 | bcs,a %xcc,.+8 | ||
1269 | add c_3,t_2,c_3 | ||
1270 | addcc c_12,t_1,c_12 | ||
1271 | bcs,a %xcc,.+8 | ||
1272 | add c_3,t_2,c_3 | ||
1273 | mulx a_2,a_5,t_1 !sqr_add_c2(a,5,2,c2,c3,c1); | ||
1274 | addcc c_12,t_1,c_12 | ||
1275 | bcs,a %xcc,.+8 | ||
1276 | add c_3,t_2,c_3 | ||
1277 | addcc c_12,t_1,c_12 | ||
1278 | bcs,a %xcc,.+8 | ||
1279 | add c_3,t_2,c_3 | ||
1280 | mulx a_3,a_4,t_1 !sqr_add_c2(a,4,3,c2,c3,c1); | ||
1281 | addcc c_12,t_1,c_12 | ||
1282 | bcs,a %xcc,.+8 | ||
1283 | add c_3,t_2,c_3 | ||
1284 | addcc c_12,t_1,t_1 | ||
1285 | bcs,a %xcc,.+8 | ||
1286 | add c_3,t_2,c_3 | ||
1287 | srlx t_1,32,c_12 | ||
1288 | stuw t_1,rp(7) !r[7]=c2; | ||
1289 | or c_12,c_3,c_12 | ||
1290 | |||
1291 | mulx a_7,a_1,t_1 !sqr_add_c2(a,7,1,c3,c1,c2); | ||
1292 | addcc c_12,t_1,c_12 | ||
1293 | clr c_3 | ||
1294 | bcs,a %xcc,.+8 | ||
1295 | add c_3,t_2,c_3 | ||
1296 | addcc c_12,t_1,c_12 | ||
1297 | bcs,a %xcc,.+8 | ||
1298 | add c_3,t_2,c_3 | ||
1299 | mulx a_6,a_2,t_1 !sqr_add_c2(a,6,2,c3,c1,c2); | ||
1300 | addcc c_12,t_1,c_12 | ||
1301 | bcs,a %xcc,.+8 | ||
1302 | add c_3,t_2,c_3 | ||
1303 | addcc c_12,t_1,c_12 | ||
1304 | bcs,a %xcc,.+8 | ||
1305 | add c_3,t_2,c_3 | ||
1306 | mulx a_5,a_3,t_1 !sqr_add_c2(a,5,3,c3,c1,c2); | ||
1307 | addcc c_12,t_1,c_12 | ||
1308 | bcs,a %xcc,.+8 | ||
1309 | add c_3,t_2,c_3 | ||
1310 | addcc c_12,t_1,c_12 | ||
1311 | bcs,a %xcc,.+8 | ||
1312 | add c_3,t_2,c_3 | ||
1313 | mulx a_4,a_4,t_1 !sqr_add_c(a,4,c3,c1,c2); | ||
1314 | addcc c_12,t_1,t_1 | ||
1315 | bcs,a %xcc,.+8 | ||
1316 | add c_3,t_2,c_3 | ||
1317 | srlx t_1,32,c_12 | ||
1318 | stuw t_1,rp(8) !r[8]=c3; | ||
1319 | or c_12,c_3,c_12 | ||
1320 | |||
1321 | mulx a_2,a_7,t_1 !sqr_add_c2(a,7,2,c1,c2,c3); | ||
1322 | addcc c_12,t_1,c_12 | ||
1323 | clr c_3 | ||
1324 | bcs,a %xcc,.+8 | ||
1325 | add c_3,t_2,c_3 | ||
1326 | addcc c_12,t_1,c_12 | ||
1327 | bcs,a %xcc,.+8 | ||
1328 | add c_3,t_2,c_3 | ||
1329 | mulx a_3,a_6,t_1 !sqr_add_c2(a,6,3,c1,c2,c3); | ||
1330 | addcc c_12,t_1,c_12 | ||
1331 | bcs,a %xcc,.+8 | ||
1332 | add c_3,t_2,c_3 | ||
1333 | addcc c_12,t_1,c_12 | ||
1334 | bcs,a %xcc,.+8 | ||
1335 | add c_3,t_2,c_3 | ||
1336 | mulx a_4,a_5,t_1 !sqr_add_c2(a,5,4,c1,c2,c3); | ||
1337 | addcc c_12,t_1,c_12 | ||
1338 | bcs,a %xcc,.+8 | ||
1339 | add c_3,t_2,c_3 | ||
1340 | addcc c_12,t_1,t_1 | ||
1341 | bcs,a %xcc,.+8 | ||
1342 | add c_3,t_2,c_3 | ||
1343 | srlx t_1,32,c_12 | ||
1344 | stuw t_1,rp(9) !r[9]=c1; | ||
1345 | or c_12,c_3,c_12 | ||
1346 | |||
1347 | mulx a_7,a_3,t_1 !sqr_add_c2(a,7,3,c2,c3,c1); | ||
1348 | addcc c_12,t_1,c_12 | ||
1349 | clr c_3 | ||
1350 | bcs,a %xcc,.+8 | ||
1351 | add c_3,t_2,c_3 | ||
1352 | addcc c_12,t_1,c_12 | ||
1353 | bcs,a %xcc,.+8 | ||
1354 | add c_3,t_2,c_3 | ||
1355 | mulx a_6,a_4,t_1 !sqr_add_c2(a,6,4,c2,c3,c1); | ||
1356 | addcc c_12,t_1,c_12 | ||
1357 | bcs,a %xcc,.+8 | ||
1358 | add c_3,t_2,c_3 | ||
1359 | addcc c_12,t_1,c_12 | ||
1360 | bcs,a %xcc,.+8 | ||
1361 | add c_3,t_2,c_3 | ||
1362 | mulx a_5,a_5,t_1 !sqr_add_c(a,5,c2,c3,c1); | ||
1363 | addcc c_12,t_1,t_1 | ||
1364 | bcs,a %xcc,.+8 | ||
1365 | add c_3,t_2,c_3 | ||
1366 | srlx t_1,32,c_12 | ||
1367 | stuw t_1,rp(10) !r[10]=c2; | ||
1368 | or c_12,c_3,c_12 | ||
1369 | |||
1370 | mulx a_4,a_7,t_1 !sqr_add_c2(a,7,4,c3,c1,c2); | ||
1371 | addcc c_12,t_1,c_12 | ||
1372 | clr c_3 | ||
1373 | bcs,a %xcc,.+8 | ||
1374 | add c_3,t_2,c_3 | ||
1375 | addcc c_12,t_1,c_12 | ||
1376 | bcs,a %xcc,.+8 | ||
1377 | add c_3,t_2,c_3 | ||
1378 | mulx a_5,a_6,t_1 !sqr_add_c2(a,6,5,c3,c1,c2); | ||
1379 | addcc c_12,t_1,c_12 | ||
1380 | bcs,a %xcc,.+8 | ||
1381 | add c_3,t_2,c_3 | ||
1382 | addcc c_12,t_1,t_1 | ||
1383 | bcs,a %xcc,.+8 | ||
1384 | add c_3,t_2,c_3 | ||
1385 | srlx t_1,32,c_12 | ||
1386 | stuw t_1,rp(11) !r[11]=c3; | ||
1387 | or c_12,c_3,c_12 | ||
1388 | |||
1389 | mulx a_7,a_5,t_1 !sqr_add_c2(a,7,5,c1,c2,c3); | ||
1390 | addcc c_12,t_1,c_12 | ||
1391 | clr c_3 | ||
1392 | bcs,a %xcc,.+8 | ||
1393 | add c_3,t_2,c_3 | ||
1394 | addcc c_12,t_1,c_12 | ||
1395 | bcs,a %xcc,.+8 | ||
1396 | add c_3,t_2,c_3 | ||
1397 | mulx a_6,a_6,t_1 !sqr_add_c(a,6,c1,c2,c3); | ||
1398 | addcc c_12,t_1,t_1 | ||
1399 | bcs,a %xcc,.+8 | ||
1400 | add c_3,t_2,c_3 | ||
1401 | srlx t_1,32,c_12 | ||
1402 | stuw t_1,rp(12) !r[12]=c1; | ||
1403 | or c_12,c_3,c_12 | ||
1404 | |||
1405 | mulx a_6,a_7,t_1 !sqr_add_c2(a,7,6,c2,c3,c1); | ||
1406 | addcc c_12,t_1,c_12 | ||
1407 | clr c_3 | ||
1408 | bcs,a %xcc,.+8 | ||
1409 | add c_3,t_2,c_3 | ||
1410 | addcc c_12,t_1,t_1 | ||
1411 | bcs,a %xcc,.+8 | ||
1412 | add c_3,t_2,c_3 | ||
1413 | srlx t_1,32,c_12 | ||
1414 | stuw t_1,rp(13) !r[13]=c2; | ||
1415 | or c_12,c_3,c_12 | ||
1416 | |||
1417 | mulx a_7,a_7,t_1 !sqr_add_c(a,7,c3,c1,c2); | ||
1418 | addcc c_12,t_1,t_1 | ||
1419 | srlx t_1,32,c_12 | ||
1420 | stuw t_1,rp(14) !r[14]=c3; | ||
1421 | stuw c_12,rp(15) !r[15]=c1; | ||
1422 | |||
1423 | ret | ||
1424 | restore %g0,%g0,%o0 | ||
1425 | |||
1426 | .type bn_sqr_comba8,#function | ||
1427 | .size bn_sqr_comba8,(.-bn_sqr_comba8) | ||
1428 | |||
1429 | .align 32 | ||
1430 | |||
1431 | .global bn_sqr_comba4 | ||
1432 | /* | ||
1433 | * void bn_sqr_comba4(r,a) | ||
1434 | * BN_ULONG *r,*a; | ||
1435 | */ | ||
1436 | bn_sqr_comba4: | ||
1437 | save %sp,FRAME_SIZE,%sp | ||
1438 | mov 1,t_2 | ||
1439 | lduw ap(0),a_0 | ||
1440 | sllx t_2,32,t_2 | ||
1441 | lduw ap(1),a_1 | ||
1442 | mulx a_0,a_0,t_1 !sqr_add_c(a,0,c1,c2,c3); | ||
1443 | srlx t_1,32,c_12 | ||
1444 | stuw t_1,rp(0) !r[0]=c1; | ||
1445 | |||
1446 | lduw ap(2),a_2 | ||
1447 | mulx a_0,a_1,t_1 !sqr_add_c2(a,1,0,c2,c3,c1); | ||
1448 | addcc c_12,t_1,c_12 | ||
1449 | clr c_3 | ||
1450 | bcs,a %xcc,.+8 | ||
1451 | add c_3,t_2,c_3 | ||
1452 | addcc c_12,t_1,t_1 | ||
1453 | bcs,a %xcc,.+8 | ||
1454 | add c_3,t_2,c_3 | ||
1455 | srlx t_1,32,c_12 | ||
1456 | stuw t_1,rp(1) !r[1]=c2; | ||
1457 | or c_12,c_3,c_12 | ||
1458 | |||
1459 | mulx a_2,a_0,t_1 !sqr_add_c2(a,2,0,c3,c1,c2); | ||
1460 | addcc c_12,t_1,c_12 | ||
1461 | clr c_3 | ||
1462 | bcs,a %xcc,.+8 | ||
1463 | add c_3,t_2,c_3 | ||
1464 | addcc c_12,t_1,c_12 | ||
1465 | bcs,a %xcc,.+8 | ||
1466 | add c_3,t_2,c_3 | ||
1467 | lduw ap(3),a_3 | ||
1468 | mulx a_1,a_1,t_1 !sqr_add_c(a,1,c3,c1,c2); | ||
1469 | addcc c_12,t_1,t_1 | ||
1470 | bcs,a %xcc,.+8 | ||
1471 | add c_3,t_2,c_3 | ||
1472 | srlx t_1,32,c_12 | ||
1473 | stuw t_1,rp(2) !r[2]=c3; | ||
1474 | or c_12,c_3,c_12 | ||
1475 | |||
1476 | mulx a_0,a_3,t_1 !sqr_add_c2(a,3,0,c1,c2,c3); | ||
1477 | addcc c_12,t_1,c_12 | ||
1478 | clr c_3 | ||
1479 | bcs,a %xcc,.+8 | ||
1480 | add c_3,t_2,c_3 | ||
1481 | addcc c_12,t_1,c_12 | ||
1482 | bcs,a %xcc,.+8 | ||
1483 | add c_3,t_2,c_3 | ||
1484 | mulx a_1,a_2,t_1 !sqr_add_c2(a,2,1,c1,c2,c3); | ||
1485 | addcc c_12,t_1,c_12 | ||
1486 | bcs,a %xcc,.+8 | ||
1487 | add c_3,t_2,c_3 | ||
1488 | addcc c_12,t_1,t_1 | ||
1489 | bcs,a %xcc,.+8 | ||
1490 | add c_3,t_2,c_3 | ||
1491 | srlx t_1,32,c_12 | ||
1492 | stuw t_1,rp(3) !r[3]=c1; | ||
1493 | or c_12,c_3,c_12 | ||
1494 | |||
1495 | mulx a_3,a_1,t_1 !sqr_add_c2(a,3,1,c2,c3,c1); | ||
1496 | addcc c_12,t_1,c_12 | ||
1497 | clr c_3 | ||
1498 | bcs,a %xcc,.+8 | ||
1499 | add c_3,t_2,c_3 | ||
1500 | addcc c_12,t_1,c_12 | ||
1501 | bcs,a %xcc,.+8 | ||
1502 | add c_3,t_2,c_3 | ||
1503 | mulx a_2,a_2,t_1 !sqr_add_c(a,2,c2,c3,c1); | ||
1504 | addcc c_12,t_1,t_1 | ||
1505 | bcs,a %xcc,.+8 | ||
1506 | add c_3,t_2,c_3 | ||
1507 | srlx t_1,32,c_12 | ||
1508 | stuw t_1,rp(4) !r[4]=c2; | ||
1509 | or c_12,c_3,c_12 | ||
1510 | |||
1511 | mulx a_2,a_3,t_1 !sqr_add_c2(a,3,2,c3,c1,c2); | ||
1512 | addcc c_12,t_1,c_12 | ||
1513 | clr c_3 | ||
1514 | bcs,a %xcc,.+8 | ||
1515 | add c_3,t_2,c_3 | ||
1516 | addcc c_12,t_1,t_1 | ||
1517 | bcs,a %xcc,.+8 | ||
1518 | add c_3,t_2,c_3 | ||
1519 | srlx t_1,32,c_12 | ||
1520 | stuw t_1,rp(5) !r[5]=c3; | ||
1521 | or c_12,c_3,c_12 | ||
1522 | |||
1523 | mulx a_3,a_3,t_1 !sqr_add_c(a,3,c1,c2,c3); | ||
1524 | addcc c_12,t_1,t_1 | ||
1525 | srlx t_1,32,c_12 | ||
1526 | stuw t_1,rp(6) !r[6]=c1; | ||
1527 | stuw c_12,rp(7) !r[7]=c2; | ||
1528 | |||
1529 | ret | ||
1530 | restore %g0,%g0,%o0 | ||
1531 | |||
1532 | .type bn_sqr_comba4,#function | ||
1533 | .size bn_sqr_comba4,(.-bn_sqr_comba4) | ||
1534 | |||
1535 | .align 32 | ||
diff --git a/src/lib/libcrypto/bn/asm/vms.mar b/src/lib/libcrypto/bn/asm/vms.mar new file mode 100644 index 0000000000..ac9d57d7b0 --- /dev/null +++ b/src/lib/libcrypto/bn/asm/vms.mar | |||
@@ -0,0 +1,6695 @@ | |||
1 | .title vax_bn_mul_add_word unsigned multiply & add, 32*32+32+32=>64 | ||
2 | ; | ||
3 | ; w.j.m. 15-jan-1999 | ||
4 | ; | ||
5 | ; it's magic ... | ||
6 | ; | ||
7 | ; ULONG bn_mul_add_words(ULONG r[],ULONG a[],int n,ULONG w) { | ||
8 | ; ULONG c = 0; | ||
9 | ; int i; | ||
10 | ; for(i = 0; i < n; i++) <c,r[i]> := r[i] + c + a[i] * w ; | ||
11 | ; return c; | ||
12 | ; } | ||
13 | |||
14 | r=4 ;(AP) | ||
15 | a=8 ;(AP) | ||
16 | n=12 ;(AP) n by value (input) | ||
17 | w=16 ;(AP) w by value (input) | ||
18 | |||
19 | |||
20 | .psect code,nowrt | ||
21 | |||
22 | .entry bn_mul_add_words,^m<r2,r3,r4,r5,r6> | ||
23 | |||
24 | moval @r(ap),r2 | ||
25 | moval @a(ap),r3 | ||
26 | movl n(ap),r4 ; assumed >0 by C code | ||
27 | movl w(ap),r5 | ||
28 | clrl r6 ; c | ||
29 | |||
30 | 0$: | ||
31 | emul r5,(r3),(r2),r0 ; w, a[], r[] considered signed | ||
32 | |||
33 | ; fixup for "negative" r[] | ||
34 | tstl (r2) | ||
35 | bgeq 10$ | ||
36 | incl r1 | ||
37 | 10$: | ||
38 | |||
39 | ; add in c | ||
40 | addl2 r6,r0 | ||
41 | adwc #0,r1 | ||
42 | |||
43 | ; combined fixup for "negative" w, a[] | ||
44 | tstl r5 | ||
45 | bgeq 20$ | ||
46 | addl2 (r3),r1 | ||
47 | 20$: | ||
48 | tstl (r3) | ||
49 | bgeq 30$ | ||
50 | addl2 r5,r1 | ||
51 | 30$: | ||
52 | |||
53 | movl r0,(r2)+ ; store lo result in r[] & advance | ||
54 | addl #4,r3 ; advance a[] | ||
55 | movl r1,r6 ; store hi result => c | ||
56 | |||
57 | sobgtr r4,0$ | ||
58 | |||
59 | movl r6,r0 ; return c | ||
60 | ret | ||
61 | |||
62 | .title vax_bn_mul_word unsigned multiply & add, 32*32+32=>64 | ||
63 | ; | ||
64 | ; w.j.m. 15-jan-1999 | ||
65 | ; | ||
66 | ; it's magic ... | ||
67 | ; | ||
68 | ; ULONG bn_mul_words(ULONG r[],ULONG a[],int n,ULONG w) { | ||
69 | ; ULONG c = 0; | ||
70 | ; int i; | ||
71 | ; for(i = 0; i < num; i++) <c,r[i]> := a[i] * w + c ; | ||
72 | ; return(c); | ||
73 | ; } | ||
74 | |||
75 | r=4 ;(AP) | ||
76 | a=8 ;(AP) | ||
77 | n=12 ;(AP) n by value (input) | ||
78 | w=16 ;(AP) w by value (input) | ||
79 | |||
80 | |||
81 | .psect code,nowrt | ||
82 | |||
83 | .entry bn_mul_words,^m<r2,r3,r4,r5,r6> | ||
84 | |||
85 | moval @r(ap),r2 ; r2 -> r[] | ||
86 | moval @a(ap),r3 ; r3 -> a[] | ||
87 | movl n(ap),r4 ; r4 = loop count (assumed >0 by C code) | ||
88 | movl w(ap),r5 ; r5 = w | ||
89 | clrl r6 ; r6 = c | ||
90 | |||
91 | 0$: | ||
92 | ; <r1,r0> := w * a[] + c | ||
93 | emul r5,(r3),r6,r0 ; w, a[], c considered signed | ||
94 | |||
95 | ; fixup for "negative" c | ||
96 | tstl r6 ; c | ||
97 | bgeq 10$ | ||
98 | incl r1 | ||
99 | 10$: | ||
100 | |||
101 | ; combined fixup for "negative" w, a[] | ||
102 | tstl r5 ; w | ||
103 | bgeq 20$ | ||
104 | addl2 (r3),r1 ; a[] | ||
105 | 20$: | ||
106 | tstl (r3) ; a[] | ||
107 | bgeq 30$ | ||
108 | addl2 r5,r1 ; w | ||
109 | 30$: | ||
110 | |||
111 | movl r0,(r2)+ ; store lo result in r[] & advance | ||
112 | addl #4,r3 ; advance a[] | ||
113 | movl r1,r6 ; store hi result => c | ||
114 | |||
115 | sobgtr r4,0$ | ||
116 | |||
117 | movl r6,r0 ; return c | ||
118 | ret | ||
119 | |||
120 | .title vax_bn_sqr_words unsigned square, 32*32=>64 | ||
121 | ; | ||
122 | ; w.j.m. 15-jan-1999 | ||
123 | ; | ||
124 | ; it's magic ... | ||
125 | ; | ||
126 | ; void bn_sqr_words(ULONG r[],ULONG a[],int n) { | ||
127 | ; int i; | ||
128 | ; for(i = 0; i < n; i++) <r[2*i+1],r[2*i]> := a[i] * a[i] ; | ||
129 | ; } | ||
130 | |||
131 | r=4 ;(AP) | ||
132 | a=8 ;(AP) | ||
133 | n=12 ;(AP) n by value (input) | ||
134 | |||
135 | |||
136 | .psect code,nowrt | ||
137 | |||
138 | .entry bn_sqr_words,^m<r2,r3,r4,r5> | ||
139 | |||
140 | moval @r(ap),r2 ; r2 -> r[] | ||
141 | moval @a(ap),r3 ; r3 -> a[] | ||
142 | movl n(ap),r4 ; r4 = n (assumed >0 by C code) | ||
143 | |||
144 | 0$: | ||
145 | movl (r3)+,r5 ; r5 = a[] & advance | ||
146 | |||
147 | ; <r1,r0> := a[] * a[] | ||
148 | emul r5,r5,#0,r0 ; a[] considered signed | ||
149 | |||
150 | ; fixup for "negative" a[] | ||
151 | tstl r5 ; a[] | ||
152 | bgeq 30$ | ||
153 | addl2 r5,r1 ; a[] | ||
154 | addl2 r5,r1 ; a[] | ||
155 | 30$: | ||
156 | |||
157 | movl r0,(r2)+ ; store lo result in r[] & advance | ||
158 | movl r1,(r2)+ ; store hi result in r[] & advance | ||
159 | |||
160 | sobgtr r4,0$ | ||
161 | |||
162 | movl #1,r0 ; return SS$_NORMAL | ||
163 | ret | ||
164 | |||
165 | .title (generated) | ||
166 | |||
167 | .psect code,nowrt | ||
168 | |||
169 | .entry BN_DIV_WORDS,^m<r2,r3,r4,r5,r6,r7,r8,r9,r10> | ||
170 | subl2 #4,sp | ||
171 | |||
172 | clrl r9 | ||
173 | movl #2,r8 | ||
174 | |||
175 | tstl 12(ap) | ||
176 | bneq noname.2 | ||
177 | mnegl #1,r10 | ||
178 | brw noname.3 | ||
179 | tstl r0 | ||
180 | nop | ||
181 | noname.2: | ||
182 | |||
183 | pushl 12(ap) | ||
184 | calls #1,BN_NUM_BITS_WORD | ||
185 | movl r0,r7 | ||
186 | |||
187 | cmpl r7,#32 | ||
188 | beql noname.4 | ||
189 | ashl r7,#1,r2 | ||
190 | cmpl 4(ap),r2 | ||
191 | blequ noname.4 | ||
192 | |||
193 | pushl r7 | ||
194 | calls #1,BN_DIV_WORDS_ABORT | ||
195 | noname.4: | ||
196 | |||
197 | subl3 r7,#32,r7 | ||
198 | |||
199 | movl 12(ap),r2 | ||
200 | cmpl 4(ap),r2 | ||
201 | blssu noname.5 | ||
202 | subl2 r2,4(ap) | ||
203 | noname.5: | ||
204 | |||
205 | tstl r7 | ||
206 | beql noname.6 | ||
207 | |||
208 | ashl r7,r2,12(ap) | ||
209 | |||
210 | ashl r7,4(ap),r4 | ||
211 | subl3 r7,#32,r3 | ||
212 | subl3 r3,#32,r2 | ||
213 | extzv r3,r2,8(ap),r2 | ||
214 | bisl3 r4,r2,4(ap) | ||
215 | |||
216 | ashl r7,8(ap),8(ap) | ||
217 | noname.6: | ||
218 | |||
219 | bicl3 #65535,12(ap),r2 | ||
220 | extzv #16,#16,r2,r5 | ||
221 | |||
222 | bicl3 #-65536,12(ap),r6 | ||
223 | |||
224 | noname.7: | ||
225 | |||
226 | moval 4(ap),r2 | ||
227 | movzwl 2(r2),r0 | ||
228 | cmpl r0,r5 | ||
229 | bneq noname.8 | ||
230 | |||
231 | movzwl #65535,r4 | ||
232 | brb noname.9 | ||
233 | noname.8: | ||
234 | |||
235 | clrl r1 | ||
236 | movl (r2),r0 | ||
237 | movl r5,r2 | ||
238 | bgeq vcg.1 | ||
239 | cmpl r2,r0 | ||
240 | bgtru vcg.2 | ||
241 | incl r1 | ||
242 | brb vcg.2 | ||
243 | nop | ||
244 | vcg.1: | ||
245 | ediv r2,r0,r1,r0 | ||
246 | vcg.2: | ||
247 | movl r1,r4 | ||
248 | noname.9: | ||
249 | |||
250 | noname.10: | ||
251 | |||
252 | mull3 r5,r4,r0 | ||
253 | subl3 r0,4(ap),r3 | ||
254 | |||
255 | bicl3 #65535,r3,r0 | ||
256 | bneq noname.13 | ||
257 | mull3 r6,r4,r2 | ||
258 | ashl #16,r3,r1 | ||
259 | bicl3 #65535,8(ap),r0 | ||
260 | extzv #16,#16,r0,r0 | ||
261 | addl2 r0,r1 | ||
262 | cmpl r2,r1 | ||
263 | bgtru noname.12 | ||
264 | noname.11: | ||
265 | |||
266 | brb noname.13 | ||
267 | nop | ||
268 | noname.12: | ||
269 | |||
270 | decl r4 | ||
271 | brb noname.10 | ||
272 | noname.13: | ||
273 | |||
274 | mull3 r5,r4,r1 | ||
275 | |||
276 | mull3 r6,r4,r0 | ||
277 | |||
278 | extzv #16,#16,r0,r3 | ||
279 | |||
280 | ashl #16,r0,r2 | ||
281 | bicl3 #65535,r2,r0 | ||
282 | |||
283 | addl2 r3,r1 | ||
284 | |||
285 | moval 8(ap),r3 | ||
286 | cmpl (r3),r0 | ||
287 | bgequ noname.15 | ||
288 | incl r1 | ||
289 | noname.15: | ||
290 | |||
291 | subl2 r0,(r3) | ||
292 | |||
293 | cmpl 4(ap),r1 | ||
294 | bgequ noname.16 | ||
295 | |||
296 | addl2 12(ap),4(ap) | ||
297 | |||
298 | decl r4 | ||
299 | noname.16: | ||
300 | |||
301 | subl2 r1,4(ap) | ||
302 | |||
303 | decl r8 | ||
304 | beql noname.18 | ||
305 | noname.17: | ||
306 | |||
307 | ashl #16,r4,r9 | ||
308 | |||
309 | ashl #16,4(ap),r2 | ||
310 | movzwl 2(r3),r0 | ||
311 | bisl2 r0,r2 | ||
312 | bicl3 #0,r2,4(ap) | ||
313 | |||
314 | bicl3 #-65536,(r3),r0 | ||
315 | ashl #16,r0,(r3) | ||
316 | brw noname.7 | ||
317 | nop | ||
318 | noname.18: | ||
319 | |||
320 | bisl2 r4,r9 | ||
321 | |||
322 | movl r9,r10 | ||
323 | |||
324 | noname.3: | ||
325 | movl r10,r0 | ||
326 | ret | ||
327 | tstl r0 | ||
328 | |||
329 | |||
330 | .psect code,nowrt | ||
331 | |||
332 | .entry BN_ADD_WORDS,^m<r2,r3,r4,r5,r6,r7> | ||
333 | |||
334 | tstl 16(ap) | ||
335 | bgtr noname.21 | ||
336 | clrl r7 | ||
337 | brw noname.22 | ||
338 | noname.21: | ||
339 | |||
340 | clrl r4 | ||
341 | |||
342 | tstl r0 | ||
343 | noname.23: | ||
344 | |||
345 | movl 8(ap),r6 | ||
346 | addl3 r4,(r6),r2 | ||
347 | |||
348 | bicl2 #0,r2 | ||
349 | |||
350 | clrl r0 | ||
351 | cmpl r2,r4 | ||
352 | bgequ vcg.3 | ||
353 | incl r0 | ||
354 | vcg.3: | ||
355 | movl r0,r4 | ||
356 | |||
357 | movl 12(ap),r5 | ||
358 | addl3 (r5),r2,r1 | ||
359 | bicl2 #0,r1 | ||
360 | |||
361 | clrl r0 | ||
362 | cmpl r1,r2 | ||
363 | bgequ vcg.4 | ||
364 | incl r0 | ||
365 | vcg.4: | ||
366 | addl2 r0,r4 | ||
367 | |||
368 | movl 4(ap),r3 | ||
369 | movl r1,(r3) | ||
370 | |||
371 | decl 16(ap) | ||
372 | bgtr gen.1 | ||
373 | brw noname.25 | ||
374 | gen.1: | ||
375 | noname.24: | ||
376 | |||
377 | addl3 r4,4(r6),r2 | ||
378 | |||
379 | bicl2 #0,r2 | ||
380 | |||
381 | clrl r0 | ||
382 | cmpl r2,r4 | ||
383 | bgequ vcg.5 | ||
384 | incl r0 | ||
385 | vcg.5: | ||
386 | movl r0,r4 | ||
387 | |||
388 | addl3 4(r5),r2,r1 | ||
389 | bicl2 #0,r1 | ||
390 | |||
391 | clrl r0 | ||
392 | cmpl r1,r2 | ||
393 | bgequ vcg.6 | ||
394 | incl r0 | ||
395 | vcg.6: | ||
396 | addl2 r0,r4 | ||
397 | |||
398 | movl r1,4(r3) | ||
399 | |||
400 | decl 16(ap) | ||
401 | bleq noname.25 | ||
402 | noname.26: | ||
403 | |||
404 | addl3 r4,8(r6),r2 | ||
405 | |||
406 | bicl2 #0,r2 | ||
407 | |||
408 | clrl r0 | ||
409 | cmpl r2,r4 | ||
410 | bgequ vcg.7 | ||
411 | incl r0 | ||
412 | vcg.7: | ||
413 | movl r0,r4 | ||
414 | |||
415 | addl3 8(r5),r2,r1 | ||
416 | bicl2 #0,r1 | ||
417 | |||
418 | clrl r0 | ||
419 | cmpl r1,r2 | ||
420 | bgequ vcg.8 | ||
421 | incl r0 | ||
422 | vcg.8: | ||
423 | addl2 r0,r4 | ||
424 | |||
425 | movl r1,8(r3) | ||
426 | |||
427 | decl 16(ap) | ||
428 | bleq noname.25 | ||
429 | noname.27: | ||
430 | |||
431 | addl3 r4,12(r6),r2 | ||
432 | |||
433 | bicl2 #0,r2 | ||
434 | |||
435 | clrl r0 | ||
436 | cmpl r2,r4 | ||
437 | bgequ vcg.9 | ||
438 | incl r0 | ||
439 | vcg.9: | ||
440 | movl r0,r4 | ||
441 | |||
442 | addl3 12(r5),r2,r1 | ||
443 | bicl2 #0,r1 | ||
444 | |||
445 | clrl r0 | ||
446 | cmpl r1,r2 | ||
447 | bgequ vcg.10 | ||
448 | incl r0 | ||
449 | vcg.10: | ||
450 | addl2 r0,r4 | ||
451 | |||
452 | movl r1,12(r3) | ||
453 | |||
454 | decl 16(ap) | ||
455 | bleq noname.25 | ||
456 | noname.28: | ||
457 | |||
458 | addl3 #16,r6,8(ap) | ||
459 | |||
460 | addl3 #16,r5,12(ap) | ||
461 | |||
462 | addl3 #16,r3,4(ap) | ||
463 | brw noname.23 | ||
464 | tstl r0 | ||
465 | noname.25: | ||
466 | |||
467 | movl r4,r7 | ||
468 | |||
469 | noname.22: | ||
470 | movl r7,r0 | ||
471 | ret | ||
472 | nop | ||
473 | |||
474 | |||
475 | |||
476 | ;r=4 ;(AP) | ||
477 | ;a=8 ;(AP) | ||
478 | ;b=12 ;(AP) | ||
479 | ;n=16 ;(AP) n by value (input) | ||
480 | |||
481 | .psect code,nowrt | ||
482 | |||
483 | .entry BN_SUB_WORDS,^m<r2,r3,r4,r5,r6,r7> | ||
484 | |||
485 | clrl r6 | ||
486 | |||
487 | tstl 16(ap) | ||
488 | bgtr noname.31 | ||
489 | clrl r7 | ||
490 | brw noname.32 | ||
491 | tstl r0 | ||
492 | noname.31: | ||
493 | |||
494 | noname.33: | ||
495 | |||
496 | movl 8(ap),r5 | ||
497 | movl (r5),r1 | ||
498 | movl 12(ap),r4 | ||
499 | movl (r4),r2 | ||
500 | |||
501 | movl 4(ap),r3 | ||
502 | subl3 r2,r1,r0 | ||
503 | subl2 r6,r0 | ||
504 | bicl3 #0,r0,(r3) | ||
505 | |||
506 | cmpl r1,r2 | ||
507 | beql noname.34 | ||
508 | clrl r0 | ||
509 | cmpl r1,r2 | ||
510 | bgequ vcg.11 | ||
511 | incl r0 | ||
512 | vcg.11: | ||
513 | movl r0,r6 | ||
514 | noname.34: | ||
515 | |||
516 | decl 16(ap) | ||
517 | bgtr gen.2 | ||
518 | brw noname.36 | ||
519 | gen.2: | ||
520 | noname.35: | ||
521 | |||
522 | movl 4(r5),r2 | ||
523 | movl 4(r4),r1 | ||
524 | |||
525 | subl3 r1,r2,r0 | ||
526 | subl2 r6,r0 | ||
527 | bicl3 #0,r0,4(r3) | ||
528 | |||
529 | cmpl r2,r1 | ||
530 | beql noname.37 | ||
531 | clrl r0 | ||
532 | cmpl r2,r1 | ||
533 | bgequ vcg.12 | ||
534 | incl r0 | ||
535 | vcg.12: | ||
536 | movl r0,r6 | ||
537 | noname.37: | ||
538 | |||
539 | decl 16(ap) | ||
540 | bleq noname.36 | ||
541 | noname.38: | ||
542 | |||
543 | movl 8(r5),r1 | ||
544 | movl 8(r4),r2 | ||
545 | |||
546 | subl3 r2,r1,r0 | ||
547 | subl2 r6,r0 | ||
548 | bicl3 #0,r0,8(r3) | ||
549 | |||
550 | cmpl r1,r2 | ||
551 | beql noname.39 | ||
552 | clrl r0 | ||
553 | cmpl r1,r2 | ||
554 | bgequ vcg.13 | ||
555 | incl r0 | ||
556 | vcg.13: | ||
557 | movl r0,r6 | ||
558 | noname.39: | ||
559 | |||
560 | decl 16(ap) | ||
561 | bleq noname.36 | ||
562 | noname.40: | ||
563 | |||
564 | movl 12(r5),r1 | ||
565 | movl 12(r4),r2 | ||
566 | |||
567 | subl3 r2,r1,r0 | ||
568 | subl2 r6,r0 | ||
569 | bicl3 #0,r0,12(r3) | ||
570 | |||
571 | cmpl r1,r2 | ||
572 | beql noname.41 | ||
573 | clrl r0 | ||
574 | cmpl r1,r2 | ||
575 | bgequ vcg.14 | ||
576 | incl r0 | ||
577 | vcg.14: | ||
578 | movl r0,r6 | ||
579 | noname.41: | ||
580 | |||
581 | decl 16(ap) | ||
582 | bleq noname.36 | ||
583 | noname.42: | ||
584 | |||
585 | addl3 #16,r5,8(ap) | ||
586 | |||
587 | addl3 #16,r4,12(ap) | ||
588 | |||
589 | addl3 #16,r3,4(ap) | ||
590 | brw noname.33 | ||
591 | tstl r0 | ||
592 | noname.36: | ||
593 | |||
594 | movl r6,r7 | ||
595 | |||
596 | noname.32: | ||
597 | movl r7,r0 | ||
598 | ret | ||
599 | nop | ||
600 | |||
601 | |||
602 | |||
603 | ;r=4 ;(AP) | ||
604 | ;a=8 ;(AP) | ||
605 | ;b=12 ;(AP) | ||
606 | ;n=16 ;(AP) n by value (input) | ||
607 | |||
608 | .psect code,nowrt | ||
609 | |||
610 | .entry BN_MUL_COMBA8,^m<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11> | ||
611 | movab -924(sp),sp | ||
612 | clrq r8 | ||
613 | |||
614 | clrl r10 | ||
615 | |||
616 | movl 8(ap),r6 | ||
617 | movzwl 2(r6),r3 | ||
618 | movl 12(ap),r7 | ||
619 | bicl3 #-65536,(r7),r2 | ||
620 | movzwl 2(r7),r0 | ||
621 | bicl2 #-65536,r0 | ||
622 | bicl3 #-65536,(r6),-12(fp) | ||
623 | bicl3 #-65536,r3,-16(fp) | ||
624 | mull3 r0,-12(fp),-4(fp) | ||
625 | mull2 r2,-12(fp) | ||
626 | mull3 r2,-16(fp),-8(fp) | ||
627 | mull2 r0,-16(fp) | ||
628 | addl3 -4(fp),-8(fp),r0 | ||
629 | bicl3 #0,r0,-4(fp) | ||
630 | cmpl -4(fp),-8(fp) | ||
631 | bgequ noname.45 | ||
632 | addl2 #65536,-16(fp) | ||
633 | noname.45: | ||
634 | movzwl -2(fp),r0 | ||
635 | bicl2 #-65536,r0 | ||
636 | addl2 r0,-16(fp) | ||
637 | bicl3 #-65536,-4(fp),r0 | ||
638 | ashl #16,r0,-8(fp) | ||
639 | addl3 -8(fp),-12(fp),r0 | ||
640 | bicl3 #0,r0,-12(fp) | ||
641 | cmpl -12(fp),-8(fp) | ||
642 | bgequ noname.46 | ||
643 | incl -16(fp) | ||
644 | noname.46: | ||
645 | movl -12(fp),r1 | ||
646 | movl -16(fp),r2 | ||
647 | addl2 r1,r9 | ||
648 | bicl2 #0,r9 | ||
649 | cmpl r9,r1 | ||
650 | bgequ noname.47 | ||
651 | incl r2 | ||
652 | noname.47: | ||
653 | addl2 r2,r8 | ||
654 | bicl2 #0,r8 | ||
655 | cmpl r8,r2 | ||
656 | bgequ noname.48 | ||
657 | incl r10 | ||
658 | noname.48: | ||
659 | |||
660 | movl 4(ap),r11 | ||
661 | movl r9,(r11) | ||
662 | |||
663 | clrl r9 | ||
664 | |||
665 | movzwl 2(r6),r2 | ||
666 | bicl3 #-65536,4(r7),r3 | ||
667 | movzwl 6(r7),r0 | ||
668 | bicl2 #-65536,r0 | ||
669 | bicl3 #-65536,(r6),-28(fp) | ||
670 | bicl3 #-65536,r2,-32(fp) | ||
671 | mull3 r0,-28(fp),-20(fp) | ||
672 | mull2 r3,-28(fp) | ||
673 | mull3 r3,-32(fp),-24(fp) | ||
674 | mull2 r0,-32(fp) | ||
675 | addl3 -20(fp),-24(fp),r0 | ||
676 | bicl3 #0,r0,-20(fp) | ||
677 | cmpl -20(fp),-24(fp) | ||
678 | bgequ noname.49 | ||
679 | addl2 #65536,-32(fp) | ||
680 | noname.49: | ||
681 | movzwl -18(fp),r0 | ||
682 | bicl2 #-65536,r0 | ||
683 | addl2 r0,-32(fp) | ||
684 | bicl3 #-65536,-20(fp),r0 | ||
685 | ashl #16,r0,-24(fp) | ||
686 | addl3 -24(fp),-28(fp),r0 | ||
687 | bicl3 #0,r0,-28(fp) | ||
688 | cmpl -28(fp),-24(fp) | ||
689 | bgequ noname.50 | ||
690 | incl -32(fp) | ||
691 | noname.50: | ||
692 | movl -28(fp),r1 | ||
693 | movl -32(fp),r2 | ||
694 | addl2 r1,r8 | ||
695 | bicl2 #0,r8 | ||
696 | cmpl r8,r1 | ||
697 | bgequ noname.51 | ||
698 | incl r2 | ||
699 | noname.51: | ||
700 | addl2 r2,r10 | ||
701 | bicl2 #0,r10 | ||
702 | cmpl r10,r2 | ||
703 | bgequ noname.52 | ||
704 | incl r9 | ||
705 | noname.52: | ||
706 | |||
707 | movzwl 6(r6),r2 | ||
708 | bicl3 #-65536,(r7),r3 | ||
709 | movzwl 2(r7),r0 | ||
710 | bicl2 #-65536,r0 | ||
711 | bicl3 #-65536,4(r6),-44(fp) | ||
712 | bicl3 #-65536,r2,-48(fp) | ||
713 | mull3 r0,-44(fp),-36(fp) | ||
714 | mull2 r3,-44(fp) | ||
715 | mull3 r3,-48(fp),-40(fp) | ||
716 | mull2 r0,-48(fp) | ||
717 | addl3 -36(fp),-40(fp),r0 | ||
718 | bicl3 #0,r0,-36(fp) | ||
719 | cmpl -36(fp),-40(fp) | ||
720 | bgequ noname.53 | ||
721 | addl2 #65536,-48(fp) | ||
722 | noname.53: | ||
723 | movzwl -34(fp),r0 | ||
724 | bicl2 #-65536,r0 | ||
725 | addl2 r0,-48(fp) | ||
726 | bicl3 #-65536,-36(fp),r0 | ||
727 | ashl #16,r0,-40(fp) | ||
728 | addl3 -40(fp),-44(fp),r0 | ||
729 | bicl3 #0,r0,-44(fp) | ||
730 | cmpl -44(fp),-40(fp) | ||
731 | bgequ noname.54 | ||
732 | incl -48(fp) | ||
733 | noname.54: | ||
734 | movl -44(fp),r1 | ||
735 | movl -48(fp),r2 | ||
736 | addl2 r1,r8 | ||
737 | bicl2 #0,r8 | ||
738 | cmpl r8,r1 | ||
739 | bgequ noname.55 | ||
740 | incl r2 | ||
741 | noname.55: | ||
742 | addl2 r2,r10 | ||
743 | bicl2 #0,r10 | ||
744 | cmpl r10,r2 | ||
745 | bgequ noname.56 | ||
746 | incl r9 | ||
747 | noname.56: | ||
748 | |||
749 | movl r8,4(r11) | ||
750 | |||
751 | clrl r8 | ||
752 | |||
753 | movzwl 10(r6),r2 | ||
754 | bicl3 #-65536,(r7),r3 | ||
755 | movzwl 2(r7),r0 | ||
756 | bicl2 #-65536,r0 | ||
757 | bicl3 #-65536,8(r6),-60(fp) | ||
758 | bicl3 #-65536,r2,-64(fp) | ||
759 | mull3 r0,-60(fp),-52(fp) | ||
760 | mull2 r3,-60(fp) | ||
761 | mull3 r3,-64(fp),-56(fp) | ||
762 | mull2 r0,-64(fp) | ||
763 | addl3 -52(fp),-56(fp),r0 | ||
764 | bicl3 #0,r0,-52(fp) | ||
765 | cmpl -52(fp),-56(fp) | ||
766 | bgequ noname.57 | ||
767 | addl2 #65536,-64(fp) | ||
768 | noname.57: | ||
769 | movzwl -50(fp),r0 | ||
770 | bicl2 #-65536,r0 | ||
771 | addl2 r0,-64(fp) | ||
772 | bicl3 #-65536,-52(fp),r0 | ||
773 | ashl #16,r0,-56(fp) | ||
774 | addl3 -56(fp),-60(fp),r0 | ||
775 | bicl3 #0,r0,-60(fp) | ||
776 | cmpl -60(fp),-56(fp) | ||
777 | bgequ noname.58 | ||
778 | incl -64(fp) | ||
779 | noname.58: | ||
780 | movl -60(fp),r1 | ||
781 | movl -64(fp),r2 | ||
782 | addl2 r1,r10 | ||
783 | bicl2 #0,r10 | ||
784 | cmpl r10,r1 | ||
785 | bgequ noname.59 | ||
786 | incl r2 | ||
787 | noname.59: | ||
788 | addl2 r2,r9 | ||
789 | bicl2 #0,r9 | ||
790 | cmpl r9,r2 | ||
791 | bgequ noname.60 | ||
792 | incl r8 | ||
793 | noname.60: | ||
794 | |||
795 | movzwl 6(r6),r2 | ||
796 | bicl3 #-65536,4(r7),r3 | ||
797 | movzwl 6(r7),r0 | ||
798 | bicl2 #-65536,r0 | ||
799 | bicl3 #-65536,4(r6),-76(fp) | ||
800 | bicl3 #-65536,r2,-80(fp) | ||
801 | mull3 r0,-76(fp),-68(fp) | ||
802 | mull2 r3,-76(fp) | ||
803 | mull3 r3,-80(fp),-72(fp) | ||
804 | mull2 r0,-80(fp) | ||
805 | addl3 -68(fp),-72(fp),r0 | ||
806 | bicl3 #0,r0,-68(fp) | ||
807 | cmpl -68(fp),-72(fp) | ||
808 | bgequ noname.61 | ||
809 | addl2 #65536,-80(fp) | ||
810 | noname.61: | ||
811 | movzwl -66(fp),r0 | ||
812 | bicl2 #-65536,r0 | ||
813 | addl2 r0,-80(fp) | ||
814 | bicl3 #-65536,-68(fp),r0 | ||
815 | ashl #16,r0,-72(fp) | ||
816 | addl3 -72(fp),-76(fp),r0 | ||
817 | bicl3 #0,r0,-76(fp) | ||
818 | cmpl -76(fp),-72(fp) | ||
819 | bgequ noname.62 | ||
820 | incl -80(fp) | ||
821 | noname.62: | ||
822 | movl -76(fp),r1 | ||
823 | movl -80(fp),r2 | ||
824 | addl2 r1,r10 | ||
825 | bicl2 #0,r10 | ||
826 | cmpl r10,r1 | ||
827 | bgequ noname.63 | ||
828 | incl r2 | ||
829 | noname.63: | ||
830 | addl2 r2,r9 | ||
831 | bicl2 #0,r9 | ||
832 | cmpl r9,r2 | ||
833 | bgequ noname.64 | ||
834 | incl r8 | ||
835 | noname.64: | ||
836 | |||
837 | movzwl 2(r6),r2 | ||
838 | bicl3 #-65536,8(r7),r3 | ||
839 | movzwl 10(r7),r0 | ||
840 | bicl2 #-65536,r0 | ||
841 | bicl3 #-65536,(r6),-92(fp) | ||
842 | bicl3 #-65536,r2,-96(fp) | ||
843 | mull3 r0,-92(fp),-84(fp) | ||
844 | mull2 r3,-92(fp) | ||
845 | mull3 r3,-96(fp),-88(fp) | ||
846 | mull2 r0,-96(fp) | ||
847 | addl3 -84(fp),-88(fp),r0 | ||
848 | bicl3 #0,r0,-84(fp) | ||
849 | cmpl -84(fp),-88(fp) | ||
850 | bgequ noname.65 | ||
851 | addl2 #65536,-96(fp) | ||
852 | noname.65: | ||
853 | movzwl -82(fp),r0 | ||
854 | bicl2 #-65536,r0 | ||
855 | addl2 r0,-96(fp) | ||
856 | bicl3 #-65536,-84(fp),r0 | ||
857 | ashl #16,r0,-88(fp) | ||
858 | addl3 -88(fp),-92(fp),r0 | ||
859 | bicl3 #0,r0,-92(fp) | ||
860 | cmpl -92(fp),-88(fp) | ||
861 | bgequ noname.66 | ||
862 | incl -96(fp) | ||
863 | noname.66: | ||
864 | movl -92(fp),r1 | ||
865 | movl -96(fp),r2 | ||
866 | addl2 r1,r10 | ||
867 | bicl2 #0,r10 | ||
868 | cmpl r10,r1 | ||
869 | bgequ noname.67 | ||
870 | incl r2 | ||
871 | noname.67: | ||
872 | addl2 r2,r9 | ||
873 | bicl2 #0,r9 | ||
874 | cmpl r9,r2 | ||
875 | bgequ noname.68 | ||
876 | incl r8 | ||
877 | noname.68: | ||
878 | |||
879 | movl r10,8(r11) | ||
880 | |||
881 | clrl r10 | ||
882 | |||
883 | movzwl 2(r6),r2 | ||
884 | bicl3 #-65536,12(r7),r3 | ||
885 | movzwl 14(r7),r0 | ||
886 | bicl2 #-65536,r0 | ||
887 | bicl3 #-65536,(r6),-108(fp) | ||
888 | bicl3 #-65536,r2,-112(fp) | ||
889 | mull3 r0,-108(fp),-100(fp) | ||
890 | mull2 r3,-108(fp) | ||
891 | mull3 r3,-112(fp),-104(fp) | ||
892 | mull2 r0,-112(fp) | ||
893 | addl3 -100(fp),-104(fp),r0 | ||
894 | bicl3 #0,r0,-100(fp) | ||
895 | cmpl -100(fp),-104(fp) | ||
896 | bgequ noname.69 | ||
897 | addl2 #65536,-112(fp) | ||
898 | noname.69: | ||
899 | movzwl -98(fp),r0 | ||
900 | bicl2 #-65536,r0 | ||
901 | addl2 r0,-112(fp) | ||
902 | bicl3 #-65536,-100(fp),r0 | ||
903 | ashl #16,r0,-104(fp) | ||
904 | addl3 -104(fp),-108(fp),r0 | ||
905 | bicl3 #0,r0,-108(fp) | ||
906 | cmpl -108(fp),-104(fp) | ||
907 | bgequ noname.70 | ||
908 | incl -112(fp) | ||
909 | noname.70: | ||
910 | movl -108(fp),r1 | ||
911 | movl -112(fp),r2 | ||
912 | addl2 r1,r9 | ||
913 | bicl2 #0,r9 | ||
914 | cmpl r9,r1 | ||
915 | bgequ noname.71 | ||
916 | incl r2 | ||
917 | noname.71: | ||
918 | addl2 r2,r8 | ||
919 | bicl2 #0,r8 | ||
920 | cmpl r8,r2 | ||
921 | bgequ noname.72 | ||
922 | incl r10 | ||
923 | noname.72: | ||
924 | |||
925 | movzwl 6(r6),r2 | ||
926 | bicl3 #-65536,8(r7),r3 | ||
927 | movzwl 10(r7),r0 | ||
928 | bicl2 #-65536,r0 | ||
929 | bicl3 #-65536,4(r6),-124(fp) | ||
930 | bicl3 #-65536,r2,-128(fp) | ||
931 | mull3 r0,-124(fp),-116(fp) | ||
932 | mull2 r3,-124(fp) | ||
933 | mull3 r3,-128(fp),-120(fp) | ||
934 | mull2 r0,-128(fp) | ||
935 | addl3 -116(fp),-120(fp),r0 | ||
936 | bicl3 #0,r0,-116(fp) | ||
937 | cmpl -116(fp),-120(fp) | ||
938 | bgequ noname.73 | ||
939 | addl2 #65536,-128(fp) | ||
940 | noname.73: | ||
941 | movzwl -114(fp),r0 | ||
942 | bicl2 #-65536,r0 | ||
943 | addl2 r0,-128(fp) | ||
944 | bicl3 #-65536,-116(fp),r0 | ||
945 | ashl #16,r0,-120(fp) | ||
946 | addl3 -120(fp),-124(fp),r0 | ||
947 | bicl3 #0,r0,-124(fp) | ||
948 | cmpl -124(fp),-120(fp) | ||
949 | bgequ noname.74 | ||
950 | incl -128(fp) | ||
951 | noname.74: | ||
952 | movl -124(fp),r1 | ||
953 | movl -128(fp),r2 | ||
954 | addl2 r1,r9 | ||
955 | bicl2 #0,r9 | ||
956 | cmpl r9,r1 | ||
957 | bgequ noname.75 | ||
958 | incl r2 | ||
959 | noname.75: | ||
960 | addl2 r2,r8 | ||
961 | bicl2 #0,r8 | ||
962 | cmpl r8,r2 | ||
963 | bgequ noname.76 | ||
964 | incl r10 | ||
965 | noname.76: | ||
966 | |||
967 | movzwl 10(r6),r2 | ||
968 | bicl3 #-65536,4(r7),r3 | ||
969 | movzwl 6(r7),r0 | ||
970 | bicl2 #-65536,r0 | ||
971 | bicl3 #-65536,8(r6),-140(fp) | ||
972 | bicl3 #-65536,r2,-144(fp) | ||
973 | mull3 r0,-140(fp),-132(fp) | ||
974 | mull2 r3,-140(fp) | ||
975 | mull3 r3,-144(fp),-136(fp) | ||
976 | mull2 r0,-144(fp) | ||
977 | addl3 -132(fp),-136(fp),r0 | ||
978 | bicl3 #0,r0,-132(fp) | ||
979 | cmpl -132(fp),-136(fp) | ||
980 | bgequ noname.77 | ||
981 | addl2 #65536,-144(fp) | ||
982 | noname.77: | ||
983 | movzwl -130(fp),r0 | ||
984 | bicl2 #-65536,r0 | ||
985 | addl2 r0,-144(fp) | ||
986 | bicl3 #-65536,-132(fp),r0 | ||
987 | ashl #16,r0,-136(fp) | ||
988 | addl3 -136(fp),-140(fp),r0 | ||
989 | bicl3 #0,r0,-140(fp) | ||
990 | cmpl -140(fp),-136(fp) | ||
991 | bgequ noname.78 | ||
992 | incl -144(fp) | ||
993 | noname.78: | ||
994 | movl -140(fp),r1 | ||
995 | movl -144(fp),r2 | ||
996 | addl2 r1,r9 | ||
997 | bicl2 #0,r9 | ||
998 | cmpl r9,r1 | ||
999 | bgequ noname.79 | ||
1000 | incl r2 | ||
1001 | noname.79: | ||
1002 | addl2 r2,r8 | ||
1003 | bicl2 #0,r8 | ||
1004 | cmpl r8,r2 | ||
1005 | bgequ noname.80 | ||
1006 | incl r10 | ||
1007 | noname.80: | ||
1008 | |||
1009 | movzwl 14(r6),r2 | ||
1010 | bicl3 #-65536,(r7),r3 | ||
1011 | movzwl 2(r7),r0 | ||
1012 | bicl2 #-65536,r0 | ||
1013 | bicl3 #-65536,12(r6),-156(fp) | ||
1014 | bicl3 #-65536,r2,-160(fp) | ||
1015 | mull3 r0,-156(fp),-148(fp) | ||
1016 | mull2 r3,-156(fp) | ||
1017 | mull3 r3,-160(fp),-152(fp) | ||
1018 | mull2 r0,-160(fp) | ||
1019 | addl3 -148(fp),-152(fp),r0 | ||
1020 | bicl3 #0,r0,-148(fp) | ||
1021 | cmpl -148(fp),-152(fp) | ||
1022 | bgequ noname.81 | ||
1023 | addl2 #65536,-160(fp) | ||
1024 | noname.81: | ||
1025 | movzwl -146(fp),r0 | ||
1026 | bicl2 #-65536,r0 | ||
1027 | addl2 r0,-160(fp) | ||
1028 | bicl3 #-65536,-148(fp),r0 | ||
1029 | ashl #16,r0,-152(fp) | ||
1030 | addl3 -152(fp),-156(fp),r0 | ||
1031 | bicl3 #0,r0,-156(fp) | ||
1032 | cmpl -156(fp),-152(fp) | ||
1033 | bgequ noname.82 | ||
1034 | incl -160(fp) | ||
1035 | noname.82: | ||
1036 | movl -156(fp),r1 | ||
1037 | movl -160(fp),r2 | ||
1038 | addl2 r1,r9 | ||
1039 | bicl2 #0,r9 | ||
1040 | cmpl r9,r1 | ||
1041 | bgequ noname.83 | ||
1042 | incl r2 | ||
1043 | noname.83: | ||
1044 | addl2 r2,r8 | ||
1045 | bicl2 #0,r8 | ||
1046 | cmpl r8,r2 | ||
1047 | bgequ noname.84 | ||
1048 | incl r10 | ||
1049 | noname.84: | ||
1050 | |||
1051 | movl r9,12(r11) | ||
1052 | |||
1053 | clrl r9 | ||
1054 | |||
1055 | movzwl 18(r6),r2 | ||
1056 | bicl3 #-65536,(r7),r3 | ||
1057 | movzwl 2(r7),r0 | ||
1058 | bicl2 #-65536,r0 | ||
1059 | bicl3 #-65536,16(r6),-172(fp) | ||
1060 | bicl3 #-65536,r2,-176(fp) | ||
1061 | mull3 r0,-172(fp),-164(fp) | ||
1062 | mull2 r3,-172(fp) | ||
1063 | mull3 r3,-176(fp),-168(fp) | ||
1064 | mull2 r0,-176(fp) | ||
1065 | addl3 -164(fp),-168(fp),r0 | ||
1066 | bicl3 #0,r0,-164(fp) | ||
1067 | cmpl -164(fp),-168(fp) | ||
1068 | bgequ noname.85 | ||
1069 | addl2 #65536,-176(fp) | ||
1070 | noname.85: | ||
1071 | movzwl -162(fp),r0 | ||
1072 | bicl2 #-65536,r0 | ||
1073 | addl2 r0,-176(fp) | ||
1074 | bicl3 #-65536,-164(fp),r0 | ||
1075 | ashl #16,r0,-168(fp) | ||
1076 | addl3 -168(fp),-172(fp),r0 | ||
1077 | bicl3 #0,r0,-172(fp) | ||
1078 | cmpl -172(fp),-168(fp) | ||
1079 | bgequ noname.86 | ||
1080 | incl -176(fp) | ||
1081 | noname.86: | ||
1082 | movl -172(fp),r1 | ||
1083 | movl -176(fp),r2 | ||
1084 | addl2 r1,r8 | ||
1085 | bicl2 #0,r8 | ||
1086 | cmpl r8,r1 | ||
1087 | bgequ noname.87 | ||
1088 | incl r2 | ||
1089 | noname.87: | ||
1090 | addl2 r2,r10 | ||
1091 | bicl2 #0,r10 | ||
1092 | cmpl r10,r2 | ||
1093 | bgequ noname.88 | ||
1094 | incl r9 | ||
1095 | noname.88: | ||
1096 | |||
1097 | movzwl 14(r6),r2 | ||
1098 | bicl3 #-65536,4(r7),r3 | ||
1099 | movzwl 6(r7),r0 | ||
1100 | bicl2 #-65536,r0 | ||
1101 | bicl3 #-65536,12(r6),-188(fp) | ||
1102 | bicl3 #-65536,r2,-192(fp) | ||
1103 | mull3 r0,-188(fp),-180(fp) | ||
1104 | mull2 r3,-188(fp) | ||
1105 | mull3 r3,-192(fp),-184(fp) | ||
1106 | mull2 r0,-192(fp) | ||
1107 | addl3 -180(fp),-184(fp),r0 | ||
1108 | bicl3 #0,r0,-180(fp) | ||
1109 | cmpl -180(fp),-184(fp) | ||
1110 | bgequ noname.89 | ||
1111 | addl2 #65536,-192(fp) | ||
1112 | noname.89: | ||
1113 | movzwl -178(fp),r0 | ||
1114 | bicl2 #-65536,r0 | ||
1115 | addl2 r0,-192(fp) | ||
1116 | bicl3 #-65536,-180(fp),r0 | ||
1117 | ashl #16,r0,-184(fp) | ||
1118 | addl3 -184(fp),-188(fp),r0 | ||
1119 | bicl3 #0,r0,-188(fp) | ||
1120 | cmpl -188(fp),-184(fp) | ||
1121 | bgequ noname.90 | ||
1122 | incl -192(fp) | ||
1123 | noname.90: | ||
1124 | movl -188(fp),r1 | ||
1125 | movl -192(fp),r2 | ||
1126 | addl2 r1,r8 | ||
1127 | bicl2 #0,r8 | ||
1128 | cmpl r8,r1 | ||
1129 | bgequ noname.91 | ||
1130 | incl r2 | ||
1131 | noname.91: | ||
1132 | addl2 r2,r10 | ||
1133 | bicl2 #0,r10 | ||
1134 | cmpl r10,r2 | ||
1135 | bgequ noname.92 | ||
1136 | incl r9 | ||
1137 | noname.92: | ||
1138 | |||
1139 | movzwl 10(r6),r2 | ||
1140 | bicl3 #-65536,8(r7),r3 | ||
1141 | movzwl 10(r7),r0 | ||
1142 | bicl2 #-65536,r0 | ||
1143 | bicl3 #-65536,8(r6),-204(fp) | ||
1144 | bicl3 #-65536,r2,-208(fp) | ||
1145 | mull3 r0,-204(fp),-196(fp) | ||
1146 | mull2 r3,-204(fp) | ||
1147 | mull3 r3,-208(fp),-200(fp) | ||
1148 | mull2 r0,-208(fp) | ||
1149 | addl3 -196(fp),-200(fp),r0 | ||
1150 | bicl3 #0,r0,-196(fp) | ||
1151 | cmpl -196(fp),-200(fp) | ||
1152 | bgequ noname.93 | ||
1153 | addl2 #65536,-208(fp) | ||
1154 | noname.93: | ||
1155 | movzwl -194(fp),r0 | ||
1156 | bicl2 #-65536,r0 | ||
1157 | addl2 r0,-208(fp) | ||
1158 | bicl3 #-65536,-196(fp),r0 | ||
1159 | ashl #16,r0,-200(fp) | ||
1160 | addl3 -200(fp),-204(fp),r0 | ||
1161 | bicl3 #0,r0,-204(fp) | ||
1162 | cmpl -204(fp),-200(fp) | ||
1163 | bgequ noname.94 | ||
1164 | incl -208(fp) | ||
1165 | noname.94: | ||
1166 | movl -204(fp),r1 | ||
1167 | movl -208(fp),r2 | ||
1168 | addl2 r1,r8 | ||
1169 | bicl2 #0,r8 | ||
1170 | cmpl r8,r1 | ||
1171 | bgequ noname.95 | ||
1172 | incl r2 | ||
1173 | noname.95: | ||
1174 | addl2 r2,r10 | ||
1175 | bicl2 #0,r10 | ||
1176 | cmpl r10,r2 | ||
1177 | bgequ noname.96 | ||
1178 | incl r9 | ||
1179 | noname.96: | ||
1180 | |||
1181 | movzwl 6(r6),r2 | ||
1182 | bicl3 #-65536,12(r7),r3 | ||
1183 | movzwl 14(r7),r0 | ||
1184 | bicl2 #-65536,r0 | ||
1185 | bicl3 #-65536,4(r6),-220(fp) | ||
1186 | bicl3 #-65536,r2,-224(fp) | ||
1187 | mull3 r0,-220(fp),-212(fp) | ||
1188 | mull2 r3,-220(fp) | ||
1189 | mull3 r3,-224(fp),-216(fp) | ||
1190 | mull2 r0,-224(fp) | ||
1191 | addl3 -212(fp),-216(fp),r0 | ||
1192 | bicl3 #0,r0,-212(fp) | ||
1193 | cmpl -212(fp),-216(fp) | ||
1194 | bgequ noname.97 | ||
1195 | addl2 #65536,-224(fp) | ||
1196 | noname.97: | ||
1197 | movzwl -210(fp),r0 | ||
1198 | bicl2 #-65536,r0 | ||
1199 | addl2 r0,-224(fp) | ||
1200 | bicl3 #-65536,-212(fp),r0 | ||
1201 | ashl #16,r0,-216(fp) | ||
1202 | addl3 -216(fp),-220(fp),r0 | ||
1203 | bicl3 #0,r0,-220(fp) | ||
1204 | cmpl -220(fp),-216(fp) | ||
1205 | bgequ noname.98 | ||
1206 | incl -224(fp) | ||
1207 | noname.98: | ||
1208 | movl -220(fp),r1 | ||
1209 | movl -224(fp),r2 | ||
1210 | addl2 r1,r8 | ||
1211 | bicl2 #0,r8 | ||
1212 | cmpl r8,r1 | ||
1213 | bgequ noname.99 | ||
1214 | incl r2 | ||
1215 | noname.99: | ||
1216 | addl2 r2,r10 | ||
1217 | bicl2 #0,r10 | ||
1218 | cmpl r10,r2 | ||
1219 | bgequ noname.100 | ||
1220 | incl r9 | ||
1221 | noname.100: | ||
1222 | |||
1223 | movzwl 2(r6),r2 | ||
1224 | bicl3 #-65536,16(r7),r3 | ||
1225 | movzwl 18(r7),r0 | ||
1226 | bicl2 #-65536,r0 | ||
1227 | bicl3 #-65536,(r6),-236(fp) | ||
1228 | bicl3 #-65536,r2,-240(fp) | ||
1229 | mull3 r0,-236(fp),-228(fp) | ||
1230 | mull2 r3,-236(fp) | ||
1231 | mull3 r3,-240(fp),-232(fp) | ||
1232 | mull2 r0,-240(fp) | ||
1233 | addl3 -228(fp),-232(fp),r0 | ||
1234 | bicl3 #0,r0,-228(fp) | ||
1235 | cmpl -228(fp),-232(fp) | ||
1236 | bgequ noname.101 | ||
1237 | addl2 #65536,-240(fp) | ||
1238 | noname.101: | ||
1239 | movzwl -226(fp),r0 | ||
1240 | bicl2 #-65536,r0 | ||
1241 | addl2 r0,-240(fp) | ||
1242 | bicl3 #-65536,-228(fp),r0 | ||
1243 | ashl #16,r0,-232(fp) | ||
1244 | addl3 -232(fp),-236(fp),r0 | ||
1245 | bicl3 #0,r0,-236(fp) | ||
1246 | cmpl -236(fp),-232(fp) | ||
1247 | bgequ noname.102 | ||
1248 | incl -240(fp) | ||
1249 | noname.102: | ||
1250 | movl -236(fp),r1 | ||
1251 | movl -240(fp),r2 | ||
1252 | addl2 r1,r8 | ||
1253 | bicl2 #0,r8 | ||
1254 | cmpl r8,r1 | ||
1255 | bgequ noname.103 | ||
1256 | incl r2 | ||
1257 | noname.103: | ||
1258 | addl2 r2,r10 | ||
1259 | bicl2 #0,r10 | ||
1260 | cmpl r10,r2 | ||
1261 | bgequ noname.104 | ||
1262 | incl r9 | ||
1263 | noname.104: | ||
1264 | |||
1265 | movl r8,16(r11) | ||
1266 | |||
1267 | clrl r8 | ||
1268 | |||
1269 | movzwl 2(r6),r2 | ||
1270 | bicl3 #-65536,20(r7),r3 | ||
1271 | movzwl 22(r7),r0 | ||
1272 | bicl2 #-65536,r0 | ||
1273 | bicl3 #-65536,(r6),-252(fp) | ||
1274 | bicl3 #-65536,r2,-256(fp) | ||
1275 | mull3 r0,-252(fp),-244(fp) | ||
1276 | mull2 r3,-252(fp) | ||
1277 | mull3 r3,-256(fp),-248(fp) | ||
1278 | mull2 r0,-256(fp) | ||
1279 | addl3 -244(fp),-248(fp),r0 | ||
1280 | bicl3 #0,r0,-244(fp) | ||
1281 | cmpl -244(fp),-248(fp) | ||
1282 | bgequ noname.105 | ||
1283 | addl2 #65536,-256(fp) | ||
1284 | noname.105: | ||
1285 | movzwl -242(fp),r0 | ||
1286 | bicl2 #-65536,r0 | ||
1287 | addl2 r0,-256(fp) | ||
1288 | bicl3 #-65536,-244(fp),r0 | ||
1289 | ashl #16,r0,-248(fp) | ||
1290 | addl3 -248(fp),-252(fp),r0 | ||
1291 | bicl3 #0,r0,-252(fp) | ||
1292 | cmpl -252(fp),-248(fp) | ||
1293 | bgequ noname.106 | ||
1294 | incl -256(fp) | ||
1295 | noname.106: | ||
1296 | movl -252(fp),r1 | ||
1297 | movl -256(fp),r2 | ||
1298 | addl2 r1,r10 | ||
1299 | bicl2 #0,r10 | ||
1300 | cmpl r10,r1 | ||
1301 | bgequ noname.107 | ||
1302 | incl r2 | ||
1303 | noname.107: | ||
1304 | addl2 r2,r9 | ||
1305 | bicl2 #0,r9 | ||
1306 | cmpl r9,r2 | ||
1307 | bgequ noname.108 | ||
1308 | incl r8 | ||
1309 | noname.108: | ||
1310 | |||
1311 | movzwl 6(r6),r2 | ||
1312 | bicl3 #-65536,16(r7),r3 | ||
1313 | movzwl 18(r7),r0 | ||
1314 | bicl2 #-65536,r0 | ||
1315 | bicl3 #-65536,4(r6),-268(fp) | ||
1316 | bicl3 #-65536,r2,-272(fp) | ||
1317 | mull3 r0,-268(fp),-260(fp) | ||
1318 | mull2 r3,-268(fp) | ||
1319 | mull3 r3,-272(fp),-264(fp) | ||
1320 | mull2 r0,-272(fp) | ||
1321 | addl3 -260(fp),-264(fp),r0 | ||
1322 | bicl3 #0,r0,-260(fp) | ||
1323 | cmpl -260(fp),-264(fp) | ||
1324 | bgequ noname.109 | ||
1325 | addl2 #65536,-272(fp) | ||
1326 | noname.109: | ||
1327 | movzwl -258(fp),r0 | ||
1328 | bicl2 #-65536,r0 | ||
1329 | addl2 r0,-272(fp) | ||
1330 | bicl3 #-65536,-260(fp),r0 | ||
1331 | ashl #16,r0,-264(fp) | ||
1332 | addl3 -264(fp),-268(fp),r0 | ||
1333 | bicl3 #0,r0,-268(fp) | ||
1334 | cmpl -268(fp),-264(fp) | ||
1335 | bgequ noname.110 | ||
1336 | incl -272(fp) | ||
1337 | noname.110: | ||
1338 | movl -268(fp),r1 | ||
1339 | movl -272(fp),r2 | ||
1340 | addl2 r1,r10 | ||
1341 | bicl2 #0,r10 | ||
1342 | cmpl r10,r1 | ||
1343 | bgequ noname.111 | ||
1344 | incl r2 | ||
1345 | noname.111: | ||
1346 | addl2 r2,r9 | ||
1347 | bicl2 #0,r9 | ||
1348 | cmpl r9,r2 | ||
1349 | bgequ noname.112 | ||
1350 | incl r8 | ||
1351 | noname.112: | ||
1352 | |||
1353 | movzwl 10(r6),r2 | ||
1354 | bicl3 #-65536,12(r7),r3 | ||
1355 | movzwl 14(r7),r0 | ||
1356 | bicl2 #-65536,r0 | ||
1357 | bicl3 #-65536,8(r6),-284(fp) | ||
1358 | bicl3 #-65536,r2,-288(fp) | ||
1359 | mull3 r0,-284(fp),-276(fp) | ||
1360 | mull2 r3,-284(fp) | ||
1361 | mull3 r3,-288(fp),-280(fp) | ||
1362 | mull2 r0,-288(fp) | ||
1363 | addl3 -276(fp),-280(fp),r0 | ||
1364 | bicl3 #0,r0,-276(fp) | ||
1365 | cmpl -276(fp),-280(fp) | ||
1366 | bgequ noname.113 | ||
1367 | addl2 #65536,-288(fp) | ||
1368 | noname.113: | ||
1369 | movzwl -274(fp),r0 | ||
1370 | bicl2 #-65536,r0 | ||
1371 | addl2 r0,-288(fp) | ||
1372 | bicl3 #-65536,-276(fp),r0 | ||
1373 | ashl #16,r0,-280(fp) | ||
1374 | addl3 -280(fp),-284(fp),r0 | ||
1375 | bicl3 #0,r0,-284(fp) | ||
1376 | cmpl -284(fp),-280(fp) | ||
1377 | bgequ noname.114 | ||
1378 | incl -288(fp) | ||
1379 | noname.114: | ||
1380 | movl -284(fp),r1 | ||
1381 | movl -288(fp),r2 | ||
1382 | addl2 r1,r10 | ||
1383 | bicl2 #0,r10 | ||
1384 | cmpl r10,r1 | ||
1385 | bgequ noname.115 | ||
1386 | incl r2 | ||
1387 | noname.115: | ||
1388 | addl2 r2,r9 | ||
1389 | bicl2 #0,r9 | ||
1390 | cmpl r9,r2 | ||
1391 | bgequ noname.116 | ||
1392 | incl r8 | ||
1393 | noname.116: | ||
1394 | |||
1395 | movzwl 14(r6),r2 | ||
1396 | bicl3 #-65536,8(r7),r3 | ||
1397 | movzwl 10(r7),r0 | ||
1398 | bicl2 #-65536,r0 | ||
1399 | bicl3 #-65536,12(r6),-300(fp) | ||
1400 | bicl3 #-65536,r2,-304(fp) | ||
1401 | mull3 r0,-300(fp),-292(fp) | ||
1402 | mull2 r3,-300(fp) | ||
1403 | mull3 r3,-304(fp),-296(fp) | ||
1404 | mull2 r0,-304(fp) | ||
1405 | addl3 -292(fp),-296(fp),r0 | ||
1406 | bicl3 #0,r0,-292(fp) | ||
1407 | cmpl -292(fp),-296(fp) | ||
1408 | bgequ noname.117 | ||
1409 | addl2 #65536,-304(fp) | ||
1410 | noname.117: | ||
1411 | movzwl -290(fp),r0 | ||
1412 | bicl2 #-65536,r0 | ||
1413 | addl2 r0,-304(fp) | ||
1414 | bicl3 #-65536,-292(fp),r0 | ||
1415 | ashl #16,r0,-296(fp) | ||
1416 | addl3 -296(fp),-300(fp),r0 | ||
1417 | bicl3 #0,r0,-300(fp) | ||
1418 | cmpl -300(fp),-296(fp) | ||
1419 | bgequ noname.118 | ||
1420 | incl -304(fp) | ||
1421 | noname.118: | ||
1422 | movl -300(fp),r1 | ||
1423 | movl -304(fp),r2 | ||
1424 | addl2 r1,r10 | ||
1425 | bicl2 #0,r10 | ||
1426 | cmpl r10,r1 | ||
1427 | bgequ noname.119 | ||
1428 | incl r2 | ||
1429 | noname.119: | ||
1430 | addl2 r2,r9 | ||
1431 | bicl2 #0,r9 | ||
1432 | cmpl r9,r2 | ||
1433 | bgequ noname.120 | ||
1434 | incl r8 | ||
1435 | noname.120: | ||
1436 | |||
1437 | movzwl 18(r6),r2 | ||
1438 | bicl3 #-65536,4(r7),r3 | ||
1439 | movzwl 6(r7),r0 | ||
1440 | bicl2 #-65536,r0 | ||
1441 | bicl3 #-65536,16(r6),-316(fp) | ||
1442 | bicl3 #-65536,r2,-320(fp) | ||
1443 | mull3 r0,-316(fp),-308(fp) | ||
1444 | mull2 r3,-316(fp) | ||
1445 | mull3 r3,-320(fp),-312(fp) | ||
1446 | mull2 r0,-320(fp) | ||
1447 | addl3 -308(fp),-312(fp),r0 | ||
1448 | bicl3 #0,r0,-308(fp) | ||
1449 | cmpl -308(fp),-312(fp) | ||
1450 | bgequ noname.121 | ||
1451 | addl2 #65536,-320(fp) | ||
1452 | noname.121: | ||
1453 | movzwl -306(fp),r0 | ||
1454 | bicl2 #-65536,r0 | ||
1455 | addl2 r0,-320(fp) | ||
1456 | bicl3 #-65536,-308(fp),r0 | ||
1457 | ashl #16,r0,-312(fp) | ||
1458 | addl3 -312(fp),-316(fp),r0 | ||
1459 | bicl3 #0,r0,-316(fp) | ||
1460 | cmpl -316(fp),-312(fp) | ||
1461 | bgequ noname.122 | ||
1462 | incl -320(fp) | ||
1463 | noname.122: | ||
1464 | movl -316(fp),r1 | ||
1465 | movl -320(fp),r2 | ||
1466 | addl2 r1,r10 | ||
1467 | bicl2 #0,r10 | ||
1468 | cmpl r10,r1 | ||
1469 | bgequ noname.123 | ||
1470 | incl r2 | ||
1471 | |||
1472 | noname.123: | ||
1473 | addl2 r2,r9 | ||
1474 | bicl2 #0,r9 | ||
1475 | cmpl r9,r2 | ||
1476 | bgequ noname.124 | ||
1477 | incl r8 | ||
1478 | noname.124: | ||
1479 | |||
1480 | movzwl 22(r6),r2 | ||
1481 | bicl3 #-65536,(r7),r3 | ||
1482 | movzwl 2(r7),r0 | ||
1483 | bicl2 #-65536,r0 | ||
1484 | bicl3 #-65536,20(r6),-332(fp) | ||
1485 | bicl3 #-65536,r2,-336(fp) | ||
1486 | mull3 r0,-332(fp),-324(fp) | ||
1487 | mull2 r3,-332(fp) | ||
1488 | mull3 r3,-336(fp),-328(fp) | ||
1489 | mull2 r0,-336(fp) | ||
1490 | addl3 -324(fp),-328(fp),r0 | ||
1491 | bicl3 #0,r0,-324(fp) | ||
1492 | cmpl -324(fp),-328(fp) | ||
1493 | bgequ noname.125 | ||
1494 | addl2 #65536,-336(fp) | ||
1495 | noname.125: | ||
1496 | movzwl -322(fp),r0 | ||
1497 | bicl2 #-65536,r0 | ||
1498 | addl2 r0,-336(fp) | ||
1499 | bicl3 #-65536,-324(fp),r0 | ||
1500 | ashl #16,r0,-328(fp) | ||
1501 | addl3 -328(fp),-332(fp),r0 | ||
1502 | bicl3 #0,r0,-332(fp) | ||
1503 | cmpl -332(fp),-328(fp) | ||
1504 | bgequ noname.126 | ||
1505 | incl -336(fp) | ||
1506 | noname.126: | ||
1507 | movl -332(fp),r1 | ||
1508 | movl -336(fp),r2 | ||
1509 | addl2 r1,r10 | ||
1510 | bicl2 #0,r10 | ||
1511 | cmpl r10,r1 | ||
1512 | bgequ noname.127 | ||
1513 | incl r2 | ||
1514 | noname.127: | ||
1515 | addl2 r2,r9 | ||
1516 | bicl2 #0,r9 | ||
1517 | cmpl r9,r2 | ||
1518 | bgequ noname.128 | ||
1519 | incl r8 | ||
1520 | noname.128: | ||
1521 | |||
1522 | movl r10,20(r11) | ||
1523 | |||
1524 | clrl r10 | ||
1525 | |||
1526 | movzwl 26(r6),r2 | ||
1527 | bicl3 #-65536,(r7),r3 | ||
1528 | movzwl 2(r7),r0 | ||
1529 | bicl2 #-65536,r0 | ||
1530 | bicl3 #-65536,24(r6),-348(fp) | ||
1531 | bicl3 #-65536,r2,-352(fp) | ||
1532 | mull3 r0,-348(fp),-340(fp) | ||
1533 | mull2 r3,-348(fp) | ||
1534 | mull3 r3,-352(fp),-344(fp) | ||
1535 | mull2 r0,-352(fp) | ||
1536 | addl3 -340(fp),-344(fp),r0 | ||
1537 | bicl3 #0,r0,-340(fp) | ||
1538 | cmpl -340(fp),-344(fp) | ||
1539 | bgequ noname.129 | ||
1540 | addl2 #65536,-352(fp) | ||
1541 | noname.129: | ||
1542 | movzwl -338(fp),r0 | ||
1543 | bicl2 #-65536,r0 | ||
1544 | addl2 r0,-352(fp) | ||
1545 | bicl3 #-65536,-340(fp),r0 | ||
1546 | ashl #16,r0,-344(fp) | ||
1547 | addl3 -344(fp),-348(fp),r0 | ||
1548 | bicl3 #0,r0,-348(fp) | ||
1549 | cmpl -348(fp),-344(fp) | ||
1550 | bgequ noname.130 | ||
1551 | incl -352(fp) | ||
1552 | noname.130: | ||
1553 | movl -348(fp),r1 | ||
1554 | movl -352(fp),r2 | ||
1555 | addl2 r1,r9 | ||
1556 | bicl2 #0,r9 | ||
1557 | cmpl r9,r1 | ||
1558 | bgequ noname.131 | ||
1559 | incl r2 | ||
1560 | noname.131: | ||
1561 | addl2 r2,r8 | ||
1562 | bicl2 #0,r8 | ||
1563 | cmpl r8,r2 | ||
1564 | bgequ noname.132 | ||
1565 | incl r10 | ||
1566 | noname.132: | ||
1567 | |||
1568 | movzwl 22(r6),r2 | ||
1569 | bicl3 #-65536,4(r7),r3 | ||
1570 | movzwl 6(r7),r0 | ||
1571 | bicl2 #-65536,r0 | ||
1572 | bicl3 #-65536,20(r6),-364(fp) | ||
1573 | bicl3 #-65536,r2,-368(fp) | ||
1574 | mull3 r0,-364(fp),-356(fp) | ||
1575 | mull2 r3,-364(fp) | ||
1576 | mull3 r3,-368(fp),-360(fp) | ||
1577 | mull2 r0,-368(fp) | ||
1578 | addl3 -356(fp),-360(fp),r0 | ||
1579 | bicl3 #0,r0,-356(fp) | ||
1580 | cmpl -356(fp),-360(fp) | ||
1581 | bgequ noname.133 | ||
1582 | addl2 #65536,-368(fp) | ||
1583 | noname.133: | ||
1584 | movzwl -354(fp),r0 | ||
1585 | bicl2 #-65536,r0 | ||
1586 | addl2 r0,-368(fp) | ||
1587 | bicl3 #-65536,-356(fp),r0 | ||
1588 | ashl #16,r0,-360(fp) | ||
1589 | addl3 -360(fp),-364(fp),r0 | ||
1590 | bicl3 #0,r0,-364(fp) | ||
1591 | cmpl -364(fp),-360(fp) | ||
1592 | bgequ noname.134 | ||
1593 | incl -368(fp) | ||
1594 | noname.134: | ||
1595 | movl -364(fp),r1 | ||
1596 | movl -368(fp),r2 | ||
1597 | addl2 r1,r9 | ||
1598 | bicl2 #0,r9 | ||
1599 | cmpl r9,r1 | ||
1600 | bgequ noname.135 | ||
1601 | incl r2 | ||
1602 | noname.135: | ||
1603 | addl2 r2,r8 | ||
1604 | bicl2 #0,r8 | ||
1605 | cmpl r8,r2 | ||
1606 | bgequ noname.136 | ||
1607 | incl r10 | ||
1608 | noname.136: | ||
1609 | |||
1610 | movzwl 18(r6),r2 | ||
1611 | bicl3 #-65536,8(r7),r3 | ||
1612 | movzwl 10(r7),r0 | ||
1613 | bicl2 #-65536,r0 | ||
1614 | bicl3 #-65536,16(r6),-380(fp) | ||
1615 | bicl3 #-65536,r2,-384(fp) | ||
1616 | mull3 r0,-380(fp),-372(fp) | ||
1617 | mull2 r3,-380(fp) | ||
1618 | mull3 r3,-384(fp),-376(fp) | ||
1619 | mull2 r0,-384(fp) | ||
1620 | addl3 -372(fp),-376(fp),r0 | ||
1621 | bicl3 #0,r0,-372(fp) | ||
1622 | cmpl -372(fp),-376(fp) | ||
1623 | bgequ noname.137 | ||
1624 | addl2 #65536,-384(fp) | ||
1625 | noname.137: | ||
1626 | movzwl -370(fp),r0 | ||
1627 | bicl2 #-65536,r0 | ||
1628 | addl2 r0,-384(fp) | ||
1629 | bicl3 #-65536,-372(fp),r0 | ||
1630 | ashl #16,r0,-376(fp) | ||
1631 | addl3 -376(fp),-380(fp),r0 | ||
1632 | bicl3 #0,r0,-380(fp) | ||
1633 | cmpl -380(fp),-376(fp) | ||
1634 | bgequ noname.138 | ||
1635 | incl -384(fp) | ||
1636 | noname.138: | ||
1637 | movl -380(fp),r1 | ||
1638 | movl -384(fp),r2 | ||
1639 | addl2 r1,r9 | ||
1640 | bicl2 #0,r9 | ||
1641 | cmpl r9,r1 | ||
1642 | bgequ noname.139 | ||
1643 | incl r2 | ||
1644 | noname.139: | ||
1645 | addl2 r2,r8 | ||
1646 | bicl2 #0,r8 | ||
1647 | cmpl r8,r2 | ||
1648 | bgequ noname.140 | ||
1649 | incl r10 | ||
1650 | noname.140: | ||
1651 | |||
1652 | movzwl 14(r6),r2 | ||
1653 | bicl3 #-65536,12(r7),r3 | ||
1654 | movzwl 14(r7),r0 | ||
1655 | bicl2 #-65536,r0 | ||
1656 | bicl3 #-65536,12(r6),-396(fp) | ||
1657 | bicl3 #-65536,r2,-400(fp) | ||
1658 | mull3 r0,-396(fp),-388(fp) | ||
1659 | mull2 r3,-396(fp) | ||
1660 | mull3 r3,-400(fp),-392(fp) | ||
1661 | mull2 r0,-400(fp) | ||
1662 | addl3 -388(fp),-392(fp),r0 | ||
1663 | bicl3 #0,r0,-388(fp) | ||
1664 | cmpl -388(fp),-392(fp) | ||
1665 | bgequ noname.141 | ||
1666 | addl2 #65536,-400(fp) | ||
1667 | noname.141: | ||
1668 | movzwl -386(fp),r0 | ||
1669 | bicl2 #-65536,r0 | ||
1670 | addl2 r0,-400(fp) | ||
1671 | bicl3 #-65536,-388(fp),r0 | ||
1672 | ashl #16,r0,-392(fp) | ||
1673 | addl3 -392(fp),-396(fp),r0 | ||
1674 | bicl3 #0,r0,-396(fp) | ||
1675 | cmpl -396(fp),-392(fp) | ||
1676 | bgequ noname.142 | ||
1677 | incl -400(fp) | ||
1678 | noname.142: | ||
1679 | movl -396(fp),r1 | ||
1680 | movl -400(fp),r2 | ||
1681 | addl2 r1,r9 | ||
1682 | bicl2 #0,r9 | ||
1683 | cmpl r9,r1 | ||
1684 | bgequ noname.143 | ||
1685 | incl r2 | ||
1686 | noname.143: | ||
1687 | addl2 r2,r8 | ||
1688 | bicl2 #0,r8 | ||
1689 | cmpl r8,r2 | ||
1690 | bgequ noname.144 | ||
1691 | incl r10 | ||
1692 | noname.144: | ||
1693 | |||
1694 | movzwl 10(r6),r2 | ||
1695 | bicl3 #-65536,16(r7),r3 | ||
1696 | movzwl 18(r7),r0 | ||
1697 | bicl2 #-65536,r0 | ||
1698 | bicl3 #-65536,8(r6),-412(fp) | ||
1699 | bicl3 #-65536,r2,-416(fp) | ||
1700 | mull3 r0,-412(fp),-404(fp) | ||
1701 | mull2 r3,-412(fp) | ||
1702 | mull3 r3,-416(fp),-408(fp) | ||
1703 | mull2 r0,-416(fp) | ||
1704 | addl3 -404(fp),-408(fp),r0 | ||
1705 | bicl3 #0,r0,-404(fp) | ||
1706 | cmpl -404(fp),-408(fp) | ||
1707 | bgequ noname.145 | ||
1708 | addl2 #65536,-416(fp) | ||
1709 | noname.145: | ||
1710 | movzwl -402(fp),r0 | ||
1711 | bicl2 #-65536,r0 | ||
1712 | addl2 r0,-416(fp) | ||
1713 | bicl3 #-65536,-404(fp),r0 | ||
1714 | ashl #16,r0,-408(fp) | ||
1715 | addl3 -408(fp),-412(fp),r0 | ||
1716 | bicl3 #0,r0,-412(fp) | ||
1717 | cmpl -412(fp),-408(fp) | ||
1718 | bgequ noname.146 | ||
1719 | incl -416(fp) | ||
1720 | noname.146: | ||
1721 | movl -412(fp),r1 | ||
1722 | movl -416(fp),r2 | ||
1723 | addl2 r1,r9 | ||
1724 | bicl2 #0,r9 | ||
1725 | cmpl r9,r1 | ||
1726 | bgequ noname.147 | ||
1727 | incl r2 | ||
1728 | noname.147: | ||
1729 | addl2 r2,r8 | ||
1730 | bicl2 #0,r8 | ||
1731 | cmpl r8,r2 | ||
1732 | bgequ noname.148 | ||
1733 | incl r10 | ||
1734 | noname.148: | ||
1735 | |||
1736 | movzwl 6(r6),r2 | ||
1737 | bicl3 #-65536,20(r7),r3 | ||
1738 | movzwl 22(r7),r0 | ||
1739 | bicl2 #-65536,r0 | ||
1740 | bicl3 #-65536,4(r6),-428(fp) | ||
1741 | bicl3 #-65536,r2,-432(fp) | ||
1742 | mull3 r0,-428(fp),-420(fp) | ||
1743 | mull2 r3,-428(fp) | ||
1744 | mull3 r3,-432(fp),-424(fp) | ||
1745 | mull2 r0,-432(fp) | ||
1746 | addl3 -420(fp),-424(fp),r0 | ||
1747 | bicl3 #0,r0,-420(fp) | ||
1748 | cmpl -420(fp),-424(fp) | ||
1749 | bgequ noname.149 | ||
1750 | addl2 #65536,-432(fp) | ||
1751 | noname.149: | ||
1752 | movzwl -418(fp),r0 | ||
1753 | bicl2 #-65536,r0 | ||
1754 | addl2 r0,-432(fp) | ||
1755 | bicl3 #-65536,-420(fp),r0 | ||
1756 | ashl #16,r0,-424(fp) | ||
1757 | addl3 -424(fp),-428(fp),r0 | ||
1758 | bicl3 #0,r0,-428(fp) | ||
1759 | cmpl -428(fp),-424(fp) | ||
1760 | bgequ noname.150 | ||
1761 | incl -432(fp) | ||
1762 | noname.150: | ||
1763 | movl -428(fp),r1 | ||
1764 | movl -432(fp),r2 | ||
1765 | addl2 r1,r9 | ||
1766 | bicl2 #0,r9 | ||
1767 | cmpl r9,r1 | ||
1768 | bgequ noname.151 | ||
1769 | incl r2 | ||
1770 | noname.151: | ||
1771 | addl2 r2,r8 | ||
1772 | bicl2 #0,r8 | ||
1773 | cmpl r8,r2 | ||
1774 | bgequ noname.152 | ||
1775 | incl r10 | ||
1776 | noname.152: | ||
1777 | |||
1778 | movzwl 2(r6),r2 | ||
1779 | bicl3 #-65536,24(r7),r3 | ||
1780 | movzwl 26(r7),r0 | ||
1781 | bicl2 #-65536,r0 | ||
1782 | bicl3 #-65536,(r6),-444(fp) | ||
1783 | bicl3 #-65536,r2,-448(fp) | ||
1784 | mull3 r0,-444(fp),-436(fp) | ||
1785 | mull2 r3,-444(fp) | ||
1786 | mull3 r3,-448(fp),-440(fp) | ||
1787 | mull2 r0,-448(fp) | ||
1788 | addl3 -436(fp),-440(fp),r0 | ||
1789 | bicl3 #0,r0,-436(fp) | ||
1790 | cmpl -436(fp),-440(fp) | ||
1791 | bgequ noname.153 | ||
1792 | addl2 #65536,-448(fp) | ||
1793 | noname.153: | ||
1794 | movzwl -434(fp),r0 | ||
1795 | bicl2 #-65536,r0 | ||
1796 | addl2 r0,-448(fp) | ||
1797 | bicl3 #-65536,-436(fp),r0 | ||
1798 | ashl #16,r0,-440(fp) | ||
1799 | addl3 -440(fp),-444(fp),r0 | ||
1800 | bicl3 #0,r0,-444(fp) | ||
1801 | cmpl -444(fp),-440(fp) | ||
1802 | bgequ noname.154 | ||
1803 | incl -448(fp) | ||
1804 | noname.154: | ||
1805 | movl -444(fp),r1 | ||
1806 | movl -448(fp),r2 | ||
1807 | addl2 r1,r9 | ||
1808 | bicl2 #0,r9 | ||
1809 | cmpl r9,r1 | ||
1810 | bgequ noname.155 | ||
1811 | incl r2 | ||
1812 | noname.155: | ||
1813 | addl2 r2,r8 | ||
1814 | bicl2 #0,r8 | ||
1815 | cmpl r8,r2 | ||
1816 | bgequ noname.156 | ||
1817 | incl r10 | ||
1818 | noname.156: | ||
1819 | |||
1820 | movl r9,24(r11) | ||
1821 | |||
1822 | clrl r9 | ||
1823 | |||
1824 | movzwl 2(r6),r2 | ||
1825 | bicl3 #-65536,28(r7),r3 | ||
1826 | movzwl 30(r7),r0 | ||
1827 | bicl2 #-65536,r0 | ||
1828 | bicl3 #-65536,(r6),-460(fp) | ||
1829 | bicl3 #-65536,r2,-464(fp) | ||
1830 | mull3 r0,-460(fp),-452(fp) | ||
1831 | mull2 r3,-460(fp) | ||
1832 | mull3 r3,-464(fp),-456(fp) | ||
1833 | mull2 r0,-464(fp) | ||
1834 | addl3 -452(fp),-456(fp),r0 | ||
1835 | bicl3 #0,r0,-452(fp) | ||
1836 | cmpl -452(fp),-456(fp) | ||
1837 | bgequ noname.157 | ||
1838 | addl2 #65536,-464(fp) | ||
1839 | noname.157: | ||
1840 | movzwl -450(fp),r0 | ||
1841 | bicl2 #-65536,r0 | ||
1842 | addl2 r0,-464(fp) | ||
1843 | bicl3 #-65536,-452(fp),r0 | ||
1844 | ashl #16,r0,-456(fp) | ||
1845 | addl3 -456(fp),-460(fp),r0 | ||
1846 | bicl3 #0,r0,-460(fp) | ||
1847 | cmpl -460(fp),-456(fp) | ||
1848 | bgequ noname.158 | ||
1849 | incl -464(fp) | ||
1850 | noname.158: | ||
1851 | movl -460(fp),r1 | ||
1852 | movl -464(fp),r2 | ||
1853 | addl2 r1,r8 | ||
1854 | bicl2 #0,r8 | ||
1855 | cmpl r8,r1 | ||
1856 | bgequ noname.159 | ||
1857 | incl r2 | ||
1858 | noname.159: | ||
1859 | addl2 r2,r10 | ||
1860 | bicl2 #0,r10 | ||
1861 | cmpl r10,r2 | ||
1862 | bgequ noname.160 | ||
1863 | incl r9 | ||
1864 | noname.160: | ||
1865 | |||
1866 | movzwl 6(r6),r2 | ||
1867 | bicl3 #-65536,24(r7),r3 | ||
1868 | movzwl 26(r7),r0 | ||
1869 | bicl2 #-65536,r0 | ||
1870 | bicl3 #-65536,4(r6),-476(fp) | ||
1871 | bicl3 #-65536,r2,-480(fp) | ||
1872 | mull3 r0,-476(fp),-468(fp) | ||
1873 | mull2 r3,-476(fp) | ||
1874 | mull3 r3,-480(fp),-472(fp) | ||
1875 | mull2 r0,-480(fp) | ||
1876 | addl3 -468(fp),-472(fp),r0 | ||
1877 | bicl3 #0,r0,-468(fp) | ||
1878 | cmpl -468(fp),-472(fp) | ||
1879 | bgequ noname.161 | ||
1880 | addl2 #65536,-480(fp) | ||
1881 | noname.161: | ||
1882 | movzwl -466(fp),r0 | ||
1883 | bicl2 #-65536,r0 | ||
1884 | addl2 r0,-480(fp) | ||
1885 | bicl3 #-65536,-468(fp),r0 | ||
1886 | ashl #16,r0,-472(fp) | ||
1887 | addl3 -472(fp),-476(fp),r0 | ||
1888 | bicl3 #0,r0,-476(fp) | ||
1889 | cmpl -476(fp),-472(fp) | ||
1890 | bgequ noname.162 | ||
1891 | incl -480(fp) | ||
1892 | noname.162: | ||
1893 | movl -476(fp),r1 | ||
1894 | movl -480(fp),r2 | ||
1895 | addl2 r1,r8 | ||
1896 | bicl2 #0,r8 | ||
1897 | cmpl r8,r1 | ||
1898 | bgequ noname.163 | ||
1899 | incl r2 | ||
1900 | noname.163: | ||
1901 | addl2 r2,r10 | ||
1902 | bicl2 #0,r10 | ||
1903 | cmpl r10,r2 | ||
1904 | bgequ noname.164 | ||
1905 | incl r9 | ||
1906 | noname.164: | ||
1907 | |||
1908 | movzwl 10(r6),r2 | ||
1909 | bicl3 #-65536,20(r7),r3 | ||
1910 | movzwl 22(r7),r0 | ||
1911 | bicl2 #-65536,r0 | ||
1912 | bicl3 #-65536,8(r6),-492(fp) | ||
1913 | bicl3 #-65536,r2,-496(fp) | ||
1914 | mull3 r0,-492(fp),-484(fp) | ||
1915 | mull2 r3,-492(fp) | ||
1916 | mull3 r3,-496(fp),-488(fp) | ||
1917 | mull2 r0,-496(fp) | ||
1918 | addl3 -484(fp),-488(fp),r0 | ||
1919 | bicl3 #0,r0,-484(fp) | ||
1920 | cmpl -484(fp),-488(fp) | ||
1921 | bgequ noname.165 | ||
1922 | addl2 #65536,-496(fp) | ||
1923 | noname.165: | ||
1924 | movzwl -482(fp),r0 | ||
1925 | bicl2 #-65536,r0 | ||
1926 | addl2 r0,-496(fp) | ||
1927 | bicl3 #-65536,-484(fp),r0 | ||
1928 | ashl #16,r0,-488(fp) | ||
1929 | addl3 -488(fp),-492(fp),r0 | ||
1930 | bicl3 #0,r0,-492(fp) | ||
1931 | cmpl -492(fp),-488(fp) | ||
1932 | bgequ noname.166 | ||
1933 | incl -496(fp) | ||
1934 | noname.166: | ||
1935 | movl -492(fp),r1 | ||
1936 | movl -496(fp),r2 | ||
1937 | addl2 r1,r8 | ||
1938 | bicl2 #0,r8 | ||
1939 | cmpl r8,r1 | ||
1940 | bgequ noname.167 | ||
1941 | incl r2 | ||
1942 | noname.167: | ||
1943 | addl2 r2,r10 | ||
1944 | bicl2 #0,r10 | ||
1945 | cmpl r10,r2 | ||
1946 | bgequ noname.168 | ||
1947 | incl r9 | ||
1948 | noname.168: | ||
1949 | |||
1950 | movzwl 14(r6),r2 | ||
1951 | bicl3 #-65536,16(r7),r3 | ||
1952 | movzwl 18(r7),r0 | ||
1953 | bicl2 #-65536,r0 | ||
1954 | bicl3 #-65536,12(r6),-508(fp) | ||
1955 | bicl3 #-65536,r2,-512(fp) | ||
1956 | mull3 r0,-508(fp),-500(fp) | ||
1957 | mull2 r3,-508(fp) | ||
1958 | mull3 r3,-512(fp),-504(fp) | ||
1959 | mull2 r0,-512(fp) | ||
1960 | addl3 -500(fp),-504(fp),r0 | ||
1961 | bicl3 #0,r0,-500(fp) | ||
1962 | cmpl -500(fp),-504(fp) | ||
1963 | bgequ noname.169 | ||
1964 | addl2 #65536,-512(fp) | ||
1965 | noname.169: | ||
1966 | movzwl -498(fp),r0 | ||
1967 | bicl2 #-65536,r0 | ||
1968 | addl2 r0,-512(fp) | ||
1969 | bicl3 #-65536,-500(fp),r0 | ||
1970 | ashl #16,r0,-504(fp) | ||
1971 | addl3 -504(fp),-508(fp),r0 | ||
1972 | bicl3 #0,r0,-508(fp) | ||
1973 | cmpl -508(fp),-504(fp) | ||
1974 | bgequ noname.170 | ||
1975 | incl -512(fp) | ||
1976 | noname.170: | ||
1977 | movl -508(fp),r1 | ||
1978 | movl -512(fp),r2 | ||
1979 | addl2 r1,r8 | ||
1980 | bicl2 #0,r8 | ||
1981 | cmpl r8,r1 | ||
1982 | bgequ noname.171 | ||
1983 | incl r2 | ||
1984 | noname.171: | ||
1985 | addl2 r2,r10 | ||
1986 | bicl2 #0,r10 | ||
1987 | cmpl r10,r2 | ||
1988 | bgequ noname.172 | ||
1989 | incl r9 | ||
1990 | noname.172: | ||
1991 | |||
1992 | movzwl 18(r6),r2 | ||
1993 | bicl3 #-65536,12(r7),r3 | ||
1994 | movzwl 14(r7),r0 | ||
1995 | bicl2 #-65536,r0 | ||
1996 | bicl3 #-65536,16(r6),-524(fp) | ||
1997 | bicl3 #-65536,r2,-528(fp) | ||
1998 | mull3 r0,-524(fp),-516(fp) | ||
1999 | mull2 r3,-524(fp) | ||
2000 | mull3 r3,-528(fp),-520(fp) | ||
2001 | mull2 r0,-528(fp) | ||
2002 | addl3 -516(fp),-520(fp),r0 | ||
2003 | bicl3 #0,r0,-516(fp) | ||
2004 | cmpl -516(fp),-520(fp) | ||
2005 | bgequ noname.173 | ||
2006 | addl2 #65536,-528(fp) | ||
2007 | noname.173: | ||
2008 | movzwl -514(fp),r0 | ||
2009 | bicl2 #-65536,r0 | ||
2010 | addl2 r0,-528(fp) | ||
2011 | bicl3 #-65536,-516(fp),r0 | ||
2012 | ashl #16,r0,-520(fp) | ||
2013 | addl3 -520(fp),-524(fp),r0 | ||
2014 | bicl3 #0,r0,-524(fp) | ||
2015 | cmpl -524(fp),-520(fp) | ||
2016 | bgequ noname.174 | ||
2017 | incl -528(fp) | ||
2018 | noname.174: | ||
2019 | movl -524(fp),r1 | ||
2020 | movl -528(fp),r2 | ||
2021 | addl2 r1,r8 | ||
2022 | bicl2 #0,r8 | ||
2023 | cmpl r8,r1 | ||
2024 | bgequ noname.175 | ||
2025 | incl r2 | ||
2026 | noname.175: | ||
2027 | addl2 r2,r10 | ||
2028 | bicl2 #0,r10 | ||
2029 | cmpl r10,r2 | ||
2030 | bgequ noname.176 | ||
2031 | incl r9 | ||
2032 | noname.176: | ||
2033 | |||
2034 | movzwl 22(r6),r2 | ||
2035 | bicl3 #-65536,8(r7),r3 | ||
2036 | movzwl 10(r7),r0 | ||
2037 | bicl2 #-65536,r0 | ||
2038 | bicl3 #-65536,20(r6),-540(fp) | ||
2039 | bicl3 #-65536,r2,-544(fp) | ||
2040 | mull3 r0,-540(fp),-532(fp) | ||
2041 | mull2 r3,-540(fp) | ||
2042 | mull3 r3,-544(fp),-536(fp) | ||
2043 | mull2 r0,-544(fp) | ||
2044 | addl3 -532(fp),-536(fp),r0 | ||
2045 | bicl3 #0,r0,-532(fp) | ||
2046 | cmpl -532(fp),-536(fp) | ||
2047 | bgequ noname.177 | ||
2048 | addl2 #65536,-544(fp) | ||
2049 | noname.177: | ||
2050 | movzwl -530(fp),r0 | ||
2051 | bicl2 #-65536,r0 | ||
2052 | addl2 r0,-544(fp) | ||
2053 | bicl3 #-65536,-532(fp),r0 | ||
2054 | ashl #16,r0,-536(fp) | ||
2055 | addl3 -536(fp),-540(fp),r0 | ||
2056 | bicl3 #0,r0,-540(fp) | ||
2057 | cmpl -540(fp),-536(fp) | ||
2058 | bgequ noname.178 | ||
2059 | incl -544(fp) | ||
2060 | noname.178: | ||
2061 | movl -540(fp),r1 | ||
2062 | movl -544(fp),r2 | ||
2063 | addl2 r1,r8 | ||
2064 | bicl2 #0,r8 | ||
2065 | cmpl r8,r1 | ||
2066 | bgequ noname.179 | ||
2067 | incl r2 | ||
2068 | noname.179: | ||
2069 | addl2 r2,r10 | ||
2070 | bicl2 #0,r10 | ||
2071 | cmpl r10,r2 | ||
2072 | bgequ noname.180 | ||
2073 | incl r9 | ||
2074 | noname.180: | ||
2075 | |||
2076 | movzwl 26(r6),r2 | ||
2077 | bicl3 #-65536,4(r7),r3 | ||
2078 | movzwl 6(r7),r0 | ||
2079 | bicl2 #-65536,r0 | ||
2080 | bicl3 #-65536,24(r6),-556(fp) | ||
2081 | bicl3 #-65536,r2,-560(fp) | ||
2082 | mull3 r0,-556(fp),-548(fp) | ||
2083 | mull2 r3,-556(fp) | ||
2084 | mull3 r3,-560(fp),-552(fp) | ||
2085 | mull2 r0,-560(fp) | ||
2086 | addl3 -548(fp),-552(fp),r0 | ||
2087 | bicl3 #0,r0,-548(fp) | ||
2088 | cmpl -548(fp),-552(fp) | ||
2089 | bgequ noname.181 | ||
2090 | addl2 #65536,-560(fp) | ||
2091 | noname.181: | ||
2092 | movzwl -546(fp),r0 | ||
2093 | bicl2 #-65536,r0 | ||
2094 | addl2 r0,-560(fp) | ||
2095 | bicl3 #-65536,-548(fp),r0 | ||
2096 | ashl #16,r0,-552(fp) | ||
2097 | addl3 -552(fp),-556(fp),r0 | ||
2098 | bicl3 #0,r0,-556(fp) | ||
2099 | cmpl -556(fp),-552(fp) | ||
2100 | bgequ noname.182 | ||
2101 | incl -560(fp) | ||
2102 | noname.182: | ||
2103 | movl -556(fp),r1 | ||
2104 | movl -560(fp),r2 | ||
2105 | addl2 r1,r8 | ||
2106 | bicl2 #0,r8 | ||
2107 | cmpl r8,r1 | ||
2108 | bgequ noname.183 | ||
2109 | incl r2 | ||
2110 | noname.183: | ||
2111 | addl2 r2,r10 | ||
2112 | bicl2 #0,r10 | ||
2113 | cmpl r10,r2 | ||
2114 | bgequ noname.184 | ||
2115 | incl r9 | ||
2116 | noname.184: | ||
2117 | |||
2118 | movzwl 30(r6),r2 | ||
2119 | bicl3 #-65536,(r7),r3 | ||
2120 | movzwl 2(r7),r0 | ||
2121 | bicl2 #-65536,r0 | ||
2122 | bicl3 #-65536,28(r6),-572(fp) | ||
2123 | bicl3 #-65536,r2,-576(fp) | ||
2124 | mull3 r0,-572(fp),-564(fp) | ||
2125 | mull2 r3,-572(fp) | ||
2126 | mull3 r3,-576(fp),-568(fp) | ||
2127 | mull2 r0,-576(fp) | ||
2128 | addl3 -564(fp),-568(fp),r0 | ||
2129 | bicl3 #0,r0,-564(fp) | ||
2130 | cmpl -564(fp),-568(fp) | ||
2131 | bgequ noname.185 | ||
2132 | addl2 #65536,-576(fp) | ||
2133 | noname.185: | ||
2134 | movzwl -562(fp),r0 | ||
2135 | bicl2 #-65536,r0 | ||
2136 | addl2 r0,-576(fp) | ||
2137 | bicl3 #-65536,-564(fp),r0 | ||
2138 | ashl #16,r0,-568(fp) | ||
2139 | addl3 -568(fp),-572(fp),r0 | ||
2140 | bicl3 #0,r0,-572(fp) | ||
2141 | cmpl -572(fp),-568(fp) | ||
2142 | bgequ noname.186 | ||
2143 | incl -576(fp) | ||
2144 | noname.186: | ||
2145 | movl -572(fp),r1 | ||
2146 | movl -576(fp),r2 | ||
2147 | addl2 r1,r8 | ||
2148 | bicl2 #0,r8 | ||
2149 | cmpl r8,r1 | ||
2150 | bgequ noname.187 | ||
2151 | incl r2 | ||
2152 | noname.187: | ||
2153 | addl2 r2,r10 | ||
2154 | bicl2 #0,r10 | ||
2155 | cmpl r10,r2 | ||
2156 | bgequ noname.188 | ||
2157 | incl r9 | ||
2158 | noname.188: | ||
2159 | |||
2160 | movl r8,28(r11) | ||
2161 | |||
2162 | clrl r8 | ||
2163 | |||
2164 | movzwl 30(r6),r2 | ||
2165 | bicl3 #-65536,4(r7),r3 | ||
2166 | movzwl 6(r7),r0 | ||
2167 | bicl2 #-65536,r0 | ||
2168 | bicl3 #-65536,28(r6),-588(fp) | ||
2169 | bicl3 #-65536,r2,-592(fp) | ||
2170 | mull3 r0,-588(fp),-580(fp) | ||
2171 | mull2 r3,-588(fp) | ||
2172 | mull3 r3,-592(fp),-584(fp) | ||
2173 | mull2 r0,-592(fp) | ||
2174 | addl3 -580(fp),-584(fp),r0 | ||
2175 | bicl3 #0,r0,-580(fp) | ||
2176 | cmpl -580(fp),-584(fp) | ||
2177 | bgequ noname.189 | ||
2178 | addl2 #65536,-592(fp) | ||
2179 | noname.189: | ||
2180 | movzwl -578(fp),r0 | ||
2181 | bicl2 #-65536,r0 | ||
2182 | addl2 r0,-592(fp) | ||
2183 | bicl3 #-65536,-580(fp),r0 | ||
2184 | ashl #16,r0,-584(fp) | ||
2185 | addl3 -584(fp),-588(fp),r0 | ||
2186 | bicl3 #0,r0,-588(fp) | ||
2187 | cmpl -588(fp),-584(fp) | ||
2188 | bgequ noname.190 | ||
2189 | incl -592(fp) | ||
2190 | noname.190: | ||
2191 | movl -588(fp),r1 | ||
2192 | movl -592(fp),r2 | ||
2193 | addl2 r1,r10 | ||
2194 | bicl2 #0,r10 | ||
2195 | cmpl r10,r1 | ||
2196 | bgequ noname.191 | ||
2197 | incl r2 | ||
2198 | noname.191: | ||
2199 | addl2 r2,r9 | ||
2200 | bicl2 #0,r9 | ||
2201 | cmpl r9,r2 | ||
2202 | bgequ noname.192 | ||
2203 | incl r8 | ||
2204 | noname.192: | ||
2205 | |||
2206 | movzwl 26(r6),r2 | ||
2207 | bicl3 #-65536,8(r7),r3 | ||
2208 | movzwl 10(r7),r0 | ||
2209 | bicl2 #-65536,r0 | ||
2210 | bicl3 #-65536,24(r6),-604(fp) | ||
2211 | bicl3 #-65536,r2,-608(fp) | ||
2212 | mull3 r0,-604(fp),-596(fp) | ||
2213 | mull2 r3,-604(fp) | ||
2214 | mull3 r3,-608(fp),-600(fp) | ||
2215 | mull2 r0,-608(fp) | ||
2216 | addl3 -596(fp),-600(fp),r0 | ||
2217 | bicl3 #0,r0,-596(fp) | ||
2218 | cmpl -596(fp),-600(fp) | ||
2219 | bgequ noname.193 | ||
2220 | addl2 #65536,-608(fp) | ||
2221 | noname.193: | ||
2222 | movzwl -594(fp),r0 | ||
2223 | bicl2 #-65536,r0 | ||
2224 | addl2 r0,-608(fp) | ||
2225 | bicl3 #-65536,-596(fp),r0 | ||
2226 | ashl #16,r0,-600(fp) | ||
2227 | addl3 -600(fp),-604(fp),r0 | ||
2228 | bicl3 #0,r0,-604(fp) | ||
2229 | cmpl -604(fp),-600(fp) | ||
2230 | bgequ noname.194 | ||
2231 | incl -608(fp) | ||
2232 | noname.194: | ||
2233 | movl -604(fp),r1 | ||
2234 | movl -608(fp),r2 | ||
2235 | addl2 r1,r10 | ||
2236 | bicl2 #0,r10 | ||
2237 | cmpl r10,r1 | ||
2238 | bgequ noname.195 | ||
2239 | incl r2 | ||
2240 | noname.195: | ||
2241 | addl2 r2,r9 | ||
2242 | bicl2 #0,r9 | ||
2243 | cmpl r9,r2 | ||
2244 | bgequ noname.196 | ||
2245 | incl r8 | ||
2246 | noname.196: | ||
2247 | |||
2248 | movzwl 22(r6),r2 | ||
2249 | bicl3 #-65536,12(r7),r3 | ||
2250 | movzwl 14(r7),r0 | ||
2251 | bicl2 #-65536,r0 | ||
2252 | bicl3 #-65536,20(r6),-620(fp) | ||
2253 | bicl3 #-65536,r2,-624(fp) | ||
2254 | mull3 r0,-620(fp),-612(fp) | ||
2255 | mull2 r3,-620(fp) | ||
2256 | mull3 r3,-624(fp),-616(fp) | ||
2257 | mull2 r0,-624(fp) | ||
2258 | addl3 -612(fp),-616(fp),r0 | ||
2259 | bicl3 #0,r0,-612(fp) | ||
2260 | cmpl -612(fp),-616(fp) | ||
2261 | bgequ noname.197 | ||
2262 | addl2 #65536,-624(fp) | ||
2263 | noname.197: | ||
2264 | movzwl -610(fp),r0 | ||
2265 | bicl2 #-65536,r0 | ||
2266 | addl2 r0,-624(fp) | ||
2267 | bicl3 #-65536,-612(fp),r0 | ||
2268 | ashl #16,r0,-616(fp) | ||
2269 | addl3 -616(fp),-620(fp),r0 | ||
2270 | bicl3 #0,r0,-620(fp) | ||
2271 | cmpl -620(fp),-616(fp) | ||
2272 | bgequ noname.198 | ||
2273 | incl -624(fp) | ||
2274 | noname.198: | ||
2275 | movl -620(fp),r1 | ||
2276 | movl -624(fp),r2 | ||
2277 | addl2 r1,r10 | ||
2278 | bicl2 #0,r10 | ||
2279 | cmpl r10,r1 | ||
2280 | bgequ noname.199 | ||
2281 | incl r2 | ||
2282 | noname.199: | ||
2283 | addl2 r2,r9 | ||
2284 | bicl2 #0,r9 | ||
2285 | cmpl r9,r2 | ||
2286 | bgequ noname.200 | ||
2287 | incl r8 | ||
2288 | noname.200: | ||
2289 | |||
2290 | movzwl 18(r6),r2 | ||
2291 | bicl3 #-65536,16(r7),r3 | ||
2292 | movzwl 18(r7),r0 | ||
2293 | bicl2 #-65536,r0 | ||
2294 | bicl3 #-65536,16(r6),-636(fp) | ||
2295 | bicl3 #-65536,r2,-640(fp) | ||
2296 | mull3 r0,-636(fp),-628(fp) | ||
2297 | mull2 r3,-636(fp) | ||
2298 | mull3 r3,-640(fp),-632(fp) | ||
2299 | mull2 r0,-640(fp) | ||
2300 | addl3 -628(fp),-632(fp),r0 | ||
2301 | bicl3 #0,r0,-628(fp) | ||
2302 | cmpl -628(fp),-632(fp) | ||
2303 | bgequ noname.201 | ||
2304 | addl2 #65536,-640(fp) | ||
2305 | noname.201: | ||
2306 | movzwl -626(fp),r0 | ||
2307 | bicl2 #-65536,r0 | ||
2308 | addl2 r0,-640(fp) | ||
2309 | bicl3 #-65536,-628(fp),r0 | ||
2310 | ashl #16,r0,-632(fp) | ||
2311 | addl3 -632(fp),-636(fp),r0 | ||
2312 | bicl3 #0,r0,-636(fp) | ||
2313 | cmpl -636(fp),-632(fp) | ||
2314 | bgequ noname.202 | ||
2315 | incl -640(fp) | ||
2316 | noname.202: | ||
2317 | movl -636(fp),r1 | ||
2318 | movl -640(fp),r2 | ||
2319 | addl2 r1,r10 | ||
2320 | bicl2 #0,r10 | ||
2321 | cmpl r10,r1 | ||
2322 | bgequ noname.203 | ||
2323 | incl r2 | ||
2324 | noname.203: | ||
2325 | addl2 r2,r9 | ||
2326 | bicl2 #0,r9 | ||
2327 | cmpl r9,r2 | ||
2328 | bgequ noname.204 | ||
2329 | incl r8 | ||
2330 | noname.204: | ||
2331 | |||
2332 | movzwl 14(r6),r2 | ||
2333 | bicl3 #-65536,20(r7),r3 | ||
2334 | movzwl 22(r7),r0 | ||
2335 | bicl2 #-65536,r0 | ||
2336 | bicl3 #-65536,12(r6),-652(fp) | ||
2337 | bicl3 #-65536,r2,-656(fp) | ||
2338 | mull3 r0,-652(fp),-644(fp) | ||
2339 | mull2 r3,-652(fp) | ||
2340 | mull3 r3,-656(fp),-648(fp) | ||
2341 | mull2 r0,-656(fp) | ||
2342 | addl3 -644(fp),-648(fp),r0 | ||
2343 | bicl3 #0,r0,-644(fp) | ||
2344 | cmpl -644(fp),-648(fp) | ||
2345 | bgequ noname.205 | ||
2346 | addl2 #65536,-656(fp) | ||
2347 | noname.205: | ||
2348 | movzwl -642(fp),r0 | ||
2349 | bicl2 #-65536,r0 | ||
2350 | addl2 r0,-656(fp) | ||
2351 | bicl3 #-65536,-644(fp),r0 | ||
2352 | ashl #16,r0,-648(fp) | ||
2353 | addl3 -648(fp),-652(fp),r0 | ||
2354 | bicl3 #0,r0,-652(fp) | ||
2355 | cmpl -652(fp),-648(fp) | ||
2356 | bgequ noname.206 | ||
2357 | incl -656(fp) | ||
2358 | noname.206: | ||
2359 | movl -652(fp),r1 | ||
2360 | movl -656(fp),r2 | ||
2361 | addl2 r1,r10 | ||
2362 | bicl2 #0,r10 | ||
2363 | cmpl r10,r1 | ||
2364 | bgequ noname.207 | ||
2365 | incl r2 | ||
2366 | noname.207: | ||
2367 | addl2 r2,r9 | ||
2368 | bicl2 #0,r9 | ||
2369 | cmpl r9,r2 | ||
2370 | bgequ noname.208 | ||
2371 | incl r8 | ||
2372 | noname.208: | ||
2373 | |||
2374 | movzwl 10(r6),r2 | ||
2375 | bicl3 #-65536,24(r7),r3 | ||
2376 | movzwl 26(r7),r0 | ||
2377 | bicl2 #-65536,r0 | ||
2378 | bicl3 #-65536,8(r6),-668(fp) | ||
2379 | bicl3 #-65536,r2,-672(fp) | ||
2380 | mull3 r0,-668(fp),-660(fp) | ||
2381 | mull2 r3,-668(fp) | ||
2382 | mull3 r3,-672(fp),-664(fp) | ||
2383 | mull2 r0,-672(fp) | ||
2384 | addl3 -660(fp),-664(fp),r0 | ||
2385 | bicl3 #0,r0,-660(fp) | ||
2386 | cmpl -660(fp),-664(fp) | ||
2387 | bgequ noname.209 | ||
2388 | addl2 #65536,-672(fp) | ||
2389 | noname.209: | ||
2390 | movzwl -658(fp),r0 | ||
2391 | bicl2 #-65536,r0 | ||
2392 | addl2 r0,-672(fp) | ||
2393 | bicl3 #-65536,-660(fp),r0 | ||
2394 | ashl #16,r0,-664(fp) | ||
2395 | addl3 -664(fp),-668(fp),r0 | ||
2396 | bicl3 #0,r0,-668(fp) | ||
2397 | cmpl -668(fp),-664(fp) | ||
2398 | bgequ noname.210 | ||
2399 | incl -672(fp) | ||
2400 | noname.210: | ||
2401 | movl -668(fp),r1 | ||
2402 | movl -672(fp),r2 | ||
2403 | addl2 r1,r10 | ||
2404 | bicl2 #0,r10 | ||
2405 | cmpl r10,r1 | ||
2406 | bgequ noname.211 | ||
2407 | incl r2 | ||
2408 | noname.211: | ||
2409 | addl2 r2,r9 | ||
2410 | bicl2 #0,r9 | ||
2411 | cmpl r9,r2 | ||
2412 | bgequ noname.212 | ||
2413 | incl r8 | ||
2414 | noname.212: | ||
2415 | |||
2416 | movzwl 6(r6),r2 | ||
2417 | bicl3 #-65536,28(r7),r3 | ||
2418 | movzwl 30(r7),r0 | ||
2419 | bicl2 #-65536,r0 | ||
2420 | bicl3 #-65536,4(r6),-684(fp) | ||
2421 | bicl3 #-65536,r2,-688(fp) | ||
2422 | mull3 r0,-684(fp),-676(fp) | ||
2423 | mull2 r3,-684(fp) | ||
2424 | mull3 r3,-688(fp),-680(fp) | ||
2425 | mull2 r0,-688(fp) | ||
2426 | addl3 -676(fp),-680(fp),r0 | ||
2427 | bicl3 #0,r0,-676(fp) | ||
2428 | cmpl -676(fp),-680(fp) | ||
2429 | bgequ noname.213 | ||
2430 | addl2 #65536,-688(fp) | ||
2431 | noname.213: | ||
2432 | movzwl -674(fp),r0 | ||
2433 | bicl2 #-65536,r0 | ||
2434 | addl2 r0,-688(fp) | ||
2435 | bicl3 #-65536,-676(fp),r0 | ||
2436 | ashl #16,r0,-680(fp) | ||
2437 | addl3 -680(fp),-684(fp),r0 | ||
2438 | bicl3 #0,r0,-684(fp) | ||
2439 | cmpl -684(fp),-680(fp) | ||
2440 | bgequ noname.214 | ||
2441 | incl -688(fp) | ||
2442 | noname.214: | ||
2443 | movl -684(fp),r1 | ||
2444 | movl -688(fp),r2 | ||
2445 | addl2 r1,r10 | ||
2446 | bicl2 #0,r10 | ||
2447 | cmpl r10,r1 | ||
2448 | bgequ noname.215 | ||
2449 | incl r2 | ||
2450 | noname.215: | ||
2451 | addl2 r2,r9 | ||
2452 | bicl2 #0,r9 | ||
2453 | cmpl r9,r2 | ||
2454 | bgequ noname.216 | ||
2455 | incl r8 | ||
2456 | noname.216: | ||
2457 | |||
2458 | movl r10,32(r11) | ||
2459 | |||
2460 | clrl r10 | ||
2461 | |||
2462 | movzwl 10(r6),r2 | ||
2463 | bicl3 #-65536,28(r7),r3 | ||
2464 | movzwl 30(r7),r0 | ||
2465 | bicl2 #-65536,r0 | ||
2466 | bicl3 #-65536,8(r6),-700(fp) | ||
2467 | bicl3 #-65536,r2,-704(fp) | ||
2468 | mull3 r0,-700(fp),-692(fp) | ||
2469 | mull2 r3,-700(fp) | ||
2470 | mull3 r3,-704(fp),-696(fp) | ||
2471 | mull2 r0,-704(fp) | ||
2472 | addl3 -692(fp),-696(fp),r0 | ||
2473 | bicl3 #0,r0,-692(fp) | ||
2474 | cmpl -692(fp),-696(fp) | ||
2475 | bgequ noname.217 | ||
2476 | addl2 #65536,-704(fp) | ||
2477 | noname.217: | ||
2478 | movzwl -690(fp),r0 | ||
2479 | bicl2 #-65536,r0 | ||
2480 | addl2 r0,-704(fp) | ||
2481 | bicl3 #-65536,-692(fp),r0 | ||
2482 | ashl #16,r0,-696(fp) | ||
2483 | addl3 -696(fp),-700(fp),r0 | ||
2484 | bicl3 #0,r0,-700(fp) | ||
2485 | cmpl -700(fp),-696(fp) | ||
2486 | bgequ noname.218 | ||
2487 | incl -704(fp) | ||
2488 | noname.218: | ||
2489 | movl -700(fp),r1 | ||
2490 | movl -704(fp),r2 | ||
2491 | addl2 r1,r9 | ||
2492 | bicl2 #0,r9 | ||
2493 | cmpl r9,r1 | ||
2494 | bgequ noname.219 | ||
2495 | incl r2 | ||
2496 | noname.219: | ||
2497 | addl2 r2,r8 | ||
2498 | bicl2 #0,r8 | ||
2499 | cmpl r8,r2 | ||
2500 | bgequ noname.220 | ||
2501 | incl r10 | ||
2502 | noname.220: | ||
2503 | |||
2504 | movzwl 14(r6),r2 | ||
2505 | bicl3 #-65536,24(r7),r3 | ||
2506 | movzwl 26(r7),r0 | ||
2507 | bicl2 #-65536,r0 | ||
2508 | bicl3 #-65536,12(r6),-716(fp) | ||
2509 | bicl3 #-65536,r2,-720(fp) | ||
2510 | mull3 r0,-716(fp),-708(fp) | ||
2511 | mull2 r3,-716(fp) | ||
2512 | mull3 r3,-720(fp),-712(fp) | ||
2513 | mull2 r0,-720(fp) | ||
2514 | addl3 -708(fp),-712(fp),r0 | ||
2515 | bicl3 #0,r0,-708(fp) | ||
2516 | cmpl -708(fp),-712(fp) | ||
2517 | bgequ noname.221 | ||
2518 | addl2 #65536,-720(fp) | ||
2519 | noname.221: | ||
2520 | movzwl -706(fp),r0 | ||
2521 | bicl2 #-65536,r0 | ||
2522 | addl2 r0,-720(fp) | ||
2523 | bicl3 #-65536,-708(fp),r0 | ||
2524 | ashl #16,r0,-712(fp) | ||
2525 | addl3 -712(fp),-716(fp),r0 | ||
2526 | bicl3 #0,r0,-716(fp) | ||
2527 | cmpl -716(fp),-712(fp) | ||
2528 | bgequ noname.222 | ||
2529 | incl -720(fp) | ||
2530 | noname.222: | ||
2531 | movl -716(fp),r1 | ||
2532 | movl -720(fp),r2 | ||
2533 | addl2 r1,r9 | ||
2534 | bicl2 #0,r9 | ||
2535 | cmpl r9,r1 | ||
2536 | bgequ noname.223 | ||
2537 | incl r2 | ||
2538 | noname.223: | ||
2539 | addl2 r2,r8 | ||
2540 | bicl2 #0,r8 | ||
2541 | cmpl r8,r2 | ||
2542 | bgequ noname.224 | ||
2543 | incl r10 | ||
2544 | noname.224: | ||
2545 | |||
2546 | movzwl 18(r6),r2 | ||
2547 | bicl3 #-65536,20(r7),r3 | ||
2548 | movzwl 22(r7),r0 | ||
2549 | bicl2 #-65536,r0 | ||
2550 | bicl3 #-65536,16(r6),-732(fp) | ||
2551 | bicl3 #-65536,r2,-736(fp) | ||
2552 | mull3 r0,-732(fp),-724(fp) | ||
2553 | mull2 r3,-732(fp) | ||
2554 | mull3 r3,-736(fp),-728(fp) | ||
2555 | mull2 r0,-736(fp) | ||
2556 | addl3 -724(fp),-728(fp),r0 | ||
2557 | bicl3 #0,r0,-724(fp) | ||
2558 | cmpl -724(fp),-728(fp) | ||
2559 | bgequ noname.225 | ||
2560 | addl2 #65536,-736(fp) | ||
2561 | noname.225: | ||
2562 | movzwl -722(fp),r0 | ||
2563 | bicl2 #-65536,r0 | ||
2564 | addl2 r0,-736(fp) | ||
2565 | bicl3 #-65536,-724(fp),r0 | ||
2566 | ashl #16,r0,-728(fp) | ||
2567 | addl3 -728(fp),-732(fp),r0 | ||
2568 | bicl3 #0,r0,-732(fp) | ||
2569 | cmpl -732(fp),-728(fp) | ||
2570 | bgequ noname.226 | ||
2571 | incl -736(fp) | ||
2572 | noname.226: | ||
2573 | movl -732(fp),r1 | ||
2574 | movl -736(fp),r2 | ||
2575 | addl2 r1,r9 | ||
2576 | bicl2 #0,r9 | ||
2577 | cmpl r9,r1 | ||
2578 | bgequ noname.227 | ||
2579 | incl r2 | ||
2580 | noname.227: | ||
2581 | addl2 r2,r8 | ||
2582 | bicl2 #0,r8 | ||
2583 | cmpl r8,r2 | ||
2584 | bgequ noname.228 | ||
2585 | incl r10 | ||
2586 | noname.228: | ||
2587 | |||
2588 | movzwl 22(r6),r2 | ||
2589 | bicl3 #-65536,16(r7),r3 | ||
2590 | movzwl 18(r7),r0 | ||
2591 | bicl2 #-65536,r0 | ||
2592 | bicl3 #-65536,20(r6),-748(fp) | ||
2593 | bicl3 #-65536,r2,-752(fp) | ||
2594 | mull3 r0,-748(fp),-740(fp) | ||
2595 | mull2 r3,-748(fp) | ||
2596 | mull3 r3,-752(fp),-744(fp) | ||
2597 | mull2 r0,-752(fp) | ||
2598 | addl3 -740(fp),-744(fp),r0 | ||
2599 | bicl3 #0,r0,-740(fp) | ||
2600 | cmpl -740(fp),-744(fp) | ||
2601 | bgequ noname.229 | ||
2602 | addl2 #65536,-752(fp) | ||
2603 | noname.229: | ||
2604 | movzwl -738(fp),r0 | ||
2605 | bicl2 #-65536,r0 | ||
2606 | addl2 r0,-752(fp) | ||
2607 | bicl3 #-65536,-740(fp),r0 | ||
2608 | ashl #16,r0,-744(fp) | ||
2609 | addl3 -744(fp),-748(fp),r0 | ||
2610 | bicl3 #0,r0,-748(fp) | ||
2611 | cmpl -748(fp),-744(fp) | ||
2612 | bgequ noname.230 | ||
2613 | incl -752(fp) | ||
2614 | noname.230: | ||
2615 | movl -748(fp),r1 | ||
2616 | movl -752(fp),r2 | ||
2617 | addl2 r1,r9 | ||
2618 | bicl2 #0,r9 | ||
2619 | cmpl r9,r1 | ||
2620 | bgequ noname.231 | ||
2621 | incl r2 | ||
2622 | noname.231: | ||
2623 | addl2 r2,r8 | ||
2624 | bicl2 #0,r8 | ||
2625 | cmpl r8,r2 | ||
2626 | bgequ noname.232 | ||
2627 | incl r10 | ||
2628 | noname.232: | ||
2629 | |||
2630 | movzwl 26(r6),r2 | ||
2631 | bicl3 #-65536,12(r7),r3 | ||
2632 | movzwl 14(r7),r0 | ||
2633 | bicl2 #-65536,r0 | ||
2634 | bicl3 #-65536,24(r6),-764(fp) | ||
2635 | bicl3 #-65536,r2,-768(fp) | ||
2636 | mull3 r0,-764(fp),-756(fp) | ||
2637 | mull2 r3,-764(fp) | ||
2638 | mull3 r3,-768(fp),-760(fp) | ||
2639 | mull2 r0,-768(fp) | ||
2640 | addl3 -756(fp),-760(fp),r0 | ||
2641 | bicl3 #0,r0,-756(fp) | ||
2642 | cmpl -756(fp),-760(fp) | ||
2643 | bgequ noname.233 | ||
2644 | addl2 #65536,-768(fp) | ||
2645 | noname.233: | ||
2646 | movzwl -754(fp),r0 | ||
2647 | bicl2 #-65536,r0 | ||
2648 | addl2 r0,-768(fp) | ||
2649 | bicl3 #-65536,-756(fp),r0 | ||
2650 | ashl #16,r0,-760(fp) | ||
2651 | addl3 -760(fp),-764(fp),r0 | ||
2652 | bicl3 #0,r0,-764(fp) | ||
2653 | cmpl -764(fp),-760(fp) | ||
2654 | bgequ noname.234 | ||
2655 | incl -768(fp) | ||
2656 | noname.234: | ||
2657 | movl -764(fp),r1 | ||
2658 | movl -768(fp),r2 | ||
2659 | addl2 r1,r9 | ||
2660 | bicl2 #0,r9 | ||
2661 | cmpl r9,r1 | ||
2662 | bgequ noname.235 | ||
2663 | incl r2 | ||
2664 | noname.235: | ||
2665 | addl2 r2,r8 | ||
2666 | bicl2 #0,r8 | ||
2667 | cmpl r8,r2 | ||
2668 | bgequ noname.236 | ||
2669 | incl r10 | ||
2670 | noname.236: | ||
2671 | |||
2672 | bicl3 #-65536,28(r6),r3 | ||
2673 | movzwl 30(r6),r1 | ||
2674 | bicl2 #-65536,r1 | ||
2675 | bicl3 #-65536,8(r7),r2 | ||
2676 | movzwl 10(r7),r0 | ||
2677 | bicl2 #-65536,r0 | ||
2678 | movl r3,r5 | ||
2679 | movl r1,r4 | ||
2680 | mull3 r0,r5,-772(fp) | ||
2681 | mull2 r2,r5 | ||
2682 | mull3 r2,r4,-776(fp) | ||
2683 | mull2 r0,r4 | ||
2684 | addl3 -772(fp),-776(fp),r0 | ||
2685 | bicl3 #0,r0,-772(fp) | ||
2686 | cmpl -772(fp),-776(fp) | ||
2687 | bgequ noname.237 | ||
2688 | addl2 #65536,r4 | ||
2689 | noname.237: | ||
2690 | movzwl -770(fp),r0 | ||
2691 | bicl2 #-65536,r0 | ||
2692 | addl2 r0,r4 | ||
2693 | bicl3 #-65536,-772(fp),r0 | ||
2694 | ashl #16,r0,-776(fp) | ||
2695 | addl2 -776(fp),r5 | ||
2696 | bicl2 #0,r5 | ||
2697 | cmpl r5,-776(fp) | ||
2698 | bgequ noname.238 | ||
2699 | incl r4 | ||
2700 | noname.238: | ||
2701 | movl r5,r1 | ||
2702 | movl r4,r2 | ||
2703 | addl2 r1,r9 | ||
2704 | bicl2 #0,r9 | ||
2705 | cmpl r9,r1 | ||
2706 | bgequ noname.239 | ||
2707 | incl r2 | ||
2708 | noname.239: | ||
2709 | addl2 r2,r8 | ||
2710 | bicl2 #0,r8 | ||
2711 | cmpl r8,r2 | ||
2712 | bgequ noname.240 | ||
2713 | incl r10 | ||
2714 | noname.240: | ||
2715 | |||
2716 | movl r9,36(r11) | ||
2717 | |||
2718 | clrl r9 | ||
2719 | |||
2720 | bicl3 #-65536,28(r6),r3 | ||
2721 | movzwl 30(r6),r1 | ||
2722 | bicl2 #-65536,r1 | ||
2723 | bicl3 #-65536,12(r7),r2 | ||
2724 | movzwl 14(r7),r0 | ||
2725 | bicl2 #-65536,r0 | ||
2726 | movl r3,r5 | ||
2727 | movl r1,r4 | ||
2728 | mull3 r0,r5,-780(fp) | ||
2729 | mull2 r2,r5 | ||
2730 | mull3 r2,r4,-784(fp) | ||
2731 | mull2 r0,r4 | ||
2732 | addl3 -780(fp),-784(fp),r0 | ||
2733 | bicl3 #0,r0,-780(fp) | ||
2734 | cmpl -780(fp),-784(fp) | ||
2735 | bgequ noname.241 | ||
2736 | addl2 #65536,r4 | ||
2737 | noname.241: | ||
2738 | movzwl -778(fp),r0 | ||
2739 | bicl2 #-65536,r0 | ||
2740 | addl2 r0,r4 | ||
2741 | bicl3 #-65536,-780(fp),r0 | ||
2742 | ashl #16,r0,-784(fp) | ||
2743 | addl2 -784(fp),r5 | ||
2744 | bicl2 #0,r5 | ||
2745 | cmpl r5,-784(fp) | ||
2746 | bgequ noname.242 | ||
2747 | incl r4 | ||
2748 | noname.242: | ||
2749 | movl r5,r1 | ||
2750 | movl r4,r2 | ||
2751 | addl2 r1,r8 | ||
2752 | bicl2 #0,r8 | ||
2753 | cmpl r8,r1 | ||
2754 | bgequ noname.243 | ||
2755 | incl r2 | ||
2756 | noname.243: | ||
2757 | addl2 r2,r10 | ||
2758 | bicl2 #0,r10 | ||
2759 | cmpl r10,r2 | ||
2760 | bgequ noname.244 | ||
2761 | incl r9 | ||
2762 | noname.244: | ||
2763 | |||
2764 | bicl3 #-65536,24(r6),r3 | ||
2765 | movzwl 26(r6),r1 | ||
2766 | bicl2 #-65536,r1 | ||
2767 | bicl3 #-65536,16(r7),r2 | ||
2768 | movzwl 18(r7),r0 | ||
2769 | bicl2 #-65536,r0 | ||
2770 | movl r3,r5 | ||
2771 | movl r1,r4 | ||
2772 | mull3 r0,r5,-788(fp) | ||
2773 | mull2 r2,r5 | ||
2774 | mull3 r2,r4,-792(fp) | ||
2775 | mull2 r0,r4 | ||
2776 | addl3 -788(fp),-792(fp),r0 | ||
2777 | bicl3 #0,r0,-788(fp) | ||
2778 | cmpl -788(fp),-792(fp) | ||
2779 | bgequ noname.245 | ||
2780 | addl2 #65536,r4 | ||
2781 | noname.245: | ||
2782 | movzwl -786(fp),r0 | ||
2783 | bicl2 #-65536,r0 | ||
2784 | addl2 r0,r4 | ||
2785 | bicl3 #-65536,-788(fp),r0 | ||
2786 | ashl #16,r0,-792(fp) | ||
2787 | addl2 -792(fp),r5 | ||
2788 | bicl2 #0,r5 | ||
2789 | cmpl r5,-792(fp) | ||
2790 | bgequ noname.246 | ||
2791 | incl r4 | ||
2792 | noname.246: | ||
2793 | movl r5,r1 | ||
2794 | movl r4,r2 | ||
2795 | addl2 r1,r8 | ||
2796 | bicl2 #0,r8 | ||
2797 | cmpl r8,r1 | ||
2798 | bgequ noname.247 | ||
2799 | incl r2 | ||
2800 | noname.247: | ||
2801 | addl2 r2,r10 | ||
2802 | bicl2 #0,r10 | ||
2803 | cmpl r10,r2 | ||
2804 | bgequ noname.248 | ||
2805 | incl r9 | ||
2806 | noname.248: | ||
2807 | |||
2808 | bicl3 #-65536,20(r6),r3 | ||
2809 | movzwl 22(r6),r1 | ||
2810 | bicl2 #-65536,r1 | ||
2811 | bicl3 #-65536,20(r7),r2 | ||
2812 | movzwl 22(r7),r0 | ||
2813 | bicl2 #-65536,r0 | ||
2814 | movl r3,r5 | ||
2815 | movl r1,r4 | ||
2816 | mull3 r0,r5,-796(fp) | ||
2817 | mull2 r2,r5 | ||
2818 | mull3 r2,r4,-800(fp) | ||
2819 | mull2 r0,r4 | ||
2820 | addl3 -796(fp),-800(fp),r0 | ||
2821 | bicl3 #0,r0,-796(fp) | ||
2822 | cmpl -796(fp),-800(fp) | ||
2823 | bgequ noname.249 | ||
2824 | addl2 #65536,r4 | ||
2825 | noname.249: | ||
2826 | movzwl -794(fp),r0 | ||
2827 | bicl2 #-65536,r0 | ||
2828 | addl2 r0,r4 | ||
2829 | bicl3 #-65536,-796(fp),r0 | ||
2830 | ashl #16,r0,-800(fp) | ||
2831 | addl2 -800(fp),r5 | ||
2832 | bicl2 #0,r5 | ||
2833 | cmpl r5,-800(fp) | ||
2834 | bgequ noname.250 | ||
2835 | incl r4 | ||
2836 | noname.250: | ||
2837 | movl r5,r1 | ||
2838 | movl r4,r2 | ||
2839 | addl2 r1,r8 | ||
2840 | bicl2 #0,r8 | ||
2841 | cmpl r8,r1 | ||
2842 | bgequ noname.251 | ||
2843 | incl r2 | ||
2844 | noname.251: | ||
2845 | addl2 r2,r10 | ||
2846 | bicl2 #0,r10 | ||
2847 | cmpl r10,r2 | ||
2848 | bgequ noname.252 | ||
2849 | incl r9 | ||
2850 | noname.252: | ||
2851 | |||
2852 | bicl3 #-65536,16(r6),r3 | ||
2853 | movzwl 18(r6),r1 | ||
2854 | bicl2 #-65536,r1 | ||
2855 | bicl3 #-65536,24(r7),r2 | ||
2856 | movzwl 26(r7),r0 | ||
2857 | bicl2 #-65536,r0 | ||
2858 | movl r3,r5 | ||
2859 | movl r1,r4 | ||
2860 | mull3 r0,r5,-804(fp) | ||
2861 | mull2 r2,r5 | ||
2862 | mull3 r2,r4,-808(fp) | ||
2863 | mull2 r0,r4 | ||
2864 | addl3 -804(fp),-808(fp),r0 | ||
2865 | bicl3 #0,r0,-804(fp) | ||
2866 | cmpl -804(fp),-808(fp) | ||
2867 | bgequ noname.253 | ||
2868 | addl2 #65536,r4 | ||
2869 | noname.253: | ||
2870 | movzwl -802(fp),r0 | ||
2871 | bicl2 #-65536,r0 | ||
2872 | addl2 r0,r4 | ||
2873 | bicl3 #-65536,-804(fp),r0 | ||
2874 | ashl #16,r0,-808(fp) | ||
2875 | addl2 -808(fp),r5 | ||
2876 | bicl2 #0,r5 | ||
2877 | cmpl r5,-808(fp) | ||
2878 | bgequ noname.254 | ||
2879 | incl r4 | ||
2880 | noname.254: | ||
2881 | movl r5,r1 | ||
2882 | movl r4,r2 | ||
2883 | addl2 r1,r8 | ||
2884 | bicl2 #0,r8 | ||
2885 | cmpl r8,r1 | ||
2886 | bgequ noname.255 | ||
2887 | incl r2 | ||
2888 | noname.255: | ||
2889 | addl2 r2,r10 | ||
2890 | bicl2 #0,r10 | ||
2891 | cmpl r10,r2 | ||
2892 | bgequ noname.256 | ||
2893 | incl r9 | ||
2894 | noname.256: | ||
2895 | |||
2896 | bicl3 #-65536,12(r6),r3 | ||
2897 | movzwl 14(r6),r1 | ||
2898 | bicl2 #-65536,r1 | ||
2899 | bicl3 #-65536,28(r7),r2 | ||
2900 | movzwl 30(r7),r0 | ||
2901 | bicl2 #-65536,r0 | ||
2902 | movl r3,r5 | ||
2903 | movl r1,r4 | ||
2904 | mull3 r0,r5,-812(fp) | ||
2905 | mull2 r2,r5 | ||
2906 | mull3 r2,r4,-816(fp) | ||
2907 | mull2 r0,r4 | ||
2908 | addl3 -812(fp),-816(fp),r0 | ||
2909 | bicl3 #0,r0,-812(fp) | ||
2910 | cmpl -812(fp),-816(fp) | ||
2911 | bgequ noname.257 | ||
2912 | addl2 #65536,r4 | ||
2913 | noname.257: | ||
2914 | movzwl -810(fp),r0 | ||
2915 | bicl2 #-65536,r0 | ||
2916 | addl2 r0,r4 | ||
2917 | bicl3 #-65536,-812(fp),r0 | ||
2918 | ashl #16,r0,-816(fp) | ||
2919 | addl2 -816(fp),r5 | ||
2920 | bicl2 #0,r5 | ||
2921 | cmpl r5,-816(fp) | ||
2922 | bgequ noname.258 | ||
2923 | incl r4 | ||
2924 | noname.258: | ||
2925 | movl r5,r1 | ||
2926 | movl r4,r2 | ||
2927 | addl2 r1,r8 | ||
2928 | bicl2 #0,r8 | ||
2929 | cmpl r8,r1 | ||
2930 | bgequ noname.259 | ||
2931 | incl r2 | ||
2932 | noname.259: | ||
2933 | addl2 r2,r10 | ||
2934 | bicl2 #0,r10 | ||
2935 | cmpl r10,r2 | ||
2936 | bgequ noname.260 | ||
2937 | incl r9 | ||
2938 | noname.260: | ||
2939 | |||
2940 | movl r8,40(r11) | ||
2941 | |||
2942 | clrl r8 | ||
2943 | |||
2944 | bicl3 #-65536,16(r6),r3 | ||
2945 | movzwl 18(r6),r2 | ||
2946 | bicl3 #-65536,28(r7),r1 | ||
2947 | movzwl 30(r7),r0 | ||
2948 | bicl2 #-65536,r0 | ||
2949 | movl r3,r4 | ||
2950 | bicl3 #-65536,r2,-828(fp) | ||
2951 | mull3 r0,r4,-820(fp) | ||
2952 | mull2 r1,r4 | ||
2953 | mull3 r1,-828(fp),-824(fp) | ||
2954 | mull2 r0,-828(fp) | ||
2955 | addl3 -820(fp),-824(fp),r0 | ||
2956 | bicl3 #0,r0,-820(fp) | ||
2957 | cmpl -820(fp),-824(fp) | ||
2958 | bgequ noname.261 | ||
2959 | addl2 #65536,-828(fp) | ||
2960 | noname.261: | ||
2961 | movzwl -818(fp),r0 | ||
2962 | bicl2 #-65536,r0 | ||
2963 | addl2 r0,-828(fp) | ||
2964 | bicl3 #-65536,-820(fp),r0 | ||
2965 | ashl #16,r0,-824(fp) | ||
2966 | addl2 -824(fp),r4 | ||
2967 | bicl2 #0,r4 | ||
2968 | cmpl r4,-824(fp) | ||
2969 | bgequ noname.262 | ||
2970 | incl -828(fp) | ||
2971 | noname.262: | ||
2972 | movl r4,r1 | ||
2973 | movl -828(fp),r2 | ||
2974 | addl2 r1,r10 | ||
2975 | bicl2 #0,r10 | ||
2976 | cmpl r10,r1 | ||
2977 | bgequ noname.263 | ||
2978 | incl r2 | ||
2979 | noname.263: | ||
2980 | addl2 r2,r9 | ||
2981 | bicl2 #0,r9 | ||
2982 | cmpl r9,r2 | ||
2983 | bgequ noname.264 | ||
2984 | incl r8 | ||
2985 | noname.264: | ||
2986 | |||
2987 | movzwl 22(r6),r2 | ||
2988 | bicl3 #-65536,24(r7),r3 | ||
2989 | movzwl 26(r7),r0 | ||
2990 | bicl2 #-65536,r0 | ||
2991 | bicl3 #-65536,20(r6),-840(fp) | ||
2992 | bicl3 #-65536,r2,-844(fp) | ||
2993 | mull3 r0,-840(fp),-832(fp) | ||
2994 | mull2 r3,-840(fp) | ||
2995 | mull3 r3,-844(fp),-836(fp) | ||
2996 | mull2 r0,-844(fp) | ||
2997 | addl3 -832(fp),-836(fp),r0 | ||
2998 | bicl3 #0,r0,-832(fp) | ||
2999 | cmpl -832(fp),-836(fp) | ||
3000 | bgequ noname.265 | ||
3001 | addl2 #65536,-844(fp) | ||
3002 | noname.265: | ||
3003 | movzwl -830(fp),r0 | ||
3004 | bicl2 #-65536,r0 | ||
3005 | addl2 r0,-844(fp) | ||
3006 | bicl3 #-65536,-832(fp),r0 | ||
3007 | ashl #16,r0,-836(fp) | ||
3008 | addl3 -836(fp),-840(fp),r0 | ||
3009 | bicl3 #0,r0,-840(fp) | ||
3010 | cmpl -840(fp),-836(fp) | ||
3011 | bgequ noname.266 | ||
3012 | incl -844(fp) | ||
3013 | noname.266: | ||
3014 | movl -840(fp),r1 | ||
3015 | movl -844(fp),r2 | ||
3016 | addl2 r1,r10 | ||
3017 | bicl2 #0,r10 | ||
3018 | cmpl r10,r1 | ||
3019 | bgequ noname.267 | ||
3020 | incl r2 | ||
3021 | noname.267: | ||
3022 | addl2 r2,r9 | ||
3023 | bicl2 #0,r9 | ||
3024 | cmpl r9,r2 | ||
3025 | bgequ noname.268 | ||
3026 | incl r8 | ||
3027 | noname.268: | ||
3028 | |||
3029 | bicl3 #-65536,24(r6),r3 | ||
3030 | movzwl 26(r6),r1 | ||
3031 | bicl2 #-65536,r1 | ||
3032 | bicl3 #-65536,20(r7),r2 | ||
3033 | movzwl 22(r7),r0 | ||
3034 | bicl2 #-65536,r0 | ||
3035 | movl r3,r5 | ||
3036 | movl r1,r4 | ||
3037 | mull3 r0,r5,-848(fp) | ||
3038 | mull2 r2,r5 | ||
3039 | mull3 r2,r4,-852(fp) | ||
3040 | mull2 r0,r4 | ||
3041 | addl3 -848(fp),-852(fp),r0 | ||
3042 | bicl3 #0,r0,-848(fp) | ||
3043 | cmpl -848(fp),-852(fp) | ||
3044 | bgequ noname.269 | ||
3045 | addl2 #65536,r4 | ||
3046 | noname.269: | ||
3047 | movzwl -846(fp),r0 | ||
3048 | bicl2 #-65536,r0 | ||
3049 | addl2 r0,r4 | ||
3050 | bicl3 #-65536,-848(fp),r0 | ||
3051 | ashl #16,r0,-852(fp) | ||
3052 | addl2 -852(fp),r5 | ||
3053 | bicl2 #0,r5 | ||
3054 | cmpl r5,-852(fp) | ||
3055 | bgequ noname.270 | ||
3056 | incl r4 | ||
3057 | noname.270: | ||
3058 | movl r5,r1 | ||
3059 | movl r4,r2 | ||
3060 | addl2 r1,r10 | ||
3061 | bicl2 #0,r10 | ||
3062 | cmpl r10,r1 | ||
3063 | bgequ noname.271 | ||
3064 | incl r2 | ||
3065 | noname.271: | ||
3066 | addl2 r2,r9 | ||
3067 | bicl2 #0,r9 | ||
3068 | cmpl r9,r2 | ||
3069 | bgequ noname.272 | ||
3070 | incl r8 | ||
3071 | noname.272: | ||
3072 | |||
3073 | bicl3 #-65536,28(r6),r3 | ||
3074 | movzwl 30(r6),r1 | ||
3075 | bicl2 #-65536,r1 | ||
3076 | bicl3 #-65536,16(r7),r2 | ||
3077 | movzwl 18(r7),r0 | ||
3078 | bicl2 #-65536,r0 | ||
3079 | movl r3,r5 | ||
3080 | movl r1,r4 | ||
3081 | mull3 r0,r5,-856(fp) | ||
3082 | mull2 r2,r5 | ||
3083 | mull3 r2,r4,-860(fp) | ||
3084 | mull2 r0,r4 | ||
3085 | addl3 -856(fp),-860(fp),r0 | ||
3086 | bicl3 #0,r0,-856(fp) | ||
3087 | cmpl -856(fp),-860(fp) | ||
3088 | bgequ noname.273 | ||
3089 | addl2 #65536,r4 | ||
3090 | noname.273: | ||
3091 | movzwl -854(fp),r0 | ||
3092 | bicl2 #-65536,r0 | ||
3093 | addl2 r0,r4 | ||
3094 | bicl3 #-65536,-856(fp),r0 | ||
3095 | ashl #16,r0,-860(fp) | ||
3096 | addl2 -860(fp),r5 | ||
3097 | bicl2 #0,r5 | ||
3098 | cmpl r5,-860(fp) | ||
3099 | bgequ noname.274 | ||
3100 | incl r4 | ||
3101 | noname.274: | ||
3102 | movl r5,r1 | ||
3103 | movl r4,r2 | ||
3104 | addl2 r1,r10 | ||
3105 | bicl2 #0,r10 | ||
3106 | cmpl r10,r1 | ||
3107 | bgequ noname.275 | ||
3108 | incl r2 | ||
3109 | noname.275: | ||
3110 | addl2 r2,r9 | ||
3111 | bicl2 #0,r9 | ||
3112 | cmpl r9,r2 | ||
3113 | bgequ noname.276 | ||
3114 | incl r8 | ||
3115 | noname.276: | ||
3116 | |||
3117 | movl r10,44(r11) | ||
3118 | |||
3119 | clrl r10 | ||
3120 | |||
3121 | bicl3 #-65536,28(r6),r3 | ||
3122 | movzwl 30(r6),r1 | ||
3123 | bicl2 #-65536,r1 | ||
3124 | bicl3 #-65536,20(r7),r2 | ||
3125 | movzwl 22(r7),r0 | ||
3126 | bicl2 #-65536,r0 | ||
3127 | movl r3,r5 | ||
3128 | movl r1,r4 | ||
3129 | mull3 r0,r5,-864(fp) | ||
3130 | mull2 r2,r5 | ||
3131 | mull3 r2,r4,-868(fp) | ||
3132 | mull2 r0,r4 | ||
3133 | addl3 -864(fp),-868(fp),r0 | ||
3134 | bicl3 #0,r0,-864(fp) | ||
3135 | cmpl -864(fp),-868(fp) | ||
3136 | bgequ noname.277 | ||
3137 | addl2 #65536,r4 | ||
3138 | noname.277: | ||
3139 | movzwl -862(fp),r0 | ||
3140 | bicl2 #-65536,r0 | ||
3141 | addl2 r0,r4 | ||
3142 | bicl3 #-65536,-864(fp),r0 | ||
3143 | ashl #16,r0,-868(fp) | ||
3144 | addl2 -868(fp),r5 | ||
3145 | bicl2 #0,r5 | ||
3146 | cmpl r5,-868(fp) | ||
3147 | bgequ noname.278 | ||
3148 | incl r4 | ||
3149 | noname.278: | ||
3150 | movl r5,r1 | ||
3151 | movl r4,r2 | ||
3152 | addl2 r1,r9 | ||
3153 | bicl2 #0,r9 | ||
3154 | cmpl r9,r1 | ||
3155 | bgequ noname.279 | ||
3156 | incl r2 | ||
3157 | noname.279: | ||
3158 | addl2 r2,r8 | ||
3159 | bicl2 #0,r8 | ||
3160 | cmpl r8,r2 | ||
3161 | bgequ noname.280 | ||
3162 | incl r10 | ||
3163 | noname.280: | ||
3164 | |||
3165 | bicl3 #-65536,24(r6),r3 | ||
3166 | movzwl 26(r6),r1 | ||
3167 | bicl2 #-65536,r1 | ||
3168 | bicl3 #-65536,24(r7),r2 | ||
3169 | movzwl 26(r7),r0 | ||
3170 | bicl2 #-65536,r0 | ||
3171 | movl r3,r5 | ||
3172 | movl r1,r4 | ||
3173 | mull3 r0,r5,-872(fp) | ||
3174 | mull2 r2,r5 | ||
3175 | mull3 r2,r4,-876(fp) | ||
3176 | mull2 r0,r4 | ||
3177 | addl3 -872(fp),-876(fp),r0 | ||
3178 | bicl3 #0,r0,-872(fp) | ||
3179 | cmpl -872(fp),-876(fp) | ||
3180 | bgequ noname.281 | ||
3181 | addl2 #65536,r4 | ||
3182 | noname.281: | ||
3183 | movzwl -870(fp),r0 | ||
3184 | bicl2 #-65536,r0 | ||
3185 | addl2 r0,r4 | ||
3186 | bicl3 #-65536,-872(fp),r0 | ||
3187 | ashl #16,r0,-876(fp) | ||
3188 | addl2 -876(fp),r5 | ||
3189 | bicl2 #0,r5 | ||
3190 | cmpl r5,-876(fp) | ||
3191 | bgequ noname.282 | ||
3192 | incl r4 | ||
3193 | noname.282: | ||
3194 | movl r5,r1 | ||
3195 | movl r4,r2 | ||
3196 | addl2 r1,r9 | ||
3197 | bicl2 #0,r9 | ||
3198 | cmpl r9,r1 | ||
3199 | bgequ noname.283 | ||
3200 | incl r2 | ||
3201 | noname.283: | ||
3202 | addl2 r2,r8 | ||
3203 | bicl2 #0,r8 | ||
3204 | cmpl r8,r2 | ||
3205 | bgequ noname.284 | ||
3206 | incl r10 | ||
3207 | noname.284: | ||
3208 | |||
3209 | bicl3 #-65536,20(r6),r3 | ||
3210 | movzwl 22(r6),r1 | ||
3211 | bicl2 #-65536,r1 | ||
3212 | bicl3 #-65536,28(r7),r2 | ||
3213 | movzwl 30(r7),r0 | ||
3214 | bicl2 #-65536,r0 | ||
3215 | movl r3,r5 | ||
3216 | movl r1,r4 | ||
3217 | mull3 r0,r5,-880(fp) | ||
3218 | mull2 r2,r5 | ||
3219 | mull3 r2,r4,-884(fp) | ||
3220 | mull2 r0,r4 | ||
3221 | addl3 -880(fp),-884(fp),r0 | ||
3222 | bicl3 #0,r0,-880(fp) | ||
3223 | cmpl -880(fp),-884(fp) | ||
3224 | bgequ noname.285 | ||
3225 | addl2 #65536,r4 | ||
3226 | noname.285: | ||
3227 | movzwl -878(fp),r0 | ||
3228 | bicl2 #-65536,r0 | ||
3229 | addl2 r0,r4 | ||
3230 | bicl3 #-65536,-880(fp),r0 | ||
3231 | ashl #16,r0,-884(fp) | ||
3232 | addl2 -884(fp),r5 | ||
3233 | bicl2 #0,r5 | ||
3234 | cmpl r5,-884(fp) | ||
3235 | bgequ noname.286 | ||
3236 | incl r4 | ||
3237 | noname.286: | ||
3238 | movl r5,r1 | ||
3239 | movl r4,r2 | ||
3240 | addl2 r1,r9 | ||
3241 | bicl2 #0,r9 | ||
3242 | cmpl r9,r1 | ||
3243 | bgequ noname.287 | ||
3244 | incl r2 | ||
3245 | noname.287: | ||
3246 | addl2 r2,r8 | ||
3247 | bicl2 #0,r8 | ||
3248 | cmpl r8,r2 | ||
3249 | bgequ noname.288 | ||
3250 | incl r10 | ||
3251 | noname.288: | ||
3252 | |||
3253 | movl r9,48(r11) | ||
3254 | |||
3255 | clrl r9 | ||
3256 | |||
3257 | bicl3 #-65536,24(r6),r3 | ||
3258 | movzwl 26(r6),r1 | ||
3259 | bicl2 #-65536,r1 | ||
3260 | bicl3 #-65536,28(r7),r2 | ||
3261 | movzwl 30(r7),r0 | ||
3262 | bicl2 #-65536,r0 | ||
3263 | movl r3,r5 | ||
3264 | movl r1,r4 | ||
3265 | mull3 r0,r5,-888(fp) | ||
3266 | mull2 r2,r5 | ||
3267 | mull3 r2,r4,-892(fp) | ||
3268 | mull2 r0,r4 | ||
3269 | addl3 -888(fp),-892(fp),r0 | ||
3270 | bicl3 #0,r0,-888(fp) | ||
3271 | cmpl -888(fp),-892(fp) | ||
3272 | bgequ noname.289 | ||
3273 | addl2 #65536,r4 | ||
3274 | noname.289: | ||
3275 | movzwl -886(fp),r0 | ||
3276 | bicl2 #-65536,r0 | ||
3277 | addl2 r0,r4 | ||
3278 | bicl3 #-65536,-888(fp),r0 | ||
3279 | ashl #16,r0,-892(fp) | ||
3280 | addl2 -892(fp),r5 | ||
3281 | bicl2 #0,r5 | ||
3282 | cmpl r5,-892(fp) | ||
3283 | bgequ noname.290 | ||
3284 | incl r4 | ||
3285 | noname.290: | ||
3286 | movl r5,r1 | ||
3287 | movl r4,r2 | ||
3288 | addl2 r1,r8 | ||
3289 | bicl2 #0,r8 | ||
3290 | cmpl r8,r1 | ||
3291 | bgequ noname.291 | ||
3292 | incl r2 | ||
3293 | noname.291: | ||
3294 | addl2 r2,r10 | ||
3295 | bicl2 #0,r10 | ||
3296 | cmpl r10,r2 | ||
3297 | bgequ noname.292 | ||
3298 | incl r9 | ||
3299 | noname.292: | ||
3300 | |||
3301 | movzwl 30(r6),r2 | ||
3302 | bicl3 #-65536,24(r7),r3 | ||
3303 | movzwl 26(r7),r0 | ||
3304 | bicl2 #-65536,r0 | ||
3305 | bicl3 #-65536,28(r6),-904(fp) | ||
3306 | bicl3 #-65536,r2,-908(fp) | ||
3307 | mull3 r0,-904(fp),-896(fp) | ||
3308 | mull2 r3,-904(fp) | ||
3309 | mull3 r3,-908(fp),-900(fp) | ||
3310 | mull2 r0,-908(fp) | ||
3311 | addl3 -896(fp),-900(fp),r0 | ||
3312 | bicl3 #0,r0,-896(fp) | ||
3313 | cmpl -896(fp),-900(fp) | ||
3314 | bgequ noname.293 | ||
3315 | addl2 #65536,-908(fp) | ||
3316 | noname.293: | ||
3317 | movzwl -894(fp),r0 | ||
3318 | bicl2 #-65536,r0 | ||
3319 | addl2 r0,-908(fp) | ||
3320 | bicl3 #-65536,-896(fp),r0 | ||
3321 | ashl #16,r0,-900(fp) | ||
3322 | addl3 -900(fp),-904(fp),r0 | ||
3323 | bicl3 #0,r0,-904(fp) | ||
3324 | cmpl -904(fp),-900(fp) | ||
3325 | bgequ noname.294 | ||
3326 | incl -908(fp) | ||
3327 | noname.294: | ||
3328 | movl -904(fp),r1 | ||
3329 | movl -908(fp),r2 | ||
3330 | addl2 r1,r8 | ||
3331 | bicl2 #0,r8 | ||
3332 | cmpl r8,r1 | ||
3333 | bgequ noname.295 | ||
3334 | incl r2 | ||
3335 | noname.295: | ||
3336 | addl2 r2,r10 | ||
3337 | bicl2 #0,r10 | ||
3338 | cmpl r10,r2 | ||
3339 | bgequ noname.296 | ||
3340 | incl r9 | ||
3341 | noname.296: | ||
3342 | |||
3343 | movl r8,52(r11) | ||
3344 | |||
3345 | clrl r8 | ||
3346 | |||
3347 | movzwl 30(r6),r2 | ||
3348 | bicl3 #-65536,28(r7),r3 | ||
3349 | movzwl 30(r7),r0 | ||
3350 | bicl2 #-65536,r0 | ||
3351 | bicl3 #-65536,28(r6),-920(fp) | ||
3352 | bicl3 #-65536,r2,-924(fp) | ||
3353 | mull3 r0,-920(fp),-912(fp) | ||
3354 | mull2 r3,-920(fp) | ||
3355 | mull3 r3,-924(fp),-916(fp) | ||
3356 | mull2 r0,-924(fp) | ||
3357 | addl3 -912(fp),-916(fp),r0 | ||
3358 | bicl3 #0,r0,-912(fp) | ||
3359 | cmpl -912(fp),-916(fp) | ||
3360 | bgequ noname.297 | ||
3361 | addl2 #65536,-924(fp) | ||
3362 | noname.297: | ||
3363 | movzwl -910(fp),r0 | ||
3364 | bicl2 #-65536,r0 | ||
3365 | addl2 r0,-924(fp) | ||
3366 | bicl3 #-65536,-912(fp),r0 | ||
3367 | ashl #16,r0,-916(fp) | ||
3368 | addl3 -916(fp),-920(fp),r0 | ||
3369 | bicl3 #0,r0,-920(fp) | ||
3370 | cmpl -920(fp),-916(fp) | ||
3371 | bgequ noname.298 | ||
3372 | incl -924(fp) | ||
3373 | noname.298: | ||
3374 | movl -920(fp),r1 | ||
3375 | movl -924(fp),r2 | ||
3376 | addl2 r1,r10 | ||
3377 | bicl2 #0,r10 | ||
3378 | cmpl r10,r1 | ||
3379 | bgequ noname.299 | ||
3380 | incl r2 | ||
3381 | noname.299: | ||
3382 | addl2 r2,r9 | ||
3383 | bicl2 #0,r9 | ||
3384 | cmpl r9,r2 | ||
3385 | bgequ noname.300 | ||
3386 | incl r8 | ||
3387 | noname.300: | ||
3388 | |||
3389 | movl r10,56(r11) | ||
3390 | |||
3391 | movl r9,60(r11) | ||
3392 | |||
3393 | ret | ||
3394 | |||
3395 | |||
3396 | |||
3397 | ;r=4 ;(AP) | ||
3398 | ;a=8 ;(AP) | ||
3399 | ;b=12 ;(AP) | ||
3400 | ;n=16 ;(AP) n by value (input) | ||
3401 | |||
3402 | .psect code,nowrt | ||
3403 | |||
3404 | .entry BN_MUL_COMBA4,^m<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11> | ||
3405 | movab -156(sp),sp | ||
3406 | |||
3407 | clrq r9 | ||
3408 | |||
3409 | clrl r8 | ||
3410 | |||
3411 | movl 8(ap),r6 | ||
3412 | bicl3 #-65536,(r6),r3 | ||
3413 | movzwl 2(r6),r2 | ||
3414 | bicl2 #-65536,r2 | ||
3415 | movl 12(ap),r7 | ||
3416 | bicl3 #-65536,(r7),r1 | ||
3417 | movzwl 2(r7),r0 | ||
3418 | bicl2 #-65536,r0 | ||
3419 | movl r3,r5 | ||
3420 | movl r2,r4 | ||
3421 | mull3 r0,r5,-4(fp) | ||
3422 | mull2 r1,r5 | ||
3423 | mull3 r1,r4,-8(fp) | ||
3424 | mull2 r0,r4 | ||
3425 | addl3 -4(fp),-8(fp),r0 | ||
3426 | bicl3 #0,r0,-4(fp) | ||
3427 | cmpl -4(fp),-8(fp) | ||
3428 | bgequ noname.303 | ||
3429 | addl2 #65536,r4 | ||
3430 | noname.303: | ||
3431 | movzwl -2(fp),r0 | ||
3432 | bicl2 #-65536,r0 | ||
3433 | addl2 r0,r4 | ||
3434 | bicl3 #-65536,-4(fp),r0 | ||
3435 | ashl #16,r0,-8(fp) | ||
3436 | addl2 -8(fp),r5 | ||
3437 | bicl2 #0,r5 | ||
3438 | cmpl r5,-8(fp) | ||
3439 | bgequ noname.304 | ||
3440 | incl r4 | ||
3441 | noname.304: | ||
3442 | movl r5,r1 | ||
3443 | movl r4,r2 | ||
3444 | addl2 r1,r10 | ||
3445 | bicl2 #0,r10 | ||
3446 | cmpl r10,r1 | ||
3447 | bgequ noname.305 | ||
3448 | incl r2 | ||
3449 | noname.305: | ||
3450 | addl2 r2,r9 | ||
3451 | bicl2 #0,r9 | ||
3452 | cmpl r9,r2 | ||
3453 | bgequ noname.306 | ||
3454 | incl r8 | ||
3455 | noname.306: | ||
3456 | |||
3457 | movl 4(ap),r11 | ||
3458 | movl r10,(r11) | ||
3459 | |||
3460 | clrl r10 | ||
3461 | |||
3462 | bicl3 #-65536,(r6),r3 | ||
3463 | movzwl 2(r6),r1 | ||
3464 | bicl2 #-65536,r1 | ||
3465 | bicl3 #-65536,4(r7),r2 | ||
3466 | movzwl 6(r7),r0 | ||
3467 | bicl2 #-65536,r0 | ||
3468 | movl r3,r5 | ||
3469 | movl r1,r4 | ||
3470 | mull3 r0,r5,-12(fp) | ||
3471 | mull2 r2,r5 | ||
3472 | mull3 r2,r4,-16(fp) | ||
3473 | mull2 r0,r4 | ||
3474 | addl3 -12(fp),-16(fp),r0 | ||
3475 | bicl3 #0,r0,-12(fp) | ||
3476 | cmpl -12(fp),-16(fp) | ||
3477 | bgequ noname.307 | ||
3478 | addl2 #65536,r4 | ||
3479 | noname.307: | ||
3480 | movzwl -10(fp),r0 | ||
3481 | bicl2 #-65536,r0 | ||
3482 | addl2 r0,r4 | ||
3483 | bicl3 #-65536,-12(fp),r0 | ||
3484 | ashl #16,r0,-16(fp) | ||
3485 | addl2 -16(fp),r5 | ||
3486 | bicl2 #0,r5 | ||
3487 | cmpl r5,-16(fp) | ||
3488 | bgequ noname.308 | ||
3489 | incl r4 | ||
3490 | noname.308: | ||
3491 | movl r5,r1 | ||
3492 | movl r4,r2 | ||
3493 | addl2 r1,r9 | ||
3494 | bicl2 #0,r9 | ||
3495 | cmpl r9,r1 | ||
3496 | bgequ noname.309 | ||
3497 | incl r2 | ||
3498 | noname.309: | ||
3499 | addl2 r2,r8 | ||
3500 | bicl2 #0,r8 | ||
3501 | cmpl r8,r2 | ||
3502 | bgequ noname.310 | ||
3503 | incl r10 | ||
3504 | noname.310: | ||
3505 | |||
3506 | bicl3 #-65536,4(r6),r3 | ||
3507 | movzwl 6(r6),r1 | ||
3508 | bicl2 #-65536,r1 | ||
3509 | bicl3 #-65536,(r7),r2 | ||
3510 | movzwl 2(r7),r0 | ||
3511 | bicl2 #-65536,r0 | ||
3512 | movl r3,r5 | ||
3513 | movl r1,r4 | ||
3514 | mull3 r0,r5,-20(fp) | ||
3515 | mull2 r2,r5 | ||
3516 | mull3 r2,r4,-24(fp) | ||
3517 | mull2 r0,r4 | ||
3518 | addl3 -20(fp),-24(fp),r0 | ||
3519 | bicl3 #0,r0,-20(fp) | ||
3520 | cmpl -20(fp),-24(fp) | ||
3521 | bgequ noname.311 | ||
3522 | addl2 #65536,r4 | ||
3523 | noname.311: | ||
3524 | movzwl -18(fp),r0 | ||
3525 | bicl2 #-65536,r0 | ||
3526 | addl2 r0,r4 | ||
3527 | bicl3 #-65536,-20(fp),r0 | ||
3528 | ashl #16,r0,-24(fp) | ||
3529 | addl2 -24(fp),r5 | ||
3530 | bicl2 #0,r5 | ||
3531 | cmpl r5,-24(fp) | ||
3532 | bgequ noname.312 | ||
3533 | incl r4 | ||
3534 | noname.312: | ||
3535 | movl r5,r1 | ||
3536 | movl r4,r2 | ||
3537 | addl2 r1,r9 | ||
3538 | bicl2 #0,r9 | ||
3539 | cmpl r9,r1 | ||
3540 | bgequ noname.313 | ||
3541 | incl r2 | ||
3542 | noname.313: | ||
3543 | addl2 r2,r8 | ||
3544 | bicl2 #0,r8 | ||
3545 | cmpl r8,r2 | ||
3546 | bgequ noname.314 | ||
3547 | incl r10 | ||
3548 | noname.314: | ||
3549 | |||
3550 | movl r9,4(r11) | ||
3551 | |||
3552 | clrl r9 | ||
3553 | |||
3554 | bicl3 #-65536,8(r6),r3 | ||
3555 | movzwl 10(r6),r1 | ||
3556 | bicl2 #-65536,r1 | ||
3557 | bicl3 #-65536,(r7),r2 | ||
3558 | movzwl 2(r7),r0 | ||
3559 | bicl2 #-65536,r0 | ||
3560 | movl r3,r5 | ||
3561 | movl r1,r4 | ||
3562 | mull3 r0,r5,-28(fp) | ||
3563 | mull2 r2,r5 | ||
3564 | mull3 r2,r4,-32(fp) | ||
3565 | mull2 r0,r4 | ||
3566 | addl3 -28(fp),-32(fp),r0 | ||
3567 | bicl3 #0,r0,-28(fp) | ||
3568 | cmpl -28(fp),-32(fp) | ||
3569 | bgequ noname.315 | ||
3570 | addl2 #65536,r4 | ||
3571 | noname.315: | ||
3572 | movzwl -26(fp),r0 | ||
3573 | bicl2 #-65536,r0 | ||
3574 | addl2 r0,r4 | ||
3575 | bicl3 #-65536,-28(fp),r0 | ||
3576 | ashl #16,r0,-32(fp) | ||
3577 | addl2 -32(fp),r5 | ||
3578 | bicl2 #0,r5 | ||
3579 | cmpl r5,-32(fp) | ||
3580 | bgequ noname.316 | ||
3581 | incl r4 | ||
3582 | noname.316: | ||
3583 | movl r5,r1 | ||
3584 | movl r4,r2 | ||
3585 | addl2 r1,r8 | ||
3586 | bicl2 #0,r8 | ||
3587 | cmpl r8,r1 | ||
3588 | bgequ noname.317 | ||
3589 | incl r2 | ||
3590 | noname.317: | ||
3591 | addl2 r2,r10 | ||
3592 | bicl2 #0,r10 | ||
3593 | cmpl r10,r2 | ||
3594 | bgequ noname.318 | ||
3595 | incl r9 | ||
3596 | noname.318: | ||
3597 | |||
3598 | bicl3 #-65536,4(r6),r3 | ||
3599 | movzwl 6(r6),r1 | ||
3600 | bicl2 #-65536,r1 | ||
3601 | bicl3 #-65536,4(r7),r2 | ||
3602 | movzwl 6(r7),r0 | ||
3603 | bicl2 #-65536,r0 | ||
3604 | movl r3,r5 | ||
3605 | movl r1,r4 | ||
3606 | mull3 r0,r5,-36(fp) | ||
3607 | mull2 r2,r5 | ||
3608 | mull3 r2,r4,-40(fp) | ||
3609 | mull2 r0,r4 | ||
3610 | addl3 -36(fp),-40(fp),r0 | ||
3611 | bicl3 #0,r0,-36(fp) | ||
3612 | cmpl -36(fp),-40(fp) | ||
3613 | bgequ noname.319 | ||
3614 | addl2 #65536,r4 | ||
3615 | noname.319: | ||
3616 | movzwl -34(fp),r0 | ||
3617 | bicl2 #-65536,r0 | ||
3618 | addl2 r0,r4 | ||
3619 | bicl3 #-65536,-36(fp),r0 | ||
3620 | ashl #16,r0,-40(fp) | ||
3621 | addl2 -40(fp),r5 | ||
3622 | bicl2 #0,r5 | ||
3623 | cmpl r5,-40(fp) | ||
3624 | bgequ noname.320 | ||
3625 | incl r4 | ||
3626 | noname.320: | ||
3627 | movl r5,r1 | ||
3628 | movl r4,r2 | ||
3629 | addl2 r1,r8 | ||
3630 | bicl2 #0,r8 | ||
3631 | cmpl r8,r1 | ||
3632 | bgequ noname.321 | ||
3633 | incl r2 | ||
3634 | noname.321: | ||
3635 | addl2 r2,r10 | ||
3636 | bicl2 #0,r10 | ||
3637 | cmpl r10,r2 | ||
3638 | bgequ noname.322 | ||
3639 | incl r9 | ||
3640 | noname.322: | ||
3641 | |||
3642 | bicl3 #-65536,(r6),r3 | ||
3643 | movzwl 2(r6),r1 | ||
3644 | bicl2 #-65536,r1 | ||
3645 | bicl3 #-65536,8(r7),r2 | ||
3646 | movzwl 10(r7),r0 | ||
3647 | bicl2 #-65536,r0 | ||
3648 | movl r3,r5 | ||
3649 | movl r1,r4 | ||
3650 | mull3 r0,r5,-44(fp) | ||
3651 | mull2 r2,r5 | ||
3652 | mull3 r2,r4,-48(fp) | ||
3653 | mull2 r0,r4 | ||
3654 | addl3 -44(fp),-48(fp),r0 | ||
3655 | bicl3 #0,r0,-44(fp) | ||
3656 | cmpl -44(fp),-48(fp) | ||
3657 | bgequ noname.323 | ||
3658 | addl2 #65536,r4 | ||
3659 | noname.323: | ||
3660 | movzwl -42(fp),r0 | ||
3661 | bicl2 #-65536,r0 | ||
3662 | addl2 r0,r4 | ||
3663 | bicl3 #-65536,-44(fp),r0 | ||
3664 | ashl #16,r0,-48(fp) | ||
3665 | addl2 -48(fp),r5 | ||
3666 | bicl2 #0,r5 | ||
3667 | cmpl r5,-48(fp) | ||
3668 | bgequ noname.324 | ||
3669 | incl r4 | ||
3670 | noname.324: | ||
3671 | movl r5,r1 | ||
3672 | movl r4,r2 | ||
3673 | addl2 r1,r8 | ||
3674 | bicl2 #0,r8 | ||
3675 | cmpl r8,r1 | ||
3676 | bgequ noname.325 | ||
3677 | incl r2 | ||
3678 | noname.325: | ||
3679 | addl2 r2,r10 | ||
3680 | bicl2 #0,r10 | ||
3681 | cmpl r10,r2 | ||
3682 | bgequ noname.326 | ||
3683 | incl r9 | ||
3684 | noname.326: | ||
3685 | |||
3686 | movl r8,8(r11) | ||
3687 | |||
3688 | clrl r8 | ||
3689 | |||
3690 | bicl3 #-65536,(r6),r3 | ||
3691 | movzwl 2(r6),r2 | ||
3692 | bicl3 #-65536,12(r7),r1 | ||
3693 | movzwl 14(r7),r0 | ||
3694 | bicl2 #-65536,r0 | ||
3695 | movl r3,r4 | ||
3696 | bicl3 #-65536,r2,-60(fp) | ||
3697 | mull3 r0,r4,-52(fp) | ||
3698 | mull2 r1,r4 | ||
3699 | mull3 r1,-60(fp),-56(fp) | ||
3700 | mull2 r0,-60(fp) | ||
3701 | addl3 -52(fp),-56(fp),r0 | ||
3702 | bicl3 #0,r0,-52(fp) | ||
3703 | cmpl -52(fp),-56(fp) | ||
3704 | bgequ noname.327 | ||
3705 | addl2 #65536,-60(fp) | ||
3706 | noname.327: | ||
3707 | movzwl -50(fp),r0 | ||
3708 | bicl2 #-65536,r0 | ||
3709 | addl2 r0,-60(fp) | ||
3710 | bicl3 #-65536,-52(fp),r0 | ||
3711 | ashl #16,r0,-56(fp) | ||
3712 | addl2 -56(fp),r4 | ||
3713 | bicl2 #0,r4 | ||
3714 | cmpl r4,-56(fp) | ||
3715 | bgequ noname.328 | ||
3716 | incl -60(fp) | ||
3717 | noname.328: | ||
3718 | movl r4,r1 | ||
3719 | movl -60(fp),r2 | ||
3720 | addl2 r1,r10 | ||
3721 | bicl2 #0,r10 | ||
3722 | cmpl r10,r1 | ||
3723 | bgequ noname.329 | ||
3724 | incl r2 | ||
3725 | noname.329: | ||
3726 | addl2 r2,r9 | ||
3727 | bicl2 #0,r9 | ||
3728 | cmpl r9,r2 | ||
3729 | bgequ noname.330 | ||
3730 | incl r8 | ||
3731 | noname.330: | ||
3732 | |||
3733 | movzwl 6(r6),r2 | ||
3734 | bicl3 #-65536,8(r7),r3 | ||
3735 | movzwl 10(r7),r0 | ||
3736 | bicl2 #-65536,r0 | ||
3737 | bicl3 #-65536,4(r6),-72(fp) | ||
3738 | bicl3 #-65536,r2,-76(fp) | ||
3739 | mull3 r0,-72(fp),-64(fp) | ||
3740 | mull2 r3,-72(fp) | ||
3741 | mull3 r3,-76(fp),-68(fp) | ||
3742 | mull2 r0,-76(fp) | ||
3743 | addl3 -64(fp),-68(fp),r0 | ||
3744 | bicl3 #0,r0,-64(fp) | ||
3745 | cmpl -64(fp),-68(fp) | ||
3746 | bgequ noname.331 | ||
3747 | addl2 #65536,-76(fp) | ||
3748 | noname.331: | ||
3749 | movzwl -62(fp),r0 | ||
3750 | bicl2 #-65536,r0 | ||
3751 | addl2 r0,-76(fp) | ||
3752 | bicl3 #-65536,-64(fp),r0 | ||
3753 | ashl #16,r0,-68(fp) | ||
3754 | addl3 -68(fp),-72(fp),r0 | ||
3755 | bicl3 #0,r0,-72(fp) | ||
3756 | cmpl -72(fp),-68(fp) | ||
3757 | bgequ noname.332 | ||
3758 | incl -76(fp) | ||
3759 | noname.332: | ||
3760 | movl -72(fp),r1 | ||
3761 | movl -76(fp),r2 | ||
3762 | addl2 r1,r10 | ||
3763 | bicl2 #0,r10 | ||
3764 | cmpl r10,r1 | ||
3765 | bgequ noname.333 | ||
3766 | incl r2 | ||
3767 | noname.333: | ||
3768 | addl2 r2,r9 | ||
3769 | bicl2 #0,r9 | ||
3770 | cmpl r9,r2 | ||
3771 | bgequ noname.334 | ||
3772 | incl r8 | ||
3773 | noname.334: | ||
3774 | |||
3775 | bicl3 #-65536,8(r6),r3 | ||
3776 | movzwl 10(r6),r1 | ||
3777 | bicl2 #-65536,r1 | ||
3778 | bicl3 #-65536,4(r7),r2 | ||
3779 | movzwl 6(r7),r0 | ||
3780 | bicl2 #-65536,r0 | ||
3781 | movl r3,r5 | ||
3782 | movl r1,r4 | ||
3783 | mull3 r0,r5,-80(fp) | ||
3784 | mull2 r2,r5 | ||
3785 | mull3 r2,r4,-84(fp) | ||
3786 | mull2 r0,r4 | ||
3787 | addl3 -80(fp),-84(fp),r0 | ||
3788 | bicl3 #0,r0,-80(fp) | ||
3789 | cmpl -80(fp),-84(fp) | ||
3790 | bgequ noname.335 | ||
3791 | addl2 #65536,r4 | ||
3792 | noname.335: | ||
3793 | movzwl -78(fp),r0 | ||
3794 | bicl2 #-65536,r0 | ||
3795 | addl2 r0,r4 | ||
3796 | bicl3 #-65536,-80(fp),r0 | ||
3797 | ashl #16,r0,-84(fp) | ||
3798 | addl2 -84(fp),r5 | ||
3799 | bicl2 #0,r5 | ||
3800 | cmpl r5,-84(fp) | ||
3801 | bgequ noname.336 | ||
3802 | incl r4 | ||
3803 | noname.336: | ||
3804 | movl r5,r1 | ||
3805 | movl r4,r2 | ||
3806 | addl2 r1,r10 | ||
3807 | bicl2 #0,r10 | ||
3808 | cmpl r10,r1 | ||
3809 | bgequ noname.337 | ||
3810 | incl r2 | ||
3811 | noname.337: | ||
3812 | addl2 r2,r9 | ||
3813 | bicl2 #0,r9 | ||
3814 | cmpl r9,r2 | ||
3815 | bgequ noname.338 | ||
3816 | incl r8 | ||
3817 | noname.338: | ||
3818 | |||
3819 | bicl3 #-65536,12(r6),r3 | ||
3820 | movzwl 14(r6),r1 | ||
3821 | bicl2 #-65536,r1 | ||
3822 | bicl3 #-65536,(r7),r2 | ||
3823 | movzwl 2(r7),r0 | ||
3824 | bicl2 #-65536,r0 | ||
3825 | movl r3,r5 | ||
3826 | movl r1,r4 | ||
3827 | mull3 r0,r5,-88(fp) | ||
3828 | mull2 r2,r5 | ||
3829 | mull3 r2,r4,-92(fp) | ||
3830 | mull2 r0,r4 | ||
3831 | addl3 -88(fp),-92(fp),r0 | ||
3832 | bicl3 #0,r0,-88(fp) | ||
3833 | cmpl -88(fp),-92(fp) | ||
3834 | bgequ noname.339 | ||
3835 | addl2 #65536,r4 | ||
3836 | noname.339: | ||
3837 | movzwl -86(fp),r0 | ||
3838 | bicl2 #-65536,r0 | ||
3839 | addl2 r0,r4 | ||
3840 | bicl3 #-65536,-88(fp),r0 | ||
3841 | ashl #16,r0,-92(fp) | ||
3842 | addl2 -92(fp),r5 | ||
3843 | bicl2 #0,r5 | ||
3844 | cmpl r5,-92(fp) | ||
3845 | bgequ noname.340 | ||
3846 | incl r4 | ||
3847 | noname.340: | ||
3848 | movl r5,r1 | ||
3849 | movl r4,r2 | ||
3850 | addl2 r1,r10 | ||
3851 | bicl2 #0,r10 | ||
3852 | cmpl r10,r1 | ||
3853 | bgequ noname.341 | ||
3854 | incl r2 | ||
3855 | noname.341: | ||
3856 | addl2 r2,r9 | ||
3857 | bicl2 #0,r9 | ||
3858 | cmpl r9,r2 | ||
3859 | bgequ noname.342 | ||
3860 | incl r8 | ||
3861 | noname.342: | ||
3862 | |||
3863 | movl r10,12(r11) | ||
3864 | |||
3865 | clrl r10 | ||
3866 | |||
3867 | bicl3 #-65536,12(r6),r3 | ||
3868 | movzwl 14(r6),r1 | ||
3869 | bicl2 #-65536,r1 | ||
3870 | bicl3 #-65536,4(r7),r2 | ||
3871 | movzwl 6(r7),r0 | ||
3872 | bicl2 #-65536,r0 | ||
3873 | movl r3,r5 | ||
3874 | movl r1,r4 | ||
3875 | mull3 r0,r5,-96(fp) | ||
3876 | mull2 r2,r5 | ||
3877 | mull3 r2,r4,-100(fp) | ||
3878 | mull2 r0,r4 | ||
3879 | addl3 -96(fp),-100(fp),r0 | ||
3880 | bicl3 #0,r0,-96(fp) | ||
3881 | cmpl -96(fp),-100(fp) | ||
3882 | bgequ noname.343 | ||
3883 | addl2 #65536,r4 | ||
3884 | noname.343: | ||
3885 | movzwl -94(fp),r0 | ||
3886 | bicl2 #-65536,r0 | ||
3887 | addl2 r0,r4 | ||
3888 | bicl3 #-65536,-96(fp),r0 | ||
3889 | ashl #16,r0,-100(fp) | ||
3890 | addl2 -100(fp),r5 | ||
3891 | bicl2 #0,r5 | ||
3892 | cmpl r5,-100(fp) | ||
3893 | bgequ noname.344 | ||
3894 | incl r4 | ||
3895 | noname.344: | ||
3896 | movl r5,r1 | ||
3897 | movl r4,r2 | ||
3898 | addl2 r1,r9 | ||
3899 | bicl2 #0,r9 | ||
3900 | cmpl r9,r1 | ||
3901 | bgequ noname.345 | ||
3902 | incl r2 | ||
3903 | noname.345: | ||
3904 | addl2 r2,r8 | ||
3905 | bicl2 #0,r8 | ||
3906 | cmpl r8,r2 | ||
3907 | bgequ noname.346 | ||
3908 | incl r10 | ||
3909 | noname.346: | ||
3910 | |||
3911 | bicl3 #-65536,8(r6),r3 | ||
3912 | movzwl 10(r6),r1 | ||
3913 | bicl2 #-65536,r1 | ||
3914 | bicl3 #-65536,8(r7),r2 | ||
3915 | movzwl 10(r7),r0 | ||
3916 | bicl2 #-65536,r0 | ||
3917 | movl r3,r5 | ||
3918 | movl r1,r4 | ||
3919 | mull3 r0,r5,-104(fp) | ||
3920 | mull2 r2,r5 | ||
3921 | mull3 r2,r4,-108(fp) | ||
3922 | mull2 r0,r4 | ||
3923 | addl3 -104(fp),-108(fp),r0 | ||
3924 | bicl3 #0,r0,-104(fp) | ||
3925 | cmpl -104(fp),-108(fp) | ||
3926 | bgequ noname.347 | ||
3927 | addl2 #65536,r4 | ||
3928 | noname.347: | ||
3929 | movzwl -102(fp),r0 | ||
3930 | bicl2 #-65536,r0 | ||
3931 | addl2 r0,r4 | ||
3932 | bicl3 #-65536,-104(fp),r0 | ||
3933 | ashl #16,r0,-108(fp) | ||
3934 | addl2 -108(fp),r5 | ||
3935 | bicl2 #0,r5 | ||
3936 | cmpl r5,-108(fp) | ||
3937 | bgequ noname.348 | ||
3938 | incl r4 | ||
3939 | noname.348: | ||
3940 | movl r5,r1 | ||
3941 | movl r4,r2 | ||
3942 | addl2 r1,r9 | ||
3943 | bicl2 #0,r9 | ||
3944 | cmpl r9,r1 | ||
3945 | bgequ noname.349 | ||
3946 | incl r2 | ||
3947 | noname.349: | ||
3948 | addl2 r2,r8 | ||
3949 | bicl2 #0,r8 | ||
3950 | cmpl r8,r2 | ||
3951 | bgequ noname.350 | ||
3952 | incl r10 | ||
3953 | noname.350: | ||
3954 | |||
3955 | bicl3 #-65536,4(r6),r3 | ||
3956 | movzwl 6(r6),r1 | ||
3957 | bicl2 #-65536,r1 | ||
3958 | bicl3 #-65536,12(r7),r2 | ||
3959 | movzwl 14(r7),r0 | ||
3960 | bicl2 #-65536,r0 | ||
3961 | movl r3,r5 | ||
3962 | movl r1,r4 | ||
3963 | mull3 r0,r5,-112(fp) | ||
3964 | mull2 r2,r5 | ||
3965 | mull3 r2,r4,-116(fp) | ||
3966 | mull2 r0,r4 | ||
3967 | addl3 -112(fp),-116(fp),r0 | ||
3968 | bicl3 #0,r0,-112(fp) | ||
3969 | cmpl -112(fp),-116(fp) | ||
3970 | bgequ noname.351 | ||
3971 | addl2 #65536,r4 | ||
3972 | noname.351: | ||
3973 | movzwl -110(fp),r0 | ||
3974 | bicl2 #-65536,r0 | ||
3975 | addl2 r0,r4 | ||
3976 | bicl3 #-65536,-112(fp),r0 | ||
3977 | ashl #16,r0,-116(fp) | ||
3978 | addl2 -116(fp),r5 | ||
3979 | bicl2 #0,r5 | ||
3980 | cmpl r5,-116(fp) | ||
3981 | bgequ noname.352 | ||
3982 | incl r4 | ||
3983 | noname.352: | ||
3984 | movl r5,r1 | ||
3985 | movl r4,r2 | ||
3986 | addl2 r1,r9 | ||
3987 | bicl2 #0,r9 | ||
3988 | cmpl r9,r1 | ||
3989 | bgequ noname.353 | ||
3990 | incl r2 | ||
3991 | noname.353: | ||
3992 | addl2 r2,r8 | ||
3993 | bicl2 #0,r8 | ||
3994 | cmpl r8,r2 | ||
3995 | bgequ noname.354 | ||
3996 | incl r10 | ||
3997 | noname.354: | ||
3998 | |||
3999 | movl r9,16(r11) | ||
4000 | |||
4001 | clrl r9 | ||
4002 | |||
4003 | bicl3 #-65536,8(r6),r3 | ||
4004 | movzwl 10(r6),r1 | ||
4005 | bicl2 #-65536,r1 | ||
4006 | bicl3 #-65536,12(r7),r2 | ||
4007 | movzwl 14(r7),r0 | ||
4008 | bicl2 #-65536,r0 | ||
4009 | movl r3,r5 | ||
4010 | movl r1,r4 | ||
4011 | mull3 r0,r5,-120(fp) | ||
4012 | mull2 r2,r5 | ||
4013 | mull3 r2,r4,-124(fp) | ||
4014 | mull2 r0,r4 | ||
4015 | addl3 -120(fp),-124(fp),r0 | ||
4016 | bicl3 #0,r0,-120(fp) | ||
4017 | cmpl -120(fp),-124(fp) | ||
4018 | bgequ noname.355 | ||
4019 | addl2 #65536,r4 | ||
4020 | noname.355: | ||
4021 | movzwl -118(fp),r0 | ||
4022 | bicl2 #-65536,r0 | ||
4023 | addl2 r0,r4 | ||
4024 | bicl3 #-65536,-120(fp),r0 | ||
4025 | ashl #16,r0,-124(fp) | ||
4026 | addl2 -124(fp),r5 | ||
4027 | bicl2 #0,r5 | ||
4028 | cmpl r5,-124(fp) | ||
4029 | bgequ noname.356 | ||
4030 | incl r4 | ||
4031 | noname.356: | ||
4032 | movl r5,r1 | ||
4033 | movl r4,r2 | ||
4034 | addl2 r1,r8 | ||
4035 | bicl2 #0,r8 | ||
4036 | cmpl r8,r1 | ||
4037 | bgequ noname.357 | ||
4038 | incl r2 | ||
4039 | noname.357: | ||
4040 | addl2 r2,r10 | ||
4041 | bicl2 #0,r10 | ||
4042 | cmpl r10,r2 | ||
4043 | bgequ noname.358 | ||
4044 | incl r9 | ||
4045 | noname.358: | ||
4046 | |||
4047 | movzwl 14(r6),r2 | ||
4048 | bicl3 #-65536,8(r7),r3 | ||
4049 | movzwl 10(r7),r0 | ||
4050 | bicl2 #-65536,r0 | ||
4051 | bicl3 #-65536,12(r6),-136(fp) | ||
4052 | bicl3 #-65536,r2,-140(fp) | ||
4053 | mull3 r0,-136(fp),-128(fp) | ||
4054 | mull2 r3,-136(fp) | ||
4055 | mull3 r3,-140(fp),-132(fp) | ||
4056 | mull2 r0,-140(fp) | ||
4057 | addl3 -128(fp),-132(fp),r0 | ||
4058 | bicl3 #0,r0,-128(fp) | ||
4059 | cmpl -128(fp),-132(fp) | ||
4060 | bgequ noname.359 | ||
4061 | addl2 #65536,-140(fp) | ||
4062 | noname.359: | ||
4063 | movzwl -126(fp),r0 | ||
4064 | bicl2 #-65536,r0 | ||
4065 | addl2 r0,-140(fp) | ||
4066 | bicl3 #-65536,-128(fp),r0 | ||
4067 | ashl #16,r0,-132(fp) | ||
4068 | addl3 -132(fp),-136(fp),r0 | ||
4069 | bicl3 #0,r0,-136(fp) | ||
4070 | cmpl -136(fp),-132(fp) | ||
4071 | bgequ noname.360 | ||
4072 | incl -140(fp) | ||
4073 | noname.360: | ||
4074 | movl -136(fp),r1 | ||
4075 | movl -140(fp),r2 | ||
4076 | addl2 r1,r8 | ||
4077 | bicl2 #0,r8 | ||
4078 | cmpl r8,r1 | ||
4079 | bgequ noname.361 | ||
4080 | incl r2 | ||
4081 | noname.361: | ||
4082 | addl2 r2,r10 | ||
4083 | bicl2 #0,r10 | ||
4084 | cmpl r10,r2 | ||
4085 | bgequ noname.362 | ||
4086 | incl r9 | ||
4087 | noname.362: | ||
4088 | |||
4089 | movl r8,20(r11) | ||
4090 | |||
4091 | clrl r8 | ||
4092 | |||
4093 | movzwl 14(r6),r2 | ||
4094 | bicl3 #-65536,12(r7),r3 | ||
4095 | movzwl 14(r7),r0 | ||
4096 | bicl2 #-65536,r0 | ||
4097 | bicl3 #-65536,12(r6),-152(fp) | ||
4098 | bicl3 #-65536,r2,-156(fp) | ||
4099 | mull3 r0,-152(fp),-144(fp) | ||
4100 | mull2 r3,-152(fp) | ||
4101 | mull3 r3,-156(fp),-148(fp) | ||
4102 | mull2 r0,-156(fp) | ||
4103 | addl3 -144(fp),-148(fp),r0 | ||
4104 | bicl3 #0,r0,-144(fp) | ||
4105 | cmpl -144(fp),-148(fp) | ||
4106 | bgequ noname.363 | ||
4107 | addl2 #65536,-156(fp) | ||
4108 | noname.363: | ||
4109 | movzwl -142(fp),r0 | ||
4110 | bicl2 #-65536,r0 | ||
4111 | addl2 r0,-156(fp) | ||
4112 | bicl3 #-65536,-144(fp),r0 | ||
4113 | ashl #16,r0,-148(fp) | ||
4114 | addl3 -148(fp),-152(fp),r0 | ||
4115 | bicl3 #0,r0,-152(fp) | ||
4116 | cmpl -152(fp),-148(fp) | ||
4117 | bgequ noname.364 | ||
4118 | incl -156(fp) | ||
4119 | noname.364: | ||
4120 | movl -152(fp),r1 | ||
4121 | movl -156(fp),r2 | ||
4122 | addl2 r1,r10 | ||
4123 | bicl2 #0,r10 | ||
4124 | cmpl r10,r1 | ||
4125 | bgequ noname.365 | ||
4126 | incl r2 | ||
4127 | noname.365: | ||
4128 | addl2 r2,r9 | ||
4129 | bicl2 #0,r9 | ||
4130 | cmpl r9,r2 | ||
4131 | bgequ noname.366 | ||
4132 | incl r8 | ||
4133 | noname.366: | ||
4134 | |||
4135 | movl r10,24(r11) | ||
4136 | |||
4137 | movl r9,28(r11) | ||
4138 | |||
4139 | ret | ||
4140 | |||
4141 | |||
4142 | |||
4143 | ;r=4 ;(AP) | ||
4144 | ;a=8 ;(AP) | ||
4145 | ;b=12 ;(AP) | ||
4146 | ;n=16 ;(AP) n by value (input) | ||
4147 | |||
4148 | .psect code,nowrt | ||
4149 | |||
4150 | .entry BN_SQR_COMBA8,^m<r2,r3,r4,r5,r6,r7,r8,r9> | ||
4151 | movab -444(sp),sp | ||
4152 | |||
4153 | clrq r8 | ||
4154 | |||
4155 | clrl r7 | ||
4156 | |||
4157 | movl 8(ap),r4 | ||
4158 | movl (r4),r3 | ||
4159 | bicl3 #-65536,r3,-4(fp) | ||
4160 | extzv #16,#16,r3,r0 | ||
4161 | bicl3 #-65536,r0,r3 | ||
4162 | movl -4(fp),r0 | ||
4163 | mull3 r0,r3,-8(fp) | ||
4164 | mull3 r0,r0,-4(fp) | ||
4165 | mull2 r3,r3 | ||
4166 | bicl3 #32767,-8(fp),r0 | ||
4167 | extzv #15,#17,r0,r0 | ||
4168 | addl2 r0,r3 | ||
4169 | bicl3 #-65536,-8(fp),r0 | ||
4170 | ashl #17,r0,-8(fp) | ||
4171 | addl3 -4(fp),-8(fp),r0 | ||
4172 | bicl3 #0,r0,-4(fp) | ||
4173 | cmpl -4(fp),-8(fp) | ||
4174 | bgequ noname.369 | ||
4175 | incl r3 | ||
4176 | noname.369: | ||
4177 | movl -4(fp),r1 | ||
4178 | movl r3,r2 | ||
4179 | addl2 r1,r9 | ||
4180 | bicl2 #0,r9 | ||
4181 | cmpl r9,r1 | ||
4182 | bgequ noname.370 | ||
4183 | incl r2 | ||
4184 | noname.370: | ||
4185 | addl2 r2,r8 | ||
4186 | bicl2 #0,r8 | ||
4187 | cmpl r8,r2 | ||
4188 | bgequ noname.371 | ||
4189 | incl r7 | ||
4190 | noname.371: | ||
4191 | |||
4192 | movl r9,@4(ap) | ||
4193 | |||
4194 | clrl r9 | ||
4195 | |||
4196 | movzwl 6(r4),r2 | ||
4197 | bicl3 #-65536,(r4),r3 | ||
4198 | movzwl 2(r4),r0 | ||
4199 | bicl2 #-65536,r0 | ||
4200 | bicl3 #-65536,4(r4),-20(fp) | ||
4201 | bicl3 #-65536,r2,-24(fp) | ||
4202 | mull3 r0,-20(fp),-12(fp) | ||
4203 | mull2 r3,-20(fp) | ||
4204 | mull3 r3,-24(fp),-16(fp) | ||
4205 | mull2 r0,-24(fp) | ||
4206 | addl3 -12(fp),-16(fp),r0 | ||
4207 | bicl3 #0,r0,-12(fp) | ||
4208 | cmpl -12(fp),-16(fp) | ||
4209 | bgequ noname.372 | ||
4210 | addl2 #65536,-24(fp) | ||
4211 | noname.372: | ||
4212 | movzwl -10(fp),r0 | ||
4213 | bicl2 #-65536,r0 | ||
4214 | addl2 r0,-24(fp) | ||
4215 | bicl3 #-65536,-12(fp),r0 | ||
4216 | ashl #16,r0,-16(fp) | ||
4217 | addl3 -16(fp),-20(fp),r0 | ||
4218 | bicl3 #0,r0,-20(fp) | ||
4219 | cmpl -20(fp),-16(fp) | ||
4220 | bgequ noname.373 | ||
4221 | incl -24(fp) | ||
4222 | noname.373: | ||
4223 | movl -20(fp),r3 | ||
4224 | movl -24(fp),r2 | ||
4225 | bbc #31,r2,noname.374 | ||
4226 | incl r9 | ||
4227 | noname.374: | ||
4228 | addl2 r2,r2 | ||
4229 | bicl2 #0,r2 | ||
4230 | bbc #31,r3,noname.375 | ||
4231 | incl r2 | ||
4232 | noname.375: | ||
4233 | addl2 r3,r3 | ||
4234 | bicl2 #0,r3 | ||
4235 | addl2 r3,r8 | ||
4236 | bicl2 #0,r8 | ||
4237 | cmpl r8,r3 | ||
4238 | bgequ noname.376 | ||
4239 | incl r2 | ||
4240 | bicl3 #0,r2,r0 | ||
4241 | bneq noname.376 | ||
4242 | incl r9 | ||
4243 | noname.376: | ||
4244 | addl2 r2,r7 | ||
4245 | bicl2 #0,r7 | ||
4246 | cmpl r7,r2 | ||
4247 | bgequ noname.377 | ||
4248 | incl r9 | ||
4249 | noname.377: | ||
4250 | |||
4251 | movl 4(ap),r0 | ||
4252 | movl r8,4(r0) | ||
4253 | |||
4254 | clrl r8 | ||
4255 | |||
4256 | movl 8(ap),r4 | ||
4257 | movl 4(r4),r3 | ||
4258 | bicl3 #-65536,r3,-28(fp) | ||
4259 | extzv #16,#16,r3,r0 | ||
4260 | bicl3 #-65536,r0,r3 | ||
4261 | movl -28(fp),r0 | ||
4262 | mull3 r0,r3,-32(fp) | ||
4263 | mull3 r0,r0,-28(fp) | ||
4264 | mull2 r3,r3 | ||
4265 | bicl3 #32767,-32(fp),r0 | ||
4266 | extzv #15,#17,r0,r0 | ||
4267 | addl2 r0,r3 | ||
4268 | bicl3 #-65536,-32(fp),r0 | ||
4269 | ashl #17,r0,-32(fp) | ||
4270 | addl3 -28(fp),-32(fp),r0 | ||
4271 | bicl3 #0,r0,-28(fp) | ||
4272 | cmpl -28(fp),-32(fp) | ||
4273 | bgequ noname.378 | ||
4274 | incl r3 | ||
4275 | noname.378: | ||
4276 | movl -28(fp),r1 | ||
4277 | movl r3,r2 | ||
4278 | addl2 r1,r7 | ||
4279 | bicl2 #0,r7 | ||
4280 | cmpl r7,r1 | ||
4281 | bgequ noname.379 | ||
4282 | incl r2 | ||
4283 | noname.379: | ||
4284 | addl2 r2,r9 | ||
4285 | bicl2 #0,r9 | ||
4286 | cmpl r9,r2 | ||
4287 | bgequ noname.380 | ||
4288 | incl r8 | ||
4289 | noname.380: | ||
4290 | |||
4291 | movzwl 10(r4),r2 | ||
4292 | bicl3 #-65536,(r4),r3 | ||
4293 | movzwl 2(r4),r0 | ||
4294 | bicl2 #-65536,r0 | ||
4295 | bicl3 #-65536,8(r4),-44(fp) | ||
4296 | bicl3 #-65536,r2,-48(fp) | ||
4297 | mull3 r0,-44(fp),-36(fp) | ||
4298 | mull2 r3,-44(fp) | ||
4299 | mull3 r3,-48(fp),-40(fp) | ||
4300 | mull2 r0,-48(fp) | ||
4301 | addl3 -36(fp),-40(fp),r0 | ||
4302 | bicl3 #0,r0,-36(fp) | ||
4303 | cmpl -36(fp),-40(fp) | ||
4304 | bgequ noname.381 | ||
4305 | addl2 #65536,-48(fp) | ||
4306 | noname.381: | ||
4307 | movzwl -34(fp),r0 | ||
4308 | bicl2 #-65536,r0 | ||
4309 | addl2 r0,-48(fp) | ||
4310 | bicl3 #-65536,-36(fp),r0 | ||
4311 | ashl #16,r0,-40(fp) | ||
4312 | addl3 -40(fp),-44(fp),r0 | ||
4313 | bicl3 #0,r0,-44(fp) | ||
4314 | cmpl -44(fp),-40(fp) | ||
4315 | bgequ noname.382 | ||
4316 | incl -48(fp) | ||
4317 | noname.382: | ||
4318 | movl -44(fp),r3 | ||
4319 | movl -48(fp),r2 | ||
4320 | bbc #31,r2,noname.383 | ||
4321 | incl r8 | ||
4322 | noname.383: | ||
4323 | addl2 r2,r2 | ||
4324 | bicl2 #0,r2 | ||
4325 | bbc #31,r3,noname.384 | ||
4326 | incl r2 | ||
4327 | noname.384: | ||
4328 | addl2 r3,r3 | ||
4329 | bicl2 #0,r3 | ||
4330 | addl2 r3,r7 | ||
4331 | bicl2 #0,r7 | ||
4332 | cmpl r7,r3 | ||
4333 | bgequ noname.385 | ||
4334 | incl r2 | ||
4335 | bicl3 #0,r2,r0 | ||
4336 | bneq noname.385 | ||
4337 | incl r8 | ||
4338 | noname.385: | ||
4339 | addl2 r2,r9 | ||
4340 | bicl2 #0,r9 | ||
4341 | cmpl r9,r2 | ||
4342 | bgequ noname.386 | ||
4343 | incl r8 | ||
4344 | noname.386: | ||
4345 | |||
4346 | movl 4(ap),r0 | ||
4347 | movl r7,8(r0) | ||
4348 | |||
4349 | clrl r7 | ||
4350 | |||
4351 | movl 8(ap),r0 | ||
4352 | movzwl 14(r0),r2 | ||
4353 | bicl3 #-65536,(r0),r3 | ||
4354 | movzwl 2(r0),r1 | ||
4355 | bicl2 #-65536,r1 | ||
4356 | bicl3 #-65536,12(r0),-60(fp) | ||
4357 | bicl3 #-65536,r2,-64(fp) | ||
4358 | mull3 r1,-60(fp),-52(fp) | ||
4359 | mull2 r3,-60(fp) | ||
4360 | mull3 r3,-64(fp),-56(fp) | ||
4361 | mull2 r1,-64(fp) | ||
4362 | addl3 -52(fp),-56(fp),r0 | ||
4363 | bicl3 #0,r0,-52(fp) | ||
4364 | cmpl -52(fp),-56(fp) | ||
4365 | bgequ noname.387 | ||
4366 | addl2 #65536,-64(fp) | ||
4367 | noname.387: | ||
4368 | movzwl -50(fp),r0 | ||
4369 | bicl2 #-65536,r0 | ||
4370 | addl2 r0,-64(fp) | ||
4371 | bicl3 #-65536,-52(fp),r0 | ||
4372 | ashl #16,r0,-56(fp) | ||
4373 | addl3 -56(fp),-60(fp),r0 | ||
4374 | bicl3 #0,r0,-60(fp) | ||
4375 | cmpl -60(fp),-56(fp) | ||
4376 | bgequ noname.388 | ||
4377 | incl -64(fp) | ||
4378 | noname.388: | ||
4379 | movl -60(fp),r3 | ||
4380 | movl -64(fp),r2 | ||
4381 | bbc #31,r2,noname.389 | ||
4382 | incl r7 | ||
4383 | noname.389: | ||
4384 | addl2 r2,r2 | ||
4385 | bicl2 #0,r2 | ||
4386 | bbc #31,r3,noname.390 | ||
4387 | incl r2 | ||
4388 | noname.390: | ||
4389 | addl2 r3,r3 | ||
4390 | bicl2 #0,r3 | ||
4391 | addl2 r3,r9 | ||
4392 | bicl2 #0,r9 | ||
4393 | cmpl r9,r3 | ||
4394 | bgequ noname.391 | ||
4395 | incl r2 | ||
4396 | bicl3 #0,r2,r0 | ||
4397 | bneq noname.391 | ||
4398 | incl r7 | ||
4399 | noname.391: | ||
4400 | addl2 r2,r8 | ||
4401 | bicl2 #0,r8 | ||
4402 | cmpl r8,r2 | ||
4403 | bgequ noname.392 | ||
4404 | incl r7 | ||
4405 | noname.392: | ||
4406 | |||
4407 | movl 8(ap),r0 | ||
4408 | movzwl 10(r0),r2 | ||
4409 | bicl3 #-65536,4(r0),r3 | ||
4410 | movzwl 6(r0),r1 | ||
4411 | bicl2 #-65536,r1 | ||
4412 | bicl3 #-65536,8(r0),-76(fp) | ||
4413 | bicl3 #-65536,r2,-80(fp) | ||
4414 | mull3 r1,-76(fp),-68(fp) | ||
4415 | mull2 r3,-76(fp) | ||
4416 | mull3 r3,-80(fp),-72(fp) | ||
4417 | mull2 r1,-80(fp) | ||
4418 | addl3 -68(fp),-72(fp),r0 | ||
4419 | bicl3 #0,r0,-68(fp) | ||
4420 | cmpl -68(fp),-72(fp) | ||
4421 | bgequ noname.393 | ||
4422 | addl2 #65536,-80(fp) | ||
4423 | noname.393: | ||
4424 | movzwl -66(fp),r0 | ||
4425 | bicl2 #-65536,r0 | ||
4426 | addl2 r0,-80(fp) | ||
4427 | bicl3 #-65536,-68(fp),r0 | ||
4428 | ashl #16,r0,-72(fp) | ||
4429 | addl3 -72(fp),-76(fp),r0 | ||
4430 | bicl3 #0,r0,-76(fp) | ||
4431 | cmpl -76(fp),-72(fp) | ||
4432 | bgequ noname.394 | ||
4433 | incl -80(fp) | ||
4434 | noname.394: | ||
4435 | movl -76(fp),r3 | ||
4436 | movl -80(fp),r2 | ||
4437 | bbc #31,r2,noname.395 | ||
4438 | incl r7 | ||
4439 | noname.395: | ||
4440 | addl2 r2,r2 | ||
4441 | bicl2 #0,r2 | ||
4442 | bbc #31,r3,noname.396 | ||
4443 | incl r2 | ||
4444 | noname.396: | ||
4445 | addl2 r3,r3 | ||
4446 | bicl2 #0,r3 | ||
4447 | addl2 r3,r9 | ||
4448 | bicl2 #0,r9 | ||
4449 | cmpl r9,r3 | ||
4450 | bgequ noname.397 | ||
4451 | incl r2 | ||
4452 | bicl3 #0,r2,r0 | ||
4453 | bneq noname.397 | ||
4454 | incl r7 | ||
4455 | noname.397: | ||
4456 | addl2 r2,r8 | ||
4457 | bicl2 #0,r8 | ||
4458 | cmpl r8,r2 | ||
4459 | bgequ noname.398 | ||
4460 | incl r7 | ||
4461 | noname.398: | ||
4462 | |||
4463 | movl 4(ap),r0 | ||
4464 | movl r9,12(r0) | ||
4465 | |||
4466 | clrl r9 | ||
4467 | |||
4468 | movl 8(ap),r2 | ||
4469 | movl 8(r2),r4 | ||
4470 | bicl3 #-65536,r4,-84(fp) | ||
4471 | extzv #16,#16,r4,r0 | ||
4472 | bicl3 #-65536,r0,r4 | ||
4473 | movl -84(fp),r0 | ||
4474 | mull3 r0,r4,-88(fp) | ||
4475 | mull3 r0,r0,-84(fp) | ||
4476 | mull2 r4,r4 | ||
4477 | bicl3 #32767,-88(fp),r0 | ||
4478 | extzv #15,#17,r0,r0 | ||
4479 | addl2 r0,r4 | ||
4480 | bicl3 #-65536,-88(fp),r0 | ||
4481 | ashl #17,r0,-88(fp) | ||
4482 | addl3 -84(fp),-88(fp),r0 | ||
4483 | bicl3 #0,r0,-84(fp) | ||
4484 | cmpl -84(fp),-88(fp) | ||
4485 | bgequ noname.399 | ||
4486 | incl r4 | ||
4487 | noname.399: | ||
4488 | movl -84(fp),r1 | ||
4489 | movl r4,r3 | ||
4490 | addl2 r1,r8 | ||
4491 | bicl2 #0,r8 | ||
4492 | cmpl r8,r1 | ||
4493 | bgequ noname.400 | ||
4494 | incl r3 | ||
4495 | noname.400: | ||
4496 | addl2 r3,r7 | ||
4497 | bicl2 #0,r7 | ||
4498 | cmpl r7,r3 | ||
4499 | bgequ noname.401 | ||
4500 | incl r9 | ||
4501 | noname.401: | ||
4502 | |||
4503 | movzwl 14(r2),r3 | ||
4504 | bicl3 #-65536,4(r2),r1 | ||
4505 | movzwl 6(r2),r0 | ||
4506 | bicl2 #-65536,r0 | ||
4507 | bicl3 #-65536,12(r2),-100(fp) | ||
4508 | bicl3 #-65536,r3,-104(fp) | ||
4509 | mull3 r0,-100(fp),-92(fp) | ||
4510 | mull2 r1,-100(fp) | ||
4511 | mull3 r1,-104(fp),-96(fp) | ||
4512 | mull2 r0,-104(fp) | ||
4513 | addl3 -92(fp),-96(fp),r0 | ||
4514 | bicl3 #0,r0,-92(fp) | ||
4515 | cmpl -92(fp),-96(fp) | ||
4516 | bgequ noname.402 | ||
4517 | addl2 #65536,-104(fp) | ||
4518 | noname.402: | ||
4519 | movzwl -90(fp),r0 | ||
4520 | bicl2 #-65536,r0 | ||
4521 | addl2 r0,-104(fp) | ||
4522 | bicl3 #-65536,-92(fp),r0 | ||
4523 | ashl #16,r0,-96(fp) | ||
4524 | addl3 -96(fp),-100(fp),r0 | ||
4525 | bicl3 #0,r0,-100(fp) | ||
4526 | cmpl -100(fp),-96(fp) | ||
4527 | bgequ noname.403 | ||
4528 | incl -104(fp) | ||
4529 | noname.403: | ||
4530 | movl -100(fp),r3 | ||
4531 | movl -104(fp),r2 | ||
4532 | bbc #31,r2,noname.404 | ||
4533 | incl r9 | ||
4534 | noname.404: | ||
4535 | addl2 r2,r2 | ||
4536 | bicl2 #0,r2 | ||
4537 | bbc #31,r3,noname.405 | ||
4538 | incl r2 | ||
4539 | noname.405: | ||
4540 | addl2 r3,r3 | ||
4541 | bicl2 #0,r3 | ||
4542 | addl2 r3,r8 | ||
4543 | bicl2 #0,r8 | ||
4544 | cmpl r8,r3 | ||
4545 | bgequ noname.406 | ||
4546 | incl r2 | ||
4547 | bicl3 #0,r2,r0 | ||
4548 | bneq noname.406 | ||
4549 | incl r9 | ||
4550 | noname.406: | ||
4551 | addl2 r2,r7 | ||
4552 | bicl2 #0,r7 | ||
4553 | cmpl r7,r2 | ||
4554 | bgequ noname.407 | ||
4555 | incl r9 | ||
4556 | noname.407: | ||
4557 | |||
4558 | movl 8(ap),r0 | ||
4559 | movzwl 18(r0),r2 | ||
4560 | bicl3 #-65536,(r0),r3 | ||
4561 | movzwl 2(r0),r1 | ||
4562 | bicl2 #-65536,r1 | ||
4563 | bicl3 #-65536,16(r0),-116(fp) | ||
4564 | bicl3 #-65536,r2,-120(fp) | ||
4565 | mull3 r1,-116(fp),-108(fp) | ||
4566 | mull2 r3,-116(fp) | ||
4567 | mull3 r3,-120(fp),-112(fp) | ||
4568 | mull2 r1,-120(fp) | ||
4569 | addl3 -108(fp),-112(fp),r0 | ||
4570 | bicl3 #0,r0,-108(fp) | ||
4571 | cmpl -108(fp),-112(fp) | ||
4572 | bgequ noname.408 | ||
4573 | addl2 #65536,-120(fp) | ||
4574 | noname.408: | ||
4575 | movzwl -106(fp),r0 | ||
4576 | bicl2 #-65536,r0 | ||
4577 | addl2 r0,-120(fp) | ||
4578 | bicl3 #-65536,-108(fp),r0 | ||
4579 | ashl #16,r0,-112(fp) | ||
4580 | addl3 -112(fp),-116(fp),r0 | ||
4581 | bicl3 #0,r0,-116(fp) | ||
4582 | cmpl -116(fp),-112(fp) | ||
4583 | bgequ noname.409 | ||
4584 | incl -120(fp) | ||
4585 | noname.409: | ||
4586 | movl -116(fp),r3 | ||
4587 | movl -120(fp),r2 | ||
4588 | bbc #31,r2,noname.410 | ||
4589 | incl r9 | ||
4590 | noname.410: | ||
4591 | addl2 r2,r2 | ||
4592 | bicl2 #0,r2 | ||
4593 | bbc #31,r3,noname.411 | ||
4594 | incl r2 | ||
4595 | noname.411: | ||
4596 | addl2 r3,r3 | ||
4597 | bicl2 #0,r3 | ||
4598 | addl2 r3,r8 | ||
4599 | bicl2 #0,r8 | ||
4600 | cmpl r8,r3 | ||
4601 | bgequ noname.412 | ||
4602 | incl r2 | ||
4603 | bicl3 #0,r2,r0 | ||
4604 | bneq noname.412 | ||
4605 | incl r9 | ||
4606 | noname.412: | ||
4607 | addl2 r2,r7 | ||
4608 | bicl2 #0,r7 | ||
4609 | cmpl r7,r2 | ||
4610 | bgequ noname.413 | ||
4611 | incl r9 | ||
4612 | noname.413: | ||
4613 | |||
4614 | movl 4(ap),r0 | ||
4615 | movl r8,16(r0) | ||
4616 | |||
4617 | clrl r8 | ||
4618 | |||
4619 | movl 8(ap),r0 | ||
4620 | movzwl 22(r0),r2 | ||
4621 | bicl3 #-65536,(r0),r3 | ||
4622 | movzwl 2(r0),r1 | ||
4623 | bicl2 #-65536,r1 | ||
4624 | bicl3 #-65536,20(r0),-132(fp) | ||
4625 | bicl3 #-65536,r2,-136(fp) | ||
4626 | mull3 r1,-132(fp),-124(fp) | ||
4627 | mull2 r3,-132(fp) | ||
4628 | mull3 r3,-136(fp),-128(fp) | ||
4629 | mull2 r1,-136(fp) | ||
4630 | addl3 -124(fp),-128(fp),r0 | ||
4631 | bicl3 #0,r0,-124(fp) | ||
4632 | cmpl -124(fp),-128(fp) | ||
4633 | bgequ noname.414 | ||
4634 | addl2 #65536,-136(fp) | ||
4635 | noname.414: | ||
4636 | movzwl -122(fp),r0 | ||
4637 | bicl2 #-65536,r0 | ||
4638 | addl2 r0,-136(fp) | ||
4639 | bicl3 #-65536,-124(fp),r0 | ||
4640 | ashl #16,r0,-128(fp) | ||
4641 | addl3 -128(fp),-132(fp),r0 | ||
4642 | bicl3 #0,r0,-132(fp) | ||
4643 | cmpl -132(fp),-128(fp) | ||
4644 | bgequ noname.415 | ||
4645 | incl -136(fp) | ||
4646 | noname.415: | ||
4647 | movl -132(fp),r3 | ||
4648 | movl -136(fp),r2 | ||
4649 | bbc #31,r2,noname.416 | ||
4650 | incl r8 | ||
4651 | noname.416: | ||
4652 | addl2 r2,r2 | ||
4653 | bicl2 #0,r2 | ||
4654 | bbc #31,r3,noname.417 | ||
4655 | incl r2 | ||
4656 | noname.417: | ||
4657 | addl2 r3,r3 | ||
4658 | bicl2 #0,r3 | ||
4659 | addl2 r3,r7 | ||
4660 | bicl2 #0,r7 | ||
4661 | cmpl r7,r3 | ||
4662 | bgequ noname.418 | ||
4663 | incl r2 | ||
4664 | bicl3 #0,r2,r0 | ||
4665 | bneq noname.418 | ||
4666 | incl r8 | ||
4667 | noname.418: | ||
4668 | addl2 r2,r9 | ||
4669 | bicl2 #0,r9 | ||
4670 | cmpl r9,r2 | ||
4671 | bgequ noname.419 | ||
4672 | incl r8 | ||
4673 | noname.419: | ||
4674 | |||
4675 | movl 8(ap),r0 | ||
4676 | movzwl 18(r0),r2 | ||
4677 | bicl3 #-65536,4(r0),r3 | ||
4678 | movzwl 6(r0),r1 | ||
4679 | bicl2 #-65536,r1 | ||
4680 | bicl3 #-65536,16(r0),-148(fp) | ||
4681 | bicl3 #-65536,r2,-152(fp) | ||
4682 | mull3 r1,-148(fp),-140(fp) | ||
4683 | mull2 r3,-148(fp) | ||
4684 | mull3 r3,-152(fp),-144(fp) | ||
4685 | mull2 r1,-152(fp) | ||
4686 | addl3 -140(fp),-144(fp),r0 | ||
4687 | bicl3 #0,r0,-140(fp) | ||
4688 | cmpl -140(fp),-144(fp) | ||
4689 | bgequ noname.420 | ||
4690 | addl2 #65536,-152(fp) | ||
4691 | noname.420: | ||
4692 | movzwl -138(fp),r0 | ||
4693 | bicl2 #-65536,r0 | ||
4694 | addl2 r0,-152(fp) | ||
4695 | bicl3 #-65536,-140(fp),r0 | ||
4696 | ashl #16,r0,-144(fp) | ||
4697 | addl3 -144(fp),-148(fp),r0 | ||
4698 | bicl3 #0,r0,-148(fp) | ||
4699 | cmpl -148(fp),-144(fp) | ||
4700 | bgequ noname.421 | ||
4701 | incl -152(fp) | ||
4702 | noname.421: | ||
4703 | movl -148(fp),r3 | ||
4704 | movl -152(fp),r2 | ||
4705 | bbc #31,r2,noname.422 | ||
4706 | incl r8 | ||
4707 | noname.422: | ||
4708 | addl2 r2,r2 | ||
4709 | bicl2 #0,r2 | ||
4710 | bbc #31,r3,noname.423 | ||
4711 | incl r2 | ||
4712 | noname.423: | ||
4713 | addl2 r3,r3 | ||
4714 | bicl2 #0,r3 | ||
4715 | addl2 r3,r7 | ||
4716 | bicl2 #0,r7 | ||
4717 | cmpl r7,r3 | ||
4718 | bgequ noname.424 | ||
4719 | incl r2 | ||
4720 | bicl3 #0,r2,r0 | ||
4721 | bneq noname.424 | ||
4722 | incl r8 | ||
4723 | noname.424: | ||
4724 | addl2 r2,r9 | ||
4725 | bicl2 #0,r9 | ||
4726 | cmpl r9,r2 | ||
4727 | bgequ noname.425 | ||
4728 | incl r8 | ||
4729 | noname.425: | ||
4730 | |||
4731 | movl 8(ap),r0 | ||
4732 | movzwl 14(r0),r2 | ||
4733 | bicl3 #-65536,8(r0),r3 | ||
4734 | movzwl 10(r0),r1 | ||
4735 | bicl2 #-65536,r1 | ||
4736 | bicl3 #-65536,12(r0),-164(fp) | ||
4737 | bicl3 #-65536,r2,-168(fp) | ||
4738 | mull3 r1,-164(fp),-156(fp) | ||
4739 | mull2 r3,-164(fp) | ||
4740 | mull3 r3,-168(fp),-160(fp) | ||
4741 | mull2 r1,-168(fp) | ||
4742 | addl3 -156(fp),-160(fp),r0 | ||
4743 | bicl3 #0,r0,-156(fp) | ||
4744 | cmpl -156(fp),-160(fp) | ||
4745 | bgequ noname.426 | ||
4746 | addl2 #65536,-168(fp) | ||
4747 | noname.426: | ||
4748 | movzwl -154(fp),r0 | ||
4749 | bicl2 #-65536,r0 | ||
4750 | addl2 r0,-168(fp) | ||
4751 | bicl3 #-65536,-156(fp),r0 | ||
4752 | ashl #16,r0,-160(fp) | ||
4753 | addl3 -160(fp),-164(fp),r0 | ||
4754 | bicl3 #0,r0,-164(fp) | ||
4755 | cmpl -164(fp),-160(fp) | ||
4756 | bgequ noname.427 | ||
4757 | incl -168(fp) | ||
4758 | noname.427: | ||
4759 | movl -164(fp),r3 | ||
4760 | movl -168(fp),r2 | ||
4761 | bbc #31,r2,noname.428 | ||
4762 | incl r8 | ||
4763 | noname.428: | ||
4764 | addl2 r2,r2 | ||
4765 | bicl2 #0,r2 | ||
4766 | bbc #31,r3,noname.429 | ||
4767 | incl r2 | ||
4768 | noname.429: | ||
4769 | addl2 r3,r3 | ||
4770 | bicl2 #0,r3 | ||
4771 | addl2 r3,r7 | ||
4772 | bicl2 #0,r7 | ||
4773 | cmpl r7,r3 | ||
4774 | bgequ noname.430 | ||
4775 | incl r2 | ||
4776 | bicl3 #0,r2,r0 | ||
4777 | bneq noname.430 | ||
4778 | incl r8 | ||
4779 | noname.430: | ||
4780 | addl2 r2,r9 | ||
4781 | bicl2 #0,r9 | ||
4782 | cmpl r9,r2 | ||
4783 | bgequ noname.431 | ||
4784 | incl r8 | ||
4785 | noname.431: | ||
4786 | |||
4787 | movl 4(ap),r0 | ||
4788 | movl r7,20(r0) | ||
4789 | |||
4790 | clrl r7 | ||
4791 | |||
4792 | movl 8(ap),r2 | ||
4793 | movl 12(r2),r4 | ||
4794 | bicl3 #-65536,r4,-172(fp) | ||
4795 | extzv #16,#16,r4,r0 | ||
4796 | bicl3 #-65536,r0,r4 | ||
4797 | movl -172(fp),r0 | ||
4798 | mull3 r0,r4,-176(fp) | ||
4799 | mull3 r0,r0,-172(fp) | ||
4800 | mull2 r4,r4 | ||
4801 | bicl3 #32767,-176(fp),r0 | ||
4802 | extzv #15,#17,r0,r0 | ||
4803 | addl2 r0,r4 | ||
4804 | bicl3 #-65536,-176(fp),r0 | ||
4805 | ashl #17,r0,-176(fp) | ||
4806 | addl3 -172(fp),-176(fp),r0 | ||
4807 | bicl3 #0,r0,-172(fp) | ||
4808 | cmpl -172(fp),-176(fp) | ||
4809 | bgequ noname.432 | ||
4810 | incl r4 | ||
4811 | noname.432: | ||
4812 | movl -172(fp),r1 | ||
4813 | movl r4,r3 | ||
4814 | addl2 r1,r9 | ||
4815 | bicl2 #0,r9 | ||
4816 | cmpl r9,r1 | ||
4817 | bgequ noname.433 | ||
4818 | incl r3 | ||
4819 | noname.433: | ||
4820 | addl2 r3,r8 | ||
4821 | bicl2 #0,r8 | ||
4822 | cmpl r8,r3 | ||
4823 | bgequ noname.434 | ||
4824 | incl r7 | ||
4825 | noname.434: | ||
4826 | |||
4827 | movzwl 18(r2),r3 | ||
4828 | bicl3 #-65536,8(r2),r1 | ||
4829 | movzwl 10(r2),r0 | ||
4830 | bicl2 #-65536,r0 | ||
4831 | bicl3 #-65536,16(r2),-188(fp) | ||
4832 | bicl3 #-65536,r3,-192(fp) | ||
4833 | mull3 r0,-188(fp),-180(fp) | ||
4834 | mull2 r1,-188(fp) | ||
4835 | mull3 r1,-192(fp),-184(fp) | ||
4836 | mull2 r0,-192(fp) | ||
4837 | addl3 -180(fp),-184(fp),r0 | ||
4838 | bicl3 #0,r0,-180(fp) | ||
4839 | cmpl -180(fp),-184(fp) | ||
4840 | bgequ noname.435 | ||
4841 | addl2 #65536,-192(fp) | ||
4842 | noname.435: | ||
4843 | movzwl -178(fp),r0 | ||
4844 | bicl2 #-65536,r0 | ||
4845 | addl2 r0,-192(fp) | ||
4846 | bicl3 #-65536,-180(fp),r0 | ||
4847 | ashl #16,r0,-184(fp) | ||
4848 | addl3 -184(fp),-188(fp),r0 | ||
4849 | bicl3 #0,r0,-188(fp) | ||
4850 | cmpl -188(fp),-184(fp) | ||
4851 | bgequ noname.436 | ||
4852 | incl -192(fp) | ||
4853 | noname.436: | ||
4854 | movl -188(fp),r3 | ||
4855 | movl -192(fp),r2 | ||
4856 | bbc #31,r2,noname.437 | ||
4857 | incl r7 | ||
4858 | noname.437: | ||
4859 | addl2 r2,r2 | ||
4860 | bicl2 #0,r2 | ||
4861 | bbc #31,r3,noname.438 | ||
4862 | incl r2 | ||
4863 | noname.438: | ||
4864 | addl2 r3,r3 | ||
4865 | bicl2 #0,r3 | ||
4866 | addl2 r3,r9 | ||
4867 | bicl2 #0,r9 | ||
4868 | cmpl r9,r3 | ||
4869 | bgequ noname.439 | ||
4870 | incl r2 | ||
4871 | bicl3 #0,r2,r0 | ||
4872 | bneq noname.439 | ||
4873 | incl r7 | ||
4874 | noname.439: | ||
4875 | addl2 r2,r8 | ||
4876 | bicl2 #0,r8 | ||
4877 | cmpl r8,r2 | ||
4878 | bgequ noname.440 | ||
4879 | incl r7 | ||
4880 | noname.440: | ||
4881 | |||
4882 | movl 8(ap),r0 | ||
4883 | movzwl 22(r0),r2 | ||
4884 | bicl3 #-65536,4(r0),r3 | ||
4885 | movzwl 6(r0),r1 | ||
4886 | bicl2 #-65536,r1 | ||
4887 | bicl3 #-65536,20(r0),-204(fp) | ||
4888 | bicl3 #-65536,r2,-208(fp) | ||
4889 | mull3 r1,-204(fp),-196(fp) | ||
4890 | mull2 r3,-204(fp) | ||
4891 | mull3 r3,-208(fp),-200(fp) | ||
4892 | mull2 r1,-208(fp) | ||
4893 | addl3 -196(fp),-200(fp),r0 | ||
4894 | bicl3 #0,r0,-196(fp) | ||
4895 | cmpl -196(fp),-200(fp) | ||
4896 | bgequ noname.441 | ||
4897 | addl2 #65536,-208(fp) | ||
4898 | noname.441: | ||
4899 | movzwl -194(fp),r0 | ||
4900 | bicl2 #-65536,r0 | ||
4901 | addl2 r0,-208(fp) | ||
4902 | bicl3 #-65536,-196(fp),r0 | ||
4903 | ashl #16,r0,-200(fp) | ||
4904 | addl3 -200(fp),-204(fp),r0 | ||
4905 | bicl3 #0,r0,-204(fp) | ||
4906 | cmpl -204(fp),-200(fp) | ||
4907 | bgequ noname.442 | ||
4908 | incl -208(fp) | ||
4909 | noname.442: | ||
4910 | movl -204(fp),r3 | ||
4911 | movl -208(fp),r2 | ||
4912 | bbc #31,r2,noname.443 | ||
4913 | incl r7 | ||
4914 | noname.443: | ||
4915 | addl2 r2,r2 | ||
4916 | bicl2 #0,r2 | ||
4917 | bbc #31,r3,noname.444 | ||
4918 | incl r2 | ||
4919 | noname.444: | ||
4920 | addl2 r3,r3 | ||
4921 | bicl2 #0,r3 | ||
4922 | addl2 r3,r9 | ||
4923 | bicl2 #0,r9 | ||
4924 | cmpl r9,r3 | ||
4925 | bgequ noname.445 | ||
4926 | incl r2 | ||
4927 | bicl3 #0,r2,r0 | ||
4928 | bneq noname.445 | ||
4929 | incl r7 | ||
4930 | noname.445: | ||
4931 | addl2 r2,r8 | ||
4932 | bicl2 #0,r8 | ||
4933 | cmpl r8,r2 | ||
4934 | bgequ noname.446 | ||
4935 | incl r7 | ||
4936 | noname.446: | ||
4937 | |||
4938 | movl 8(ap),r0 | ||
4939 | movzwl 26(r0),r2 | ||
4940 | bicl3 #-65536,(r0),r3 | ||
4941 | movzwl 2(r0),r1 | ||
4942 | bicl2 #-65536,r1 | ||
4943 | bicl3 #-65536,24(r0),-220(fp) | ||
4944 | bicl3 #-65536,r2,-224(fp) | ||
4945 | mull3 r1,-220(fp),-212(fp) | ||
4946 | mull2 r3,-220(fp) | ||
4947 | mull3 r3,-224(fp),-216(fp) | ||
4948 | mull2 r1,-224(fp) | ||
4949 | addl3 -212(fp),-216(fp),r0 | ||
4950 | bicl3 #0,r0,-212(fp) | ||
4951 | cmpl -212(fp),-216(fp) | ||
4952 | bgequ noname.447 | ||
4953 | addl2 #65536,-224(fp) | ||
4954 | noname.447: | ||
4955 | movzwl -210(fp),r0 | ||
4956 | bicl2 #-65536,r0 | ||
4957 | addl2 r0,-224(fp) | ||
4958 | bicl3 #-65536,-212(fp),r0 | ||
4959 | ashl #16,r0,-216(fp) | ||
4960 | addl3 -216(fp),-220(fp),r0 | ||
4961 | bicl3 #0,r0,-220(fp) | ||
4962 | cmpl -220(fp),-216(fp) | ||
4963 | bgequ noname.448 | ||
4964 | incl -224(fp) | ||
4965 | noname.448: | ||
4966 | movl -220(fp),r3 | ||
4967 | movl -224(fp),r2 | ||
4968 | bbc #31,r2,noname.449 | ||
4969 | incl r7 | ||
4970 | noname.449: | ||
4971 | addl2 r2,r2 | ||
4972 | bicl2 #0,r2 | ||
4973 | bbc #31,r3,noname.450 | ||
4974 | incl r2 | ||
4975 | noname.450: | ||
4976 | addl2 r3,r3 | ||
4977 | bicl2 #0,r3 | ||
4978 | addl2 r3,r9 | ||
4979 | bicl2 #0,r9 | ||
4980 | cmpl r9,r3 | ||
4981 | bgequ noname.451 | ||
4982 | incl r2 | ||
4983 | bicl3 #0,r2,r0 | ||
4984 | bneq noname.451 | ||
4985 | incl r7 | ||
4986 | noname.451: | ||
4987 | addl2 r2,r8 | ||
4988 | bicl2 #0,r8 | ||
4989 | cmpl r8,r2 | ||
4990 | bgequ noname.452 | ||
4991 | incl r7 | ||
4992 | noname.452: | ||
4993 | |||
4994 | movl 4(ap),r0 | ||
4995 | movl r9,24(r0) | ||
4996 | |||
4997 | clrl r9 | ||
4998 | |||
4999 | movl 8(ap),r0 | ||
5000 | movzwl 30(r0),r2 | ||
5001 | bicl3 #-65536,(r0),r3 | ||
5002 | movzwl 2(r0),r1 | ||
5003 | bicl2 #-65536,r1 | ||
5004 | bicl3 #-65536,28(r0),-236(fp) | ||
5005 | bicl3 #-65536,r2,-240(fp) | ||
5006 | mull3 r1,-236(fp),-228(fp) | ||
5007 | mull2 r3,-236(fp) | ||
5008 | mull3 r3,-240(fp),-232(fp) | ||
5009 | mull2 r1,-240(fp) | ||
5010 | addl3 -228(fp),-232(fp),r0 | ||
5011 | bicl3 #0,r0,-228(fp) | ||
5012 | cmpl -228(fp),-232(fp) | ||
5013 | bgequ noname.453 | ||
5014 | addl2 #65536,-240(fp) | ||
5015 | noname.453: | ||
5016 | movzwl -226(fp),r0 | ||
5017 | bicl2 #-65536,r0 | ||
5018 | addl2 r0,-240(fp) | ||
5019 | bicl3 #-65536,-228(fp),r0 | ||
5020 | ashl #16,r0,-232(fp) | ||
5021 | addl3 -232(fp),-236(fp),r0 | ||
5022 | bicl3 #0,r0,-236(fp) | ||
5023 | cmpl -236(fp),-232(fp) | ||
5024 | bgequ noname.454 | ||
5025 | incl -240(fp) | ||
5026 | noname.454: | ||
5027 | movl -236(fp),r3 | ||
5028 | movl -240(fp),r2 | ||
5029 | bbc #31,r2,noname.455 | ||
5030 | incl r9 | ||
5031 | noname.455: | ||
5032 | addl2 r2,r2 | ||
5033 | bicl2 #0,r2 | ||
5034 | bbc #31,r3,noname.456 | ||
5035 | incl r2 | ||
5036 | noname.456: | ||
5037 | addl2 r3,r3 | ||
5038 | bicl2 #0,r3 | ||
5039 | addl2 r3,r8 | ||
5040 | bicl2 #0,r8 | ||
5041 | cmpl r8,r3 | ||
5042 | bgequ noname.457 | ||
5043 | incl r2 | ||
5044 | bicl3 #0,r2,r0 | ||
5045 | bneq noname.457 | ||
5046 | incl r9 | ||
5047 | noname.457: | ||
5048 | addl2 r2,r7 | ||
5049 | bicl2 #0,r7 | ||
5050 | cmpl r7,r2 | ||
5051 | bgequ noname.458 | ||
5052 | incl r9 | ||
5053 | noname.458: | ||
5054 | |||
5055 | movl 8(ap),r0 | ||
5056 | movzwl 26(r0),r2 | ||
5057 | bicl3 #-65536,4(r0),r3 | ||
5058 | movzwl 6(r0),r1 | ||
5059 | bicl2 #-65536,r1 | ||
5060 | bicl3 #-65536,24(r0),-252(fp) | ||
5061 | bicl3 #-65536,r2,-256(fp) | ||
5062 | mull3 r1,-252(fp),-244(fp) | ||
5063 | mull2 r3,-252(fp) | ||
5064 | mull3 r3,-256(fp),-248(fp) | ||
5065 | mull2 r1,-256(fp) | ||
5066 | addl3 -244(fp),-248(fp),r0 | ||
5067 | bicl3 #0,r0,-244(fp) | ||
5068 | cmpl -244(fp),-248(fp) | ||
5069 | bgequ noname.459 | ||
5070 | addl2 #65536,-256(fp) | ||
5071 | noname.459: | ||
5072 | movzwl -242(fp),r0 | ||
5073 | bicl2 #-65536,r0 | ||
5074 | addl2 r0,-256(fp) | ||
5075 | bicl3 #-65536,-244(fp),r0 | ||
5076 | ashl #16,r0,-248(fp) | ||
5077 | addl3 -248(fp),-252(fp),r0 | ||
5078 | bicl3 #0,r0,-252(fp) | ||
5079 | cmpl -252(fp),-248(fp) | ||
5080 | bgequ noname.460 | ||
5081 | incl -256(fp) | ||
5082 | noname.460: | ||
5083 | movl -252(fp),r3 | ||
5084 | movl -256(fp),r2 | ||
5085 | bbc #31,r2,noname.461 | ||
5086 | incl r9 | ||
5087 | noname.461: | ||
5088 | addl2 r2,r2 | ||
5089 | bicl2 #0,r2 | ||
5090 | bbc #31,r3,noname.462 | ||
5091 | incl r2 | ||
5092 | noname.462: | ||
5093 | addl2 r3,r3 | ||
5094 | bicl2 #0,r3 | ||
5095 | addl2 r3,r8 | ||
5096 | bicl2 #0,r8 | ||
5097 | cmpl r8,r3 | ||
5098 | bgequ noname.463 | ||
5099 | incl r2 | ||
5100 | bicl3 #0,r2,r0 | ||
5101 | bneq noname.463 | ||
5102 | incl r9 | ||
5103 | noname.463: | ||
5104 | addl2 r2,r7 | ||
5105 | bicl2 #0,r7 | ||
5106 | cmpl r7,r2 | ||
5107 | bgequ noname.464 | ||
5108 | incl r9 | ||
5109 | noname.464: | ||
5110 | |||
5111 | movl 8(ap),r0 | ||
5112 | movzwl 22(r0),r2 | ||
5113 | bicl3 #-65536,8(r0),r3 | ||
5114 | movzwl 10(r0),r1 | ||
5115 | bicl2 #-65536,r1 | ||
5116 | bicl3 #-65536,20(r0),-268(fp) | ||
5117 | bicl3 #-65536,r2,-272(fp) | ||
5118 | mull3 r1,-268(fp),-260(fp) | ||
5119 | mull2 r3,-268(fp) | ||
5120 | mull3 r3,-272(fp),-264(fp) | ||
5121 | mull2 r1,-272(fp) | ||
5122 | addl3 -260(fp),-264(fp),r0 | ||
5123 | bicl3 #0,r0,-260(fp) | ||
5124 | cmpl -260(fp),-264(fp) | ||
5125 | bgequ noname.465 | ||
5126 | addl2 #65536,-272(fp) | ||
5127 | noname.465: | ||
5128 | movzwl -258(fp),r0 | ||
5129 | bicl2 #-65536,r0 | ||
5130 | addl2 r0,-272(fp) | ||
5131 | bicl3 #-65536,-260(fp),r0 | ||
5132 | ashl #16,r0,-264(fp) | ||
5133 | addl3 -264(fp),-268(fp),r0 | ||
5134 | bicl3 #0,r0,-268(fp) | ||
5135 | cmpl -268(fp),-264(fp) | ||
5136 | bgequ noname.466 | ||
5137 | incl -272(fp) | ||
5138 | noname.466: | ||
5139 | movl -268(fp),r3 | ||
5140 | movl -272(fp),r2 | ||
5141 | bbc #31,r2,noname.467 | ||
5142 | incl r9 | ||
5143 | noname.467: | ||
5144 | addl2 r2,r2 | ||
5145 | bicl2 #0,r2 | ||
5146 | bbc #31,r3,noname.468 | ||
5147 | incl r2 | ||
5148 | noname.468: | ||
5149 | addl2 r3,r3 | ||
5150 | bicl2 #0,r3 | ||
5151 | addl2 r3,r8 | ||
5152 | bicl2 #0,r8 | ||
5153 | cmpl r8,r3 | ||
5154 | bgequ noname.469 | ||
5155 | incl r2 | ||
5156 | bicl3 #0,r2,r0 | ||
5157 | bneq noname.469 | ||
5158 | incl r9 | ||
5159 | noname.469: | ||
5160 | addl2 r2,r7 | ||
5161 | bicl2 #0,r7 | ||
5162 | cmpl r7,r2 | ||
5163 | bgequ noname.470 | ||
5164 | incl r9 | ||
5165 | noname.470: | ||
5166 | |||
5167 | movl 8(ap),r0 | ||
5168 | movzwl 18(r0),r2 | ||
5169 | bicl3 #-65536,12(r0),r3 | ||
5170 | movzwl 14(r0),r1 | ||
5171 | bicl2 #-65536,r1 | ||
5172 | bicl3 #-65536,16(r0),-284(fp) | ||
5173 | bicl3 #-65536,r2,-288(fp) | ||
5174 | mull3 r1,-284(fp),-276(fp) | ||
5175 | mull2 r3,-284(fp) | ||
5176 | mull3 r3,-288(fp),-280(fp) | ||
5177 | mull2 r1,-288(fp) | ||
5178 | addl3 -276(fp),-280(fp),r0 | ||
5179 | bicl3 #0,r0,-276(fp) | ||
5180 | cmpl -276(fp),-280(fp) | ||
5181 | bgequ noname.471 | ||
5182 | addl2 #65536,-288(fp) | ||
5183 | noname.471: | ||
5184 | movzwl -274(fp),r0 | ||
5185 | bicl2 #-65536,r0 | ||
5186 | addl2 r0,-288(fp) | ||
5187 | bicl3 #-65536,-276(fp),r0 | ||
5188 | ashl #16,r0,-280(fp) | ||
5189 | addl3 -280(fp),-284(fp),r0 | ||
5190 | bicl3 #0,r0,-284(fp) | ||
5191 | cmpl -284(fp),-280(fp) | ||
5192 | bgequ noname.472 | ||
5193 | incl -288(fp) | ||
5194 | noname.472: | ||
5195 | movl -284(fp),r3 | ||
5196 | movl -288(fp),r2 | ||
5197 | bbc #31,r2,noname.473 | ||
5198 | incl r9 | ||
5199 | noname.473: | ||
5200 | addl2 r2,r2 | ||
5201 | bicl2 #0,r2 | ||
5202 | bbc #31,r3,noname.474 | ||
5203 | incl r2 | ||
5204 | noname.474: | ||
5205 | addl2 r3,r3 | ||
5206 | bicl2 #0,r3 | ||
5207 | addl2 r3,r8 | ||
5208 | bicl2 #0,r8 | ||
5209 | cmpl r8,r3 | ||
5210 | bgequ noname.475 | ||
5211 | incl r2 | ||
5212 | bicl3 #0,r2,r0 | ||
5213 | bneq noname.475 | ||
5214 | incl r9 | ||
5215 | noname.475: | ||
5216 | addl2 r2,r7 | ||
5217 | bicl2 #0,r7 | ||
5218 | cmpl r7,r2 | ||
5219 | bgequ noname.476 | ||
5220 | incl r9 | ||
5221 | noname.476: | ||
5222 | |||
5223 | movl 4(ap),r0 | ||
5224 | movl r8,28(r0) | ||
5225 | |||
5226 | clrl r8 | ||
5227 | |||
5228 | movl 8(ap),r3 | ||
5229 | movl 16(r3),r4 | ||
5230 | bicl3 #-65536,r4,r5 | ||
5231 | extzv #16,#16,r4,r0 | ||
5232 | bicl3 #-65536,r0,r4 | ||
5233 | mull3 r5,r4,-292(fp) | ||
5234 | mull2 r5,r5 | ||
5235 | mull2 r4,r4 | ||
5236 | bicl3 #32767,-292(fp),r0 | ||
5237 | extzv #15,#17,r0,r0 | ||
5238 | addl2 r0,r4 | ||
5239 | bicl3 #-65536,-292(fp),r0 | ||
5240 | ashl #17,r0,-292(fp) | ||
5241 | addl2 -292(fp),r5 | ||
5242 | bicl2 #0,r5 | ||
5243 | cmpl r5,-292(fp) | ||
5244 | bgequ noname.477 | ||
5245 | incl r4 | ||
5246 | noname.477: | ||
5247 | movl r5,r1 | ||
5248 | movl r4,r2 | ||
5249 | addl2 r1,r7 | ||
5250 | bicl2 #0,r7 | ||
5251 | cmpl r7,r1 | ||
5252 | bgequ noname.478 | ||
5253 | incl r2 | ||
5254 | noname.478: | ||
5255 | addl2 r2,r9 | ||
5256 | bicl2 #0,r9 | ||
5257 | cmpl r9,r2 | ||
5258 | bgequ noname.479 | ||
5259 | incl r8 | ||
5260 | noname.479: | ||
5261 | |||
5262 | bicl3 #-65536,20(r3),r4 | ||
5263 | movzwl 22(r3),r1 | ||
5264 | bicl2 #-65536,r1 | ||
5265 | bicl3 #-65536,12(r3),r2 | ||
5266 | movzwl 14(r3),r0 | ||
5267 | bicl2 #-65536,r0 | ||
5268 | movl r4,r6 | ||
5269 | movl r1,r5 | ||
5270 | mull3 r0,r6,-296(fp) | ||
5271 | mull2 r2,r6 | ||
5272 | mull3 r2,r5,-300(fp) | ||
5273 | mull2 r0,r5 | ||
5274 | addl3 -296(fp),-300(fp),r0 | ||
5275 | bicl3 #0,r0,-296(fp) | ||
5276 | cmpl -296(fp),-300(fp) | ||
5277 | bgequ noname.480 | ||
5278 | addl2 #65536,r5 | ||
5279 | noname.480: | ||
5280 | movzwl -294(fp),r0 | ||
5281 | bicl2 #-65536,r0 | ||
5282 | addl2 r0,r5 | ||
5283 | bicl3 #-65536,-296(fp),r0 | ||
5284 | ashl #16,r0,-300(fp) | ||
5285 | addl2 -300(fp),r6 | ||
5286 | bicl2 #0,r6 | ||
5287 | cmpl r6,-300(fp) | ||
5288 | bgequ noname.481 | ||
5289 | incl r5 | ||
5290 | noname.481: | ||
5291 | movl r6,r3 | ||
5292 | movl r5,r2 | ||
5293 | bbc #31,r2,noname.482 | ||
5294 | incl r8 | ||
5295 | noname.482: | ||
5296 | addl2 r2,r2 | ||
5297 | bicl2 #0,r2 | ||
5298 | bbc #31,r3,noname.483 | ||
5299 | incl r2 | ||
5300 | noname.483: | ||
5301 | addl2 r3,r3 | ||
5302 | bicl2 #0,r3 | ||
5303 | addl2 r3,r7 | ||
5304 | bicl2 #0,r7 | ||
5305 | cmpl r7,r3 | ||
5306 | bgequ noname.484 | ||
5307 | incl r2 | ||
5308 | bicl3 #0,r2,r0 | ||
5309 | bneq noname.484 | ||
5310 | incl r8 | ||
5311 | noname.484: | ||
5312 | addl2 r2,r9 | ||
5313 | bicl2 #0,r9 | ||
5314 | cmpl r9,r2 | ||
5315 | bgequ noname.485 | ||
5316 | incl r8 | ||
5317 | noname.485: | ||
5318 | |||
5319 | movl 8(ap),r0 | ||
5320 | bicl3 #-65536,24(r0),r3 | ||
5321 | movzwl 26(r0),r1 | ||
5322 | bicl2 #-65536,r1 | ||
5323 | bicl3 #-65536,8(r0),r2 | ||
5324 | movzwl 10(r0),r0 | ||
5325 | bicl2 #-65536,r0 | ||
5326 | movl r3,r5 | ||
5327 | movl r1,r4 | ||
5328 | mull3 r0,r5,-304(fp) | ||
5329 | mull2 r2,r5 | ||
5330 | mull3 r2,r4,-308(fp) | ||
5331 | mull2 r0,r4 | ||
5332 | addl3 -304(fp),-308(fp),r0 | ||
5333 | bicl3 #0,r0,-304(fp) | ||
5334 | cmpl -304(fp),-308(fp) | ||
5335 | bgequ noname.486 | ||
5336 | addl2 #65536,r4 | ||
5337 | noname.486: | ||
5338 | movzwl -302(fp),r0 | ||
5339 | bicl2 #-65536,r0 | ||
5340 | addl2 r0,r4 | ||
5341 | bicl3 #-65536,-304(fp),r0 | ||
5342 | ashl #16,r0,-308(fp) | ||
5343 | addl2 -308(fp),r5 | ||
5344 | bicl2 #0,r5 | ||
5345 | cmpl r5,-308(fp) | ||
5346 | bgequ noname.487 | ||
5347 | incl r4 | ||
5348 | noname.487: | ||
5349 | movl r5,r3 | ||
5350 | movl r4,r2 | ||
5351 | bbc #31,r2,noname.488 | ||
5352 | incl r8 | ||
5353 | noname.488: | ||
5354 | addl2 r2,r2 | ||
5355 | bicl2 #0,r2 | ||
5356 | bbc #31,r3,noname.489 | ||
5357 | incl r2 | ||
5358 | noname.489: | ||
5359 | addl2 r3,r3 | ||
5360 | bicl2 #0,r3 | ||
5361 | addl2 r3,r7 | ||
5362 | bicl2 #0,r7 | ||
5363 | cmpl r7,r3 | ||
5364 | bgequ noname.490 | ||
5365 | incl r2 | ||
5366 | bicl3 #0,r2,r0 | ||
5367 | bneq noname.490 | ||
5368 | incl r8 | ||
5369 | noname.490: | ||
5370 | addl2 r2,r9 | ||
5371 | bicl2 #0,r9 | ||
5372 | cmpl r9,r2 | ||
5373 | bgequ noname.491 | ||
5374 | incl r8 | ||
5375 | noname.491: | ||
5376 | |||
5377 | movl 8(ap),r0 | ||
5378 | bicl3 #-65536,28(r0),r3 | ||
5379 | movzwl 30(r0),r1 | ||
5380 | bicl2 #-65536,r1 | ||
5381 | bicl3 #-65536,4(r0),r2 | ||
5382 | movzwl 6(r0),r0 | ||
5383 | bicl2 #-65536,r0 | ||
5384 | movl r3,r5 | ||
5385 | movl r1,r4 | ||
5386 | mull3 r0,r5,-312(fp) | ||
5387 | mull2 r2,r5 | ||
5388 | mull3 r2,r4,-316(fp) | ||
5389 | mull2 r0,r4 | ||
5390 | addl3 -312(fp),-316(fp),r0 | ||
5391 | bicl3 #0,r0,-312(fp) | ||
5392 | cmpl -312(fp),-316(fp) | ||
5393 | bgequ noname.492 | ||
5394 | addl2 #65536,r4 | ||
5395 | noname.492: | ||
5396 | movzwl -310(fp),r0 | ||
5397 | bicl2 #-65536,r0 | ||
5398 | addl2 r0,r4 | ||
5399 | bicl3 #-65536,-312(fp),r0 | ||
5400 | ashl #16,r0,-316(fp) | ||
5401 | addl2 -316(fp),r5 | ||
5402 | bicl2 #0,r5 | ||
5403 | cmpl r5,-316(fp) | ||
5404 | bgequ noname.493 | ||
5405 | incl r4 | ||
5406 | noname.493: | ||
5407 | movl r5,r3 | ||
5408 | movl r4,r2 | ||
5409 | bbc #31,r2,noname.494 | ||
5410 | incl r8 | ||
5411 | noname.494: | ||
5412 | addl2 r2,r2 | ||
5413 | bicl2 #0,r2 | ||
5414 | bbc #31,r3,noname.495 | ||
5415 | incl r2 | ||
5416 | noname.495: | ||
5417 | addl2 r3,r3 | ||
5418 | bicl2 #0,r3 | ||
5419 | addl2 r3,r7 | ||
5420 | bicl2 #0,r7 | ||
5421 | cmpl r7,r3 | ||
5422 | bgequ noname.496 | ||
5423 | incl r2 | ||
5424 | bicl3 #0,r2,r0 | ||
5425 | bneq noname.496 | ||
5426 | incl r8 | ||
5427 | noname.496: | ||
5428 | addl2 r2,r9 | ||
5429 | bicl2 #0,r9 | ||
5430 | cmpl r9,r2 | ||
5431 | bgequ noname.497 | ||
5432 | incl r8 | ||
5433 | noname.497: | ||
5434 | |||
5435 | movl 4(ap),r0 | ||
5436 | movl r7,32(r0) | ||
5437 | |||
5438 | clrl r7 | ||
5439 | |||
5440 | movl 8(ap),r0 | ||
5441 | bicl3 #-65536,28(r0),r3 | ||
5442 | movzwl 30(r0),r2 | ||
5443 | bicl3 #-65536,8(r0),r1 | ||
5444 | movzwl 10(r0),r0 | ||
5445 | bicl2 #-65536,r0 | ||
5446 | movl r3,r4 | ||
5447 | bicl3 #-65536,r2,-328(fp) | ||
5448 | mull3 r0,r4,-320(fp) | ||
5449 | mull2 r1,r4 | ||
5450 | mull3 r1,-328(fp),-324(fp) | ||
5451 | mull2 r0,-328(fp) | ||
5452 | addl3 -320(fp),-324(fp),r0 | ||
5453 | bicl3 #0,r0,-320(fp) | ||
5454 | cmpl -320(fp),-324(fp) | ||
5455 | bgequ noname.498 | ||
5456 | addl2 #65536,-328(fp) | ||
5457 | noname.498: | ||
5458 | movzwl -318(fp),r0 | ||
5459 | bicl2 #-65536,r0 | ||
5460 | addl2 r0,-328(fp) | ||
5461 | bicl3 #-65536,-320(fp),r0 | ||
5462 | ashl #16,r0,-324(fp) | ||
5463 | addl2 -324(fp),r4 | ||
5464 | bicl2 #0,r4 | ||
5465 | cmpl r4,-324(fp) | ||
5466 | bgequ noname.499 | ||
5467 | incl -328(fp) | ||
5468 | noname.499: | ||
5469 | movl r4,r3 | ||
5470 | movl -328(fp),r2 | ||
5471 | bbc #31,r2,noname.500 | ||
5472 | incl r7 | ||
5473 | noname.500: | ||
5474 | addl2 r2,r2 | ||
5475 | bicl2 #0,r2 | ||
5476 | bbc #31,r3,noname.501 | ||
5477 | incl r2 | ||
5478 | noname.501: | ||
5479 | addl2 r3,r3 | ||
5480 | bicl2 #0,r3 | ||
5481 | addl2 r3,r9 | ||
5482 | bicl2 #0,r9 | ||
5483 | cmpl r9,r3 | ||
5484 | bgequ noname.502 | ||
5485 | incl r2 | ||
5486 | bicl3 #0,r2,r0 | ||
5487 | bneq noname.502 | ||
5488 | incl r7 | ||
5489 | noname.502: | ||
5490 | addl2 r2,r8 | ||
5491 | bicl2 #0,r8 | ||
5492 | cmpl r8,r2 | ||
5493 | bgequ noname.503 | ||
5494 | incl r7 | ||
5495 | noname.503: | ||
5496 | |||
5497 | movl 8(ap),r0 | ||
5498 | movzwl 26(r0),r2 | ||
5499 | bicl3 #-65536,12(r0),r3 | ||
5500 | movzwl 14(r0),r1 | ||
5501 | bicl2 #-65536,r1 | ||
5502 | bicl3 #-65536,24(r0),-340(fp) | ||
5503 | bicl3 #-65536,r2,-344(fp) | ||
5504 | mull3 r1,-340(fp),-332(fp) | ||
5505 | mull2 r3,-340(fp) | ||
5506 | mull3 r3,-344(fp),-336(fp) | ||
5507 | mull2 r1,-344(fp) | ||
5508 | addl3 -332(fp),-336(fp),r0 | ||
5509 | bicl3 #0,r0,-332(fp) | ||
5510 | cmpl -332(fp),-336(fp) | ||
5511 | bgequ noname.504 | ||
5512 | addl2 #65536,-344(fp) | ||
5513 | noname.504: | ||
5514 | movzwl -330(fp),r0 | ||
5515 | bicl2 #-65536,r0 | ||
5516 | addl2 r0,-344(fp) | ||
5517 | bicl3 #-65536,-332(fp),r0 | ||
5518 | ashl #16,r0,-336(fp) | ||
5519 | addl3 -336(fp),-340(fp),r0 | ||
5520 | bicl3 #0,r0,-340(fp) | ||
5521 | cmpl -340(fp),-336(fp) | ||
5522 | bgequ noname.505 | ||
5523 | incl -344(fp) | ||
5524 | noname.505: | ||
5525 | movl -340(fp),r3 | ||
5526 | movl -344(fp),r2 | ||
5527 | bbc #31,r2,noname.506 | ||
5528 | incl r7 | ||
5529 | noname.506: | ||
5530 | addl2 r2,r2 | ||
5531 | bicl2 #0,r2 | ||
5532 | bbc #31,r3,noname.507 | ||
5533 | incl r2 | ||
5534 | noname.507: | ||
5535 | addl2 r3,r3 | ||
5536 | bicl2 #0,r3 | ||
5537 | addl2 r3,r9 | ||
5538 | bicl2 #0,r9 | ||
5539 | cmpl r9,r3 | ||
5540 | bgequ noname.508 | ||
5541 | incl r2 | ||
5542 | bicl3 #0,r2,r0 | ||
5543 | bneq noname.508 | ||
5544 | incl r7 | ||
5545 | noname.508: | ||
5546 | addl2 r2,r8 | ||
5547 | bicl2 #0,r8 | ||
5548 | cmpl r8,r2 | ||
5549 | bgequ noname.509 | ||
5550 | incl r7 | ||
5551 | noname.509: | ||
5552 | |||
5553 | movl 8(ap),r0 | ||
5554 | movzwl 22(r0),r2 | ||
5555 | bicl3 #-65536,16(r0),r3 | ||
5556 | movzwl 18(r0),r1 | ||
5557 | bicl2 #-65536,r1 | ||
5558 | bicl3 #-65536,20(r0),-356(fp) | ||
5559 | bicl3 #-65536,r2,-360(fp) | ||
5560 | mull3 r1,-356(fp),-348(fp) | ||
5561 | mull2 r3,-356(fp) | ||
5562 | mull3 r3,-360(fp),-352(fp) | ||
5563 | mull2 r1,-360(fp) | ||
5564 | addl3 -348(fp),-352(fp),r0 | ||
5565 | bicl3 #0,r0,-348(fp) | ||
5566 | cmpl -348(fp),-352(fp) | ||
5567 | bgequ noname.510 | ||
5568 | addl2 #65536,-360(fp) | ||
5569 | noname.510: | ||
5570 | movzwl -346(fp),r0 | ||
5571 | bicl2 #-65536,r0 | ||
5572 | addl2 r0,-360(fp) | ||
5573 | bicl3 #-65536,-348(fp),r0 | ||
5574 | ashl #16,r0,-352(fp) | ||
5575 | addl3 -352(fp),-356(fp),r0 | ||
5576 | bicl3 #0,r0,-356(fp) | ||
5577 | cmpl -356(fp),-352(fp) | ||
5578 | bgequ noname.511 | ||
5579 | incl -360(fp) | ||
5580 | noname.511: | ||
5581 | movl -356(fp),r3 | ||
5582 | movl -360(fp),r2 | ||
5583 | bbc #31,r2,noname.512 | ||
5584 | incl r7 | ||
5585 | noname.512: | ||
5586 | addl2 r2,r2 | ||
5587 | bicl2 #0,r2 | ||
5588 | bbc #31,r3,noname.513 | ||
5589 | incl r2 | ||
5590 | noname.513: | ||
5591 | addl2 r3,r3 | ||
5592 | bicl2 #0,r3 | ||
5593 | addl2 r3,r9 | ||
5594 | bicl2 #0,r9 | ||
5595 | cmpl r9,r3 | ||
5596 | bgequ noname.514 | ||
5597 | incl r2 | ||
5598 | bicl3 #0,r2,r0 | ||
5599 | bneq noname.514 | ||
5600 | incl r7 | ||
5601 | noname.514: | ||
5602 | addl2 r2,r8 | ||
5603 | bicl2 #0,r8 | ||
5604 | cmpl r8,r2 | ||
5605 | bgequ noname.515 | ||
5606 | incl r7 | ||
5607 | noname.515: | ||
5608 | |||
5609 | movl 4(ap),r0 | ||
5610 | movl r9,36(r0) | ||
5611 | |||
5612 | clrl r9 | ||
5613 | |||
5614 | movl 8(ap),r3 | ||
5615 | movl 20(r3),r4 | ||
5616 | bicl3 #-65536,r4,-364(fp) | ||
5617 | extzv #16,#16,r4,r0 | ||
5618 | bicl3 #-65536,r0,r4 | ||
5619 | movl -364(fp),r0 | ||
5620 | mull3 r0,r4,-368(fp) | ||
5621 | mull3 r0,r0,-364(fp) | ||
5622 | mull2 r4,r4 | ||
5623 | bicl3 #32767,-368(fp),r0 | ||
5624 | extzv #15,#17,r0,r0 | ||
5625 | addl2 r0,r4 | ||
5626 | bicl3 #-65536,-368(fp),r0 | ||
5627 | ashl #17,r0,-368(fp) | ||
5628 | addl3 -364(fp),-368(fp),r0 | ||
5629 | bicl3 #0,r0,-364(fp) | ||
5630 | cmpl -364(fp),-368(fp) | ||
5631 | bgequ noname.516 | ||
5632 | incl r4 | ||
5633 | noname.516: | ||
5634 | movl -364(fp),r1 | ||
5635 | movl r4,r2 | ||
5636 | addl2 r1,r8 | ||
5637 | bicl2 #0,r8 | ||
5638 | cmpl r8,r1 | ||
5639 | bgequ noname.517 | ||
5640 | incl r2 | ||
5641 | noname.517: | ||
5642 | addl2 r2,r7 | ||
5643 | bicl2 #0,r7 | ||
5644 | cmpl r7,r2 | ||
5645 | bgequ noname.518 | ||
5646 | incl r9 | ||
5647 | noname.518: | ||
5648 | |||
5649 | bicl3 #-65536,24(r3),r4 | ||
5650 | movzwl 26(r3),r1 | ||
5651 | bicl2 #-65536,r1 | ||
5652 | bicl3 #-65536,16(r3),r2 | ||
5653 | movzwl 18(r3),r0 | ||
5654 | bicl2 #-65536,r0 | ||
5655 | movl r4,r6 | ||
5656 | movl r1,r5 | ||
5657 | mull3 r0,r6,-372(fp) | ||
5658 | mull2 r2,r6 | ||
5659 | mull3 r2,r5,-376(fp) | ||
5660 | mull2 r0,r5 | ||
5661 | addl3 -372(fp),-376(fp),r0 | ||
5662 | bicl3 #0,r0,-372(fp) | ||
5663 | cmpl -372(fp),-376(fp) | ||
5664 | bgequ noname.519 | ||
5665 | addl2 #65536,r5 | ||
5666 | noname.519: | ||
5667 | movzwl -370(fp),r0 | ||
5668 | bicl2 #-65536,r0 | ||
5669 | addl2 r0,r5 | ||
5670 | bicl3 #-65536,-372(fp),r0 | ||
5671 | ashl #16,r0,-376(fp) | ||
5672 | addl2 -376(fp),r6 | ||
5673 | bicl2 #0,r6 | ||
5674 | cmpl r6,-376(fp) | ||
5675 | bgequ noname.520 | ||
5676 | incl r5 | ||
5677 | noname.520: | ||
5678 | movl r6,r3 | ||
5679 | movl r5,r2 | ||
5680 | bbc #31,r2,noname.521 | ||
5681 | incl r9 | ||
5682 | noname.521: | ||
5683 | addl2 r2,r2 | ||
5684 | bicl2 #0,r2 | ||
5685 | bbc #31,r3,noname.522 | ||
5686 | incl r2 | ||
5687 | noname.522: | ||
5688 | addl2 r3,r3 | ||
5689 | bicl2 #0,r3 | ||
5690 | addl2 r3,r8 | ||
5691 | bicl2 #0,r8 | ||
5692 | cmpl r8,r3 | ||
5693 | bgequ noname.523 | ||
5694 | incl r2 | ||
5695 | bicl3 #0,r2,r0 | ||
5696 | bneq noname.523 | ||
5697 | incl r9 | ||
5698 | noname.523: | ||
5699 | addl2 r2,r7 | ||
5700 | bicl2 #0,r7 | ||
5701 | cmpl r7,r2 | ||
5702 | bgequ noname.524 | ||
5703 | incl r9 | ||
5704 | noname.524: | ||
5705 | |||
5706 | movl 8(ap),r0 | ||
5707 | bicl3 #-65536,28(r0),r3 | ||
5708 | movzwl 30(r0),r1 | ||
5709 | bicl2 #-65536,r1 | ||
5710 | bicl3 #-65536,12(r0),r2 | ||
5711 | movzwl 14(r0),r0 | ||
5712 | bicl2 #-65536,r0 | ||
5713 | movl r3,r5 | ||
5714 | movl r1,r4 | ||
5715 | mull3 r0,r5,-380(fp) | ||
5716 | mull2 r2,r5 | ||
5717 | mull3 r2,r4,-384(fp) | ||
5718 | mull2 r0,r4 | ||
5719 | addl3 -380(fp),-384(fp),r0 | ||
5720 | bicl3 #0,r0,-380(fp) | ||
5721 | cmpl -380(fp),-384(fp) | ||
5722 | bgequ noname.525 | ||
5723 | addl2 #65536,r4 | ||
5724 | noname.525: | ||
5725 | movzwl -378(fp),r0 | ||
5726 | bicl2 #-65536,r0 | ||
5727 | addl2 r0,r4 | ||
5728 | bicl3 #-65536,-380(fp),r0 | ||
5729 | ashl #16,r0,-384(fp) | ||
5730 | addl2 -384(fp),r5 | ||
5731 | bicl2 #0,r5 | ||
5732 | cmpl r5,-384(fp) | ||
5733 | bgequ noname.526 | ||
5734 | incl r4 | ||
5735 | noname.526: | ||
5736 | movl r5,r3 | ||
5737 | movl r4,r2 | ||
5738 | bbc #31,r2,noname.527 | ||
5739 | incl r9 | ||
5740 | noname.527: | ||
5741 | addl2 r2,r2 | ||
5742 | bicl2 #0,r2 | ||
5743 | bbc #31,r3,noname.528 | ||
5744 | incl r2 | ||
5745 | noname.528: | ||
5746 | addl2 r3,r3 | ||
5747 | bicl2 #0,r3 | ||
5748 | addl2 r3,r8 | ||
5749 | bicl2 #0,r8 | ||
5750 | cmpl r8,r3 | ||
5751 | bgequ noname.529 | ||
5752 | incl r2 | ||
5753 | bicl3 #0,r2,r0 | ||
5754 | bneq noname.529 | ||
5755 | incl r9 | ||
5756 | noname.529: | ||
5757 | addl2 r2,r7 | ||
5758 | bicl2 #0,r7 | ||
5759 | cmpl r7,r2 | ||
5760 | bgequ noname.530 | ||
5761 | incl r9 | ||
5762 | noname.530: | ||
5763 | movl 4(ap),r0 | ||
5764 | movl r8,40(r0) | ||
5765 | |||
5766 | clrl r8 | ||
5767 | |||
5768 | movl 8(ap),r0 | ||
5769 | bicl3 #-65536,28(r0),r3 | ||
5770 | movzwl 30(r0),r1 | ||
5771 | bicl2 #-65536,r1 | ||
5772 | bicl3 #-65536,16(r0),r2 | ||
5773 | movzwl 18(r0),r0 | ||
5774 | bicl2 #-65536,r0 | ||
5775 | movl r3,r5 | ||
5776 | movl r1,r4 | ||
5777 | mull3 r0,r5,-388(fp) | ||
5778 | mull2 r2,r5 | ||
5779 | mull3 r2,r4,-392(fp) | ||
5780 | mull2 r0,r4 | ||
5781 | addl3 -388(fp),-392(fp),r0 | ||
5782 | bicl3 #0,r0,-388(fp) | ||
5783 | cmpl -388(fp),-392(fp) | ||
5784 | bgequ noname.531 | ||
5785 | addl2 #65536,r4 | ||
5786 | noname.531: | ||
5787 | movzwl -386(fp),r0 | ||
5788 | bicl2 #-65536,r0 | ||
5789 | addl2 r0,r4 | ||
5790 | bicl3 #-65536,-388(fp),r0 | ||
5791 | ashl #16,r0,-392(fp) | ||
5792 | addl2 -392(fp),r5 | ||
5793 | bicl2 #0,r5 | ||
5794 | cmpl r5,-392(fp) | ||
5795 | bgequ noname.532 | ||
5796 | incl r4 | ||
5797 | noname.532: | ||
5798 | movl r5,r3 | ||
5799 | movl r4,r2 | ||
5800 | bbc #31,r2,noname.533 | ||
5801 | incl r8 | ||
5802 | noname.533: | ||
5803 | addl2 r2,r2 | ||
5804 | bicl2 #0,r2 | ||
5805 | bbc #31,r3,noname.534 | ||
5806 | incl r2 | ||
5807 | noname.534: | ||
5808 | addl2 r3,r3 | ||
5809 | bicl2 #0,r3 | ||
5810 | addl2 r3,r7 | ||
5811 | bicl2 #0,r7 | ||
5812 | cmpl r7,r3 | ||
5813 | bgequ noname.535 | ||
5814 | incl r2 | ||
5815 | bicl3 #0,r2,r0 | ||
5816 | bneq noname.535 | ||
5817 | incl r8 | ||
5818 | noname.535: | ||
5819 | addl2 r2,r9 | ||
5820 | bicl2 #0,r9 | ||
5821 | cmpl r9,r2 | ||
5822 | bgequ noname.536 | ||
5823 | incl r8 | ||
5824 | noname.536: | ||
5825 | |||
5826 | movl 8(ap),r0 | ||
5827 | bicl3 #-65536,24(r0),r3 | ||
5828 | movzwl 26(r0),r1 | ||
5829 | bicl2 #-65536,r1 | ||
5830 | bicl3 #-65536,20(r0),r2 | ||
5831 | movzwl 22(r0),r0 | ||
5832 | bicl2 #-65536,r0 | ||
5833 | movl r3,r5 | ||
5834 | movl r1,r4 | ||
5835 | mull3 r0,r5,-396(fp) | ||
5836 | mull2 r2,r5 | ||
5837 | mull3 r2,r4,-400(fp) | ||
5838 | mull2 r0,r4 | ||
5839 | addl3 -396(fp),-400(fp),r0 | ||
5840 | bicl3 #0,r0,-396(fp) | ||
5841 | cmpl -396(fp),-400(fp) | ||
5842 | bgequ noname.537 | ||
5843 | addl2 #65536,r4 | ||
5844 | noname.537: | ||
5845 | movzwl -394(fp),r0 | ||
5846 | bicl2 #-65536,r0 | ||
5847 | addl2 r0,r4 | ||
5848 | bicl3 #-65536,-396(fp),r0 | ||
5849 | ashl #16,r0,-400(fp) | ||
5850 | addl2 -400(fp),r5 | ||
5851 | bicl2 #0,r5 | ||
5852 | cmpl r5,-400(fp) | ||
5853 | bgequ noname.538 | ||
5854 | incl r4 | ||
5855 | noname.538: | ||
5856 | movl r5,r3 | ||
5857 | movl r4,r2 | ||
5858 | bbc #31,r2,noname.539 | ||
5859 | incl r8 | ||
5860 | noname.539: | ||
5861 | addl2 r2,r2 | ||
5862 | bicl2 #0,r2 | ||
5863 | bbc #31,r3,noname.540 | ||
5864 | incl r2 | ||
5865 | noname.540: | ||
5866 | addl2 r3,r3 | ||
5867 | bicl2 #0,r3 | ||
5868 | addl2 r3,r7 | ||
5869 | bicl2 #0,r7 | ||
5870 | cmpl r7,r3 | ||
5871 | bgequ noname.541 | ||
5872 | incl r2 | ||
5873 | bicl3 #0,r2,r0 | ||
5874 | bneq noname.541 | ||
5875 | incl r8 | ||
5876 | noname.541: | ||
5877 | addl2 r2,r9 | ||
5878 | bicl2 #0,r9 | ||
5879 | cmpl r9,r2 | ||
5880 | bgequ noname.542 | ||
5881 | incl r8 | ||
5882 | noname.542: | ||
5883 | |||
5884 | movl 4(ap),r0 | ||
5885 | movl r7,44(r0) | ||
5886 | |||
5887 | clrl r7 | ||
5888 | |||
5889 | movl 8(ap),r3 | ||
5890 | movl 24(r3),r4 | ||
5891 | bicl3 #-65536,r4,r5 | ||
5892 | extzv #16,#16,r4,r0 | ||
5893 | bicl3 #-65536,r0,r4 | ||
5894 | mull3 r5,r4,-404(fp) | ||
5895 | mull2 r5,r5 | ||
5896 | mull2 r4,r4 | ||
5897 | bicl3 #32767,-404(fp),r0 | ||
5898 | extzv #15,#17,r0,r0 | ||
5899 | addl2 r0,r4 | ||
5900 | bicl3 #-65536,-404(fp),r0 | ||
5901 | ashl #17,r0,-404(fp) | ||
5902 | addl2 -404(fp),r5 | ||
5903 | bicl2 #0,r5 | ||
5904 | cmpl r5,-404(fp) | ||
5905 | bgequ noname.543 | ||
5906 | incl r4 | ||
5907 | noname.543: | ||
5908 | movl r5,r1 | ||
5909 | movl r4,r2 | ||
5910 | addl2 r1,r9 | ||
5911 | bicl2 #0,r9 | ||
5912 | cmpl r9,r1 | ||
5913 | bgequ noname.544 | ||
5914 | incl r2 | ||
5915 | noname.544: | ||
5916 | addl2 r2,r8 | ||
5917 | bicl2 #0,r8 | ||
5918 | cmpl r8,r2 | ||
5919 | bgequ noname.545 | ||
5920 | incl r7 | ||
5921 | noname.545: | ||
5922 | |||
5923 | movzwl 30(r3),r2 | ||
5924 | bicl3 #-65536,20(r3),r1 | ||
5925 | movzwl 22(r3),r0 | ||
5926 | bicl2 #-65536,r0 | ||
5927 | bicl3 #-65536,28(r3),-416(fp) | ||
5928 | bicl3 #-65536,r2,-420(fp) | ||
5929 | mull3 r0,-416(fp),-408(fp) | ||
5930 | mull2 r1,-416(fp) | ||
5931 | mull3 r1,-420(fp),-412(fp) | ||
5932 | mull2 r0,-420(fp) | ||
5933 | addl3 -408(fp),-412(fp),r0 | ||
5934 | bicl3 #0,r0,-408(fp) | ||
5935 | cmpl -408(fp),-412(fp) | ||
5936 | bgequ noname.546 | ||
5937 | addl2 #65536,-420(fp) | ||
5938 | noname.546: | ||
5939 | movzwl -406(fp),r0 | ||
5940 | bicl2 #-65536,r0 | ||
5941 | addl2 r0,-420(fp) | ||
5942 | bicl3 #-65536,-408(fp),r0 | ||
5943 | ashl #16,r0,-412(fp) | ||
5944 | addl3 -412(fp),-416(fp),r0 | ||
5945 | bicl3 #0,r0,-416(fp) | ||
5946 | cmpl -416(fp),-412(fp) | ||
5947 | bgequ noname.547 | ||
5948 | incl -420(fp) | ||
5949 | noname.547: | ||
5950 | movl -416(fp),r3 | ||
5951 | movl -420(fp),r2 | ||
5952 | bbc #31,r2,noname.548 | ||
5953 | incl r7 | ||
5954 | noname.548: | ||
5955 | addl2 r2,r2 | ||
5956 | bicl2 #0,r2 | ||
5957 | bbc #31,r3,noname.549 | ||
5958 | incl r2 | ||
5959 | noname.549: | ||
5960 | addl2 r3,r3 | ||
5961 | bicl2 #0,r3 | ||
5962 | addl2 r3,r9 | ||
5963 | bicl2 #0,r9 | ||
5964 | cmpl r9,r3 | ||
5965 | bgequ noname.550 | ||
5966 | incl r2 | ||
5967 | bicl3 #0,r2,r0 | ||
5968 | bneq noname.550 | ||
5969 | incl r7 | ||
5970 | noname.550: | ||
5971 | addl2 r2,r8 | ||
5972 | bicl2 #0,r8 | ||
5973 | cmpl r8,r2 | ||
5974 | bgequ noname.551 | ||
5975 | incl r7 | ||
5976 | noname.551: | ||
5977 | |||
5978 | movl 4(ap),r0 | ||
5979 | movl r9,48(r0) | ||
5980 | |||
5981 | clrl r9 | ||
5982 | |||
5983 | movl 8(ap),r0 | ||
5984 | movzwl 30(r0),r2 | ||
5985 | bicl3 #-65536,24(r0),r3 | ||
5986 | movzwl 26(r0),r1 | ||
5987 | bicl2 #-65536,r1 | ||
5988 | bicl3 #-65536,28(r0),-432(fp) | ||
5989 | bicl3 #-65536,r2,-436(fp) | ||
5990 | mull3 r1,-432(fp),-424(fp) | ||
5991 | mull2 r3,-432(fp) | ||
5992 | mull3 r3,-436(fp),-428(fp) | ||
5993 | mull2 r1,-436(fp) | ||
5994 | addl3 -424(fp),-428(fp),r0 | ||
5995 | bicl3 #0,r0,-424(fp) | ||
5996 | cmpl -424(fp),-428(fp) | ||
5997 | bgequ noname.552 | ||
5998 | addl2 #65536,-436(fp) | ||
5999 | noname.552: | ||
6000 | movzwl -422(fp),r0 | ||
6001 | bicl2 #-65536,r0 | ||
6002 | addl2 r0,-436(fp) | ||
6003 | bicl3 #-65536,-424(fp),r0 | ||
6004 | ashl #16,r0,-428(fp) | ||
6005 | addl3 -428(fp),-432(fp),r0 | ||
6006 | bicl3 #0,r0,-432(fp) | ||
6007 | cmpl -432(fp),-428(fp) | ||
6008 | bgequ noname.553 | ||
6009 | incl -436(fp) | ||
6010 | noname.553: | ||
6011 | movl -432(fp),r3 | ||
6012 | movl -436(fp),r2 | ||
6013 | bbc #31,r2,noname.554 | ||
6014 | incl r9 | ||
6015 | noname.554: | ||
6016 | addl2 r2,r2 | ||
6017 | bicl2 #0,r2 | ||
6018 | bbc #31,r3,noname.555 | ||
6019 | incl r2 | ||
6020 | noname.555: | ||
6021 | addl2 r3,r3 | ||
6022 | bicl2 #0,r3 | ||
6023 | addl2 r3,r8 | ||
6024 | bicl2 #0,r8 | ||
6025 | cmpl r8,r3 | ||
6026 | bgequ noname.556 | ||
6027 | incl r2 | ||
6028 | bicl3 #0,r2,r0 | ||
6029 | bneq noname.556 | ||
6030 | incl r9 | ||
6031 | noname.556: | ||
6032 | addl2 r2,r7 | ||
6033 | bicl2 #0,r7 | ||
6034 | cmpl r7,r2 | ||
6035 | bgequ noname.557 | ||
6036 | incl r9 | ||
6037 | noname.557: | ||
6038 | |||
6039 | movl 4(ap),r4 | ||
6040 | movl r8,52(r4) | ||
6041 | |||
6042 | clrl r8 | ||
6043 | |||
6044 | movl 8(ap),r0 | ||
6045 | movl 28(r0),r3 | ||
6046 | bicl3 #-65536,r3,-440(fp) | ||
6047 | extzv #16,#16,r3,r0 | ||
6048 | bicl3 #-65536,r0,r3 | ||
6049 | movl -440(fp),r0 | ||
6050 | mull3 r0,r3,-444(fp) | ||
6051 | mull3 r0,r0,-440(fp) | ||
6052 | mull2 r3,r3 | ||
6053 | bicl3 #32767,-444(fp),r0 | ||
6054 | extzv #15,#17,r0,r0 | ||
6055 | addl2 r0,r3 | ||
6056 | bicl3 #-65536,-444(fp),r0 | ||
6057 | ashl #17,r0,-444(fp) | ||
6058 | addl3 -440(fp),-444(fp),r0 | ||
6059 | bicl3 #0,r0,-440(fp) | ||
6060 | cmpl -440(fp),-444(fp) | ||
6061 | bgequ noname.558 | ||
6062 | incl r3 | ||
6063 | noname.558: | ||
6064 | movl -440(fp),r1 | ||
6065 | movl r3,r2 | ||
6066 | addl2 r1,r7 | ||
6067 | bicl2 #0,r7 | ||
6068 | cmpl r7,r1 | ||
6069 | bgequ noname.559 | ||
6070 | incl r2 | ||
6071 | noname.559: | ||
6072 | addl2 r2,r9 | ||
6073 | bicl2 #0,r9 | ||
6074 | cmpl r9,r2 | ||
6075 | bgequ noname.560 | ||
6076 | incl r8 | ||
6077 | noname.560: | ||
6078 | |||
6079 | movl r7,56(r4) | ||
6080 | |||
6081 | movl r9,60(r4) | ||
6082 | |||
6083 | ret | ||
6084 | |||
6085 | |||
6086 | |||
6087 | ;r=4 ;(AP) | ||
6088 | ;a=8 ;(AP) | ||
6089 | ;b=12 ;(AP) | ||
6090 | ;n=16 ;(AP) n by value (input) | ||
6091 | |||
6092 | .psect code,nowrt | ||
6093 | |||
6094 | .entry BN_SQR_COMBA4,^m<r2,r3,r4,r5,r6,r7,r8,r9,r10> | ||
6095 | subl2 #44,sp | ||
6096 | |||
6097 | clrq r8 | ||
6098 | |||
6099 | clrl r10 | ||
6100 | |||
6101 | movl 8(ap),r5 | ||
6102 | movl (r5),r3 | ||
6103 | bicl3 #-65536,r3,r4 | ||
6104 | extzv #16,#16,r3,r0 | ||
6105 | bicl3 #-65536,r0,r3 | ||
6106 | mull3 r4,r3,-4(fp) | ||
6107 | mull2 r4,r4 | ||
6108 | mull2 r3,r3 | ||
6109 | bicl3 #32767,-4(fp),r0 | ||
6110 | extzv #15,#17,r0,r0 | ||
6111 | addl2 r0,r3 | ||
6112 | bicl3 #-65536,-4(fp),r0 | ||
6113 | ashl #17,r0,-4(fp) | ||
6114 | addl2 -4(fp),r4 | ||
6115 | bicl2 #0,r4 | ||
6116 | cmpl r4,-4(fp) | ||
6117 | bgequ noname.563 | ||
6118 | incl r3 | ||
6119 | noname.563: | ||
6120 | movl r4,r1 | ||
6121 | movl r3,r2 | ||
6122 | addl2 r1,r9 | ||
6123 | bicl2 #0,r9 | ||
6124 | cmpl r9,r1 | ||
6125 | bgequ noname.564 | ||
6126 | incl r2 | ||
6127 | noname.564: | ||
6128 | addl2 r2,r8 | ||
6129 | bicl2 #0,r8 | ||
6130 | cmpl r8,r2 | ||
6131 | bgequ noname.565 | ||
6132 | incl r10 | ||
6133 | noname.565: | ||
6134 | |||
6135 | movl r9,@4(ap) | ||
6136 | |||
6137 | clrl r9 | ||
6138 | |||
6139 | bicl3 #-65536,4(r5),r3 | ||
6140 | movzwl 6(r5),r1 | ||
6141 | bicl2 #-65536,r1 | ||
6142 | bicl3 #-65536,(r5),r2 | ||
6143 | movzwl 2(r5),r0 | ||
6144 | bicl2 #-65536,r0 | ||
6145 | movl r3,r6 | ||
6146 | movl r1,r4 | ||
6147 | mull3 r0,r6,-8(fp) | ||
6148 | mull2 r2,r6 | ||
6149 | mull2 r4,r2 | ||
6150 | mull2 r0,r4 | ||
6151 | addl3 -8(fp),r2,r0 | ||
6152 | bicl3 #0,r0,-8(fp) | ||
6153 | cmpl -8(fp),r2 | ||
6154 | bgequ noname.566 | ||
6155 | addl2 #65536,r4 | ||
6156 | noname.566: | ||
6157 | movzwl -6(fp),r0 | ||
6158 | bicl2 #-65536,r0 | ||
6159 | addl2 r0,r4 | ||
6160 | bicl3 #-65536,-8(fp),r0 | ||
6161 | ashl #16,r0,r1 | ||
6162 | addl2 r1,r6 | ||
6163 | bicl2 #0,r6 | ||
6164 | cmpl r6,r1 | ||
6165 | bgequ noname.567 | ||
6166 | incl r4 | ||
6167 | noname.567: | ||
6168 | movl r6,r3 | ||
6169 | movl r4,r2 | ||
6170 | bbc #31,r2,noname.568 | ||
6171 | incl r9 | ||
6172 | noname.568: | ||
6173 | addl2 r2,r2 | ||
6174 | bicl2 #0,r2 | ||
6175 | bbc #31,r3,noname.569 | ||
6176 | incl r2 | ||
6177 | noname.569: | ||
6178 | addl2 r3,r3 | ||
6179 | bicl2 #0,r3 | ||
6180 | addl2 r3,r8 | ||
6181 | bicl2 #0,r8 | ||
6182 | cmpl r8,r3 | ||
6183 | bgequ noname.570 | ||
6184 | incl r2 | ||
6185 | bicl3 #0,r2,r0 | ||
6186 | bneq noname.570 | ||
6187 | incl r9 | ||
6188 | noname.570: | ||
6189 | addl2 r2,r10 | ||
6190 | bicl2 #0,r10 | ||
6191 | cmpl r10,r2 | ||
6192 | bgequ noname.571 | ||
6193 | incl r9 | ||
6194 | noname.571: | ||
6195 | |||
6196 | movl 4(ap),r0 | ||
6197 | movl r8,4(r0) | ||
6198 | |||
6199 | clrl r8 | ||
6200 | |||
6201 | movl 8(ap),r4 | ||
6202 | movl 4(r4),r3 | ||
6203 | bicl3 #-65536,r3,r5 | ||
6204 | extzv #16,#16,r3,r0 | ||
6205 | bicl3 #-65536,r0,r3 | ||
6206 | mull3 r5,r3,r1 | ||
6207 | mull2 r5,r5 | ||
6208 | mull2 r3,r3 | ||
6209 | bicl3 #32767,r1,r0 | ||
6210 | extzv #15,#17,r0,r0 | ||
6211 | addl2 r0,r3 | ||
6212 | bicl2 #-65536,r1 | ||
6213 | ashl #17,r1,r1 | ||
6214 | addl2 r1,r5 | ||
6215 | bicl2 #0,r5 | ||
6216 | cmpl r5,r1 | ||
6217 | bgequ noname.572 | ||
6218 | incl r3 | ||
6219 | noname.572: | ||
6220 | movl r5,r1 | ||
6221 | movl r3,r2 | ||
6222 | addl2 r1,r10 | ||
6223 | bicl2 #0,r10 | ||
6224 | cmpl r10,r1 | ||
6225 | bgequ noname.573 | ||
6226 | incl r2 | ||
6227 | noname.573: | ||
6228 | addl2 r2,r9 | ||
6229 | bicl2 #0,r9 | ||
6230 | cmpl r9,r2 | ||
6231 | bgequ noname.574 | ||
6232 | incl r8 | ||
6233 | noname.574: | ||
6234 | |||
6235 | bicl3 #-65536,8(r4),r3 | ||
6236 | movzwl 10(r4),r1 | ||
6237 | bicl2 #-65536,r1 | ||
6238 | bicl3 #-65536,(r4),r2 | ||
6239 | movzwl 2(r4),r0 | ||
6240 | bicl2 #-65536,r0 | ||
6241 | movl r3,r6 | ||
6242 | movl r1,r5 | ||
6243 | mull3 r0,r6,r7 | ||
6244 | mull2 r2,r6 | ||
6245 | mull2 r5,r2 | ||
6246 | mull2 r0,r5 | ||
6247 | addl2 r2,r7 | ||
6248 | bicl2 #0,r7 | ||
6249 | cmpl r7,r2 | ||
6250 | bgequ noname.575 | ||
6251 | addl2 #65536,r5 | ||
6252 | noname.575: | ||
6253 | extzv #16,#16,r7,r0 | ||
6254 | bicl2 #-65536,r0 | ||
6255 | addl2 r0,r5 | ||
6256 | bicl3 #-65536,r7,r0 | ||
6257 | ashl #16,r0,r1 | ||
6258 | addl2 r1,r6 | ||
6259 | bicl2 #0,r6 | ||
6260 | cmpl r6,r1 | ||
6261 | bgequ noname.576 | ||
6262 | incl r5 | ||
6263 | noname.576: | ||
6264 | movl r6,r3 | ||
6265 | movl r5,r2 | ||
6266 | bbc #31,r2,noname.577 | ||
6267 | incl r8 | ||
6268 | noname.577: | ||
6269 | addl2 r2,r2 | ||
6270 | bicl2 #0,r2 | ||
6271 | bbc #31,r3,noname.578 | ||
6272 | incl r2 | ||
6273 | noname.578: | ||
6274 | addl2 r3,r3 | ||
6275 | bicl2 #0,r3 | ||
6276 | addl2 r3,r10 | ||
6277 | bicl2 #0,r10 | ||
6278 | cmpl r10,r3 | ||
6279 | bgequ noname.579 | ||
6280 | incl r2 | ||
6281 | bicl3 #0,r2,r0 | ||
6282 | bneq noname.579 | ||
6283 | incl r8 | ||
6284 | noname.579: | ||
6285 | addl2 r2,r9 | ||
6286 | bicl2 #0,r9 | ||
6287 | cmpl r9,r2 | ||
6288 | bgequ noname.580 | ||
6289 | incl r8 | ||
6290 | noname.580: | ||
6291 | |||
6292 | movl 4(ap),r0 | ||
6293 | movl r10,8(r0) | ||
6294 | |||
6295 | clrl r10 | ||
6296 | |||
6297 | movl 8(ap),r0 | ||
6298 | bicl3 #-65536,12(r0),r3 | ||
6299 | movzwl 14(r0),r1 | ||
6300 | bicl2 #-65536,r1 | ||
6301 | bicl3 #-65536,(r0),r2 | ||
6302 | movzwl 2(r0),r0 | ||
6303 | bicl2 #-65536,r0 | ||
6304 | movl r3,r5 | ||
6305 | movl r1,r4 | ||
6306 | mull3 r0,r5,r6 | ||
6307 | mull2 r2,r5 | ||
6308 | mull3 r2,r4,-12(fp) | ||
6309 | mull2 r0,r4 | ||
6310 | addl2 -12(fp),r6 | ||
6311 | bicl2 #0,r6 | ||
6312 | cmpl r6,-12(fp) | ||
6313 | bgequ noname.581 | ||
6314 | addl2 #65536,r4 | ||
6315 | noname.581: | ||
6316 | extzv #16,#16,r6,r0 | ||
6317 | bicl2 #-65536,r0 | ||
6318 | addl2 r0,r4 | ||
6319 | bicl3 #-65536,r6,r0 | ||
6320 | ashl #16,r0,-12(fp) | ||
6321 | addl2 -12(fp),r5 | ||
6322 | bicl2 #0,r5 | ||
6323 | cmpl r5,-12(fp) | ||
6324 | bgequ noname.582 | ||
6325 | incl r4 | ||
6326 | noname.582: | ||
6327 | movl r5,r3 | ||
6328 | movl r4,r2 | ||
6329 | bbc #31,r2,noname.583 | ||
6330 | incl r10 | ||
6331 | noname.583: | ||
6332 | addl2 r2,r2 | ||
6333 | bicl2 #0,r2 | ||
6334 | bbc #31,r3,noname.584 | ||
6335 | incl r2 | ||
6336 | noname.584: | ||
6337 | addl2 r3,r3 | ||
6338 | bicl2 #0,r3 | ||
6339 | addl2 r3,r9 | ||
6340 | bicl2 #0,r9 | ||
6341 | cmpl r9,r3 | ||
6342 | bgequ noname.585 | ||
6343 | incl r2 | ||
6344 | bicl3 #0,r2,r0 | ||
6345 | bneq noname.585 | ||
6346 | incl r10 | ||
6347 | noname.585: | ||
6348 | addl2 r2,r8 | ||
6349 | bicl2 #0,r8 | ||
6350 | cmpl r8,r2 | ||
6351 | bgequ noname.586 | ||
6352 | incl r10 | ||
6353 | noname.586: | ||
6354 | |||
6355 | movl 8(ap),r0 | ||
6356 | bicl3 #-65536,8(r0),r3 | ||
6357 | movzwl 10(r0),r1 | ||
6358 | bicl2 #-65536,r1 | ||
6359 | bicl3 #-65536,4(r0),r2 | ||
6360 | movzwl 6(r0),r0 | ||
6361 | bicl2 #-65536,r0 | ||
6362 | movl r3,r5 | ||
6363 | movl r1,r4 | ||
6364 | mull3 r0,r5,-16(fp) | ||
6365 | mull2 r2,r5 | ||
6366 | mull3 r2,r4,-20(fp) | ||
6367 | mull2 r0,r4 | ||
6368 | addl3 -16(fp),-20(fp),r0 | ||
6369 | bicl3 #0,r0,-16(fp) | ||
6370 | cmpl -16(fp),-20(fp) | ||
6371 | bgequ noname.587 | ||
6372 | addl2 #65536,r4 | ||
6373 | noname.587: | ||
6374 | movzwl -14(fp),r0 | ||
6375 | bicl2 #-65536,r0 | ||
6376 | addl2 r0,r4 | ||
6377 | bicl3 #-65536,-16(fp),r0 | ||
6378 | ashl #16,r0,-20(fp) | ||
6379 | addl2 -20(fp),r5 | ||
6380 | bicl2 #0,r5 | ||
6381 | cmpl r5,-20(fp) | ||
6382 | bgequ noname.588 | ||
6383 | incl r4 | ||
6384 | noname.588: | ||
6385 | movl r5,r3 | ||
6386 | movl r4,r2 | ||
6387 | bbc #31,r2,noname.589 | ||
6388 | incl r10 | ||
6389 | noname.589: | ||
6390 | addl2 r2,r2 | ||
6391 | bicl2 #0,r2 | ||
6392 | bbc #31,r3,noname.590 | ||
6393 | incl r2 | ||
6394 | noname.590: | ||
6395 | addl2 r3,r3 | ||
6396 | bicl2 #0,r3 | ||
6397 | addl2 r3,r9 | ||
6398 | bicl2 #0,r9 | ||
6399 | cmpl r9,r3 | ||
6400 | bgequ noname.591 | ||
6401 | incl r2 | ||
6402 | bicl3 #0,r2,r0 | ||
6403 | bneq noname.591 | ||
6404 | incl r10 | ||
6405 | noname.591: | ||
6406 | addl2 r2,r8 | ||
6407 | bicl2 #0,r8 | ||
6408 | cmpl r8,r2 | ||
6409 | bgequ noname.592 | ||
6410 | incl r10 | ||
6411 | noname.592: | ||
6412 | movl 4(ap),r0 | ||
6413 | movl r9,12(r0) | ||
6414 | |||
6415 | clrl r9 | ||
6416 | |||
6417 | movl 8(ap),r3 | ||
6418 | movl 8(r3),r4 | ||
6419 | bicl3 #-65536,r4,r5 | ||
6420 | extzv #16,#16,r4,r0 | ||
6421 | bicl3 #-65536,r0,r4 | ||
6422 | mull3 r5,r4,-24(fp) | ||
6423 | mull2 r5,r5 | ||
6424 | mull2 r4,r4 | ||
6425 | bicl3 #32767,-24(fp),r0 | ||
6426 | extzv #15,#17,r0,r0 | ||
6427 | addl2 r0,r4 | ||
6428 | bicl3 #-65536,-24(fp),r0 | ||
6429 | ashl #17,r0,-24(fp) | ||
6430 | addl2 -24(fp),r5 | ||
6431 | bicl2 #0,r5 | ||
6432 | cmpl r5,-24(fp) | ||
6433 | bgequ noname.593 | ||
6434 | incl r4 | ||
6435 | noname.593: | ||
6436 | movl r5,r1 | ||
6437 | movl r4,r2 | ||
6438 | addl2 r1,r8 | ||
6439 | bicl2 #0,r8 | ||
6440 | cmpl r8,r1 | ||
6441 | bgequ noname.594 | ||
6442 | incl r2 | ||
6443 | noname.594: | ||
6444 | addl2 r2,r10 | ||
6445 | bicl2 #0,r10 | ||
6446 | cmpl r10,r2 | ||
6447 | bgequ noname.595 | ||
6448 | incl r9 | ||
6449 | noname.595: | ||
6450 | |||
6451 | bicl3 #-65536,12(r3),r4 | ||
6452 | movzwl 14(r3),r1 | ||
6453 | bicl2 #-65536,r1 | ||
6454 | bicl3 #-65536,4(r3),r2 | ||
6455 | movzwl 6(r3),r0 | ||
6456 | bicl2 #-65536,r0 | ||
6457 | movl r4,r6 | ||
6458 | movl r1,r5 | ||
6459 | mull3 r0,r6,-28(fp) | ||
6460 | mull2 r2,r6 | ||
6461 | mull3 r2,r5,-32(fp) | ||
6462 | mull2 r0,r5 | ||
6463 | addl3 -28(fp),-32(fp),r0 | ||
6464 | bicl3 #0,r0,-28(fp) | ||
6465 | cmpl -28(fp),-32(fp) | ||
6466 | bgequ noname.596 | ||
6467 | addl2 #65536,r5 | ||
6468 | noname.596: | ||
6469 | movzwl -26(fp),r0 | ||
6470 | bicl2 #-65536,r0 | ||
6471 | addl2 r0,r5 | ||
6472 | bicl3 #-65536,-28(fp),r0 | ||
6473 | ashl #16,r0,-32(fp) | ||
6474 | addl2 -32(fp),r6 | ||
6475 | bicl2 #0,r6 | ||
6476 | cmpl r6,-32(fp) | ||
6477 | bgequ noname.597 | ||
6478 | incl r5 | ||
6479 | noname.597: | ||
6480 | movl r6,r3 | ||
6481 | movl r5,r2 | ||
6482 | bbc #31,r2,noname.598 | ||
6483 | incl r9 | ||
6484 | noname.598: | ||
6485 | addl2 r2,r2 | ||
6486 | bicl2 #0,r2 | ||
6487 | bbc #31,r3,noname.599 | ||
6488 | incl r2 | ||
6489 | noname.599: | ||
6490 | addl2 r3,r3 | ||
6491 | bicl2 #0,r3 | ||
6492 | addl2 r3,r8 | ||
6493 | bicl2 #0,r8 | ||
6494 | cmpl r8,r3 | ||
6495 | bgequ noname.600 | ||
6496 | incl r2 | ||
6497 | bicl3 #0,r2,r0 | ||
6498 | bneq noname.600 | ||
6499 | incl r9 | ||
6500 | noname.600: | ||
6501 | addl2 r2,r10 | ||
6502 | bicl2 #0,r10 | ||
6503 | cmpl r10,r2 | ||
6504 | bgequ noname.601 | ||
6505 | incl r9 | ||
6506 | noname.601: | ||
6507 | |||
6508 | movl 4(ap),r0 | ||
6509 | movl r8,16(r0) | ||
6510 | |||
6511 | clrl r8 | ||
6512 | |||
6513 | movl 8(ap),r0 | ||
6514 | bicl3 #-65536,12(r0),r3 | ||
6515 | movzwl 14(r0),r1 | ||
6516 | bicl2 #-65536,r1 | ||
6517 | bicl3 #-65536,8(r0),r2 | ||
6518 | movzwl 10(r0),r0 | ||
6519 | bicl2 #-65536,r0 | ||
6520 | movl r3,r5 | ||
6521 | movl r1,r4 | ||
6522 | mull3 r0,r5,-36(fp) | ||
6523 | mull2 r2,r5 | ||
6524 | mull3 r2,r4,-40(fp) | ||
6525 | mull2 r0,r4 | ||
6526 | addl3 -36(fp),-40(fp),r0 | ||
6527 | bicl3 #0,r0,-36(fp) | ||
6528 | cmpl -36(fp),-40(fp) | ||
6529 | bgequ noname.602 | ||
6530 | addl2 #65536,r4 | ||
6531 | noname.602: | ||
6532 | movzwl -34(fp),r0 | ||
6533 | bicl2 #-65536,r0 | ||
6534 | addl2 r0,r4 | ||
6535 | bicl3 #-65536,-36(fp),r0 | ||
6536 | ashl #16,r0,-40(fp) | ||
6537 | addl2 -40(fp),r5 | ||
6538 | bicl2 #0,r5 | ||
6539 | cmpl r5,-40(fp) | ||
6540 | bgequ noname.603 | ||
6541 | incl r4 | ||
6542 | noname.603: | ||
6543 | movl r5,r3 | ||
6544 | movl r4,r2 | ||
6545 | bbc #31,r2,noname.604 | ||
6546 | incl r8 | ||
6547 | noname.604: | ||
6548 | addl2 r2,r2 | ||
6549 | bicl2 #0,r2 | ||
6550 | bbc #31,r3,noname.605 | ||
6551 | incl r2 | ||
6552 | noname.605: | ||
6553 | addl2 r3,r3 | ||
6554 | bicl2 #0,r3 | ||
6555 | addl2 r3,r10 | ||
6556 | bicl2 #0,r10 | ||
6557 | cmpl r10,r3 | ||
6558 | bgequ noname.606 | ||
6559 | incl r2 | ||
6560 | bicl3 #0,r2,r0 | ||
6561 | bneq noname.606 | ||
6562 | incl r8 | ||
6563 | noname.606: | ||
6564 | addl2 r2,r9 | ||
6565 | bicl2 #0,r9 | ||
6566 | cmpl r9,r2 | ||
6567 | bgequ noname.607 | ||
6568 | incl r8 | ||
6569 | noname.607: | ||
6570 | |||
6571 | movl 4(ap),r4 | ||
6572 | movl r10,20(r4) | ||
6573 | |||
6574 | clrl r10 | ||
6575 | |||
6576 | movl 8(ap),r0 | ||
6577 | movl 12(r0),r3 | ||
6578 | bicl3 #-65536,r3,r5 | ||
6579 | extzv #16,#16,r3,r0 | ||
6580 | bicl3 #-65536,r0,r3 | ||
6581 | mull3 r5,r3,-44(fp) | ||
6582 | mull2 r5,r5 | ||
6583 | mull2 r3,r3 | ||
6584 | bicl3 #32767,-44(fp),r0 | ||
6585 | extzv #15,#17,r0,r0 | ||
6586 | addl2 r0,r3 | ||
6587 | bicl3 #-65536,-44(fp),r0 | ||
6588 | ashl #17,r0,-44(fp) | ||
6589 | addl2 -44(fp),r5 | ||
6590 | bicl2 #0,r5 | ||
6591 | cmpl r5,-44(fp) | ||
6592 | bgequ noname.608 | ||
6593 | incl r3 | ||
6594 | noname.608: | ||
6595 | movl r5,r1 | ||
6596 | movl r3,r2 | ||
6597 | addl2 r1,r9 | ||
6598 | bicl2 #0,r9 | ||
6599 | cmpl r9,r1 | ||
6600 | bgequ noname.609 | ||
6601 | incl r2 | ||
6602 | noname.609: | ||
6603 | addl2 r2,r8 | ||
6604 | bicl2 #0,r8 | ||
6605 | cmpl r8,r2 | ||
6606 | bgequ noname.610 | ||
6607 | incl r10 | ||
6608 | noname.610: | ||
6609 | |||
6610 | movl r9,24(r4) | ||
6611 | |||
6612 | movl r8,28(r4) | ||
6613 | |||
6614 | ret | ||
6615 | |||
6616 | ; For now, the code below doesn't work, so I end this prematurely. | ||
6617 | .end | ||
6618 | |||
6619 | .title vax_bn_div64 division 64/32=>32 | ||
6620 | ; | ||
6621 | ; r.l. 16-jan-1998 | ||
6622 | ; | ||
6623 | ; unsigned int bn_div64(unsigned long h, unsigned long l, unsigned long d) | ||
6624 | ; return <h,l>/d; | ||
6625 | ; | ||
6626 | |||
6627 | .psect code,nowrt | ||
6628 | |||
6629 | h=4 ;(AP) by value (input) | ||
6630 | l=8 ;(AP) by value (input) | ||
6631 | d=12 ;(AP) by value (input) | ||
6632 | |||
6633 | .entry bn_div64,^m<r2,r3,r4,r5,r6,r7,r8,r9> | ||
6634 | |||
6635 | movl l(ap),r2 ; l | ||
6636 | movl h(ap),r3 ; h | ||
6637 | movl d(ap),r4 ; d | ||
6638 | clrl r5 ; q | ||
6639 | clrl r6 ; r | ||
6640 | |||
6641 | ; Treat "negative" specially | ||
6642 | tstl r3 | ||
6643 | blss 30$ | ||
6644 | |||
6645 | tstl r4 | ||
6646 | beql 90$ | ||
6647 | |||
6648 | ediv r4,r2,r5,r6 | ||
6649 | bvs 666$ | ||
6650 | |||
6651 | movl r5,r0 | ||
6652 | ret | ||
6653 | |||
6654 | 30$: | ||
6655 | ; The theory here is to do some harmless shifting and a little | ||
6656 | ; bit of rounding (brackets are to designate when decimals are | ||
6657 | ; cut off): | ||
6658 | ; | ||
6659 | ; result = 2 * [ ([<h,0>/2] + [d/2]) / d ] + [ l / d ] | ||
6660 | |||
6661 | movl #0,r7 | ||
6662 | movl r3,r8 ; copy h | ||
6663 | ashq #-1,r7,r7 ; [<h,0>/2] => <r8,r7> | ||
6664 | bicl2 #^X80000000,r8 ; Remove "sign" | ||
6665 | |||
6666 | movl r4,r9 ; copy d | ||
6667 | ashl #-1,r9,r9 ; [d/2] => r9 | ||
6668 | bicl2 #^X80000000,r9 ; Remove "sign" | ||
6669 | |||
6670 | addl2 r9,r7 | ||
6671 | adwc #0,r8 ; [<h,0>/2] + [d/2] => <r8,r7> | ||
6672 | |||
6673 | ediv r4,r7,r5,r6 ; [ ([<h,0>/2] + [d/2]) / d ] => <r5,r6> | ||
6674 | bvs 666$ | ||
6675 | |||
6676 | movl #0,r6 | ||
6677 | ashq #1,r5,r5 ; 2 * [ ([<h,0>/2] + [d/2]) / d ] => r5 | ||
6678 | |||
6679 | movl #0,r3 | ||
6680 | ediv r4,r2,r8,r9 ; [ l / d ] => <r8,r9> | ||
6681 | |||
6682 | addl2 r8,r5 ; | ||
6683 | bcs 666$ | ||
6684 | |||
6685 | movl r5,r0 | ||
6686 | ret | ||
6687 | |||
6688 | 90$: | ||
6689 | movl #-1,r0 | ||
6690 | ret | ||
6691 | |||
6692 | 666$: | ||
6693 | |||
6694 | |||
6695 | .end | ||
diff --git a/src/lib/libcrypto/bn/asm/x86.pl b/src/lib/libcrypto/bn/asm/x86.pl new file mode 100644 index 0000000000..1bc4f1bb27 --- /dev/null +++ b/src/lib/libcrypto/bn/asm/x86.pl | |||
@@ -0,0 +1,28 @@ | |||
1 | #!/usr/local/bin/perl | ||
2 | |||
3 | push(@INC,"perlasm","../../perlasm"); | ||
4 | require "x86asm.pl"; | ||
5 | |||
6 | require("x86/mul_add.pl"); | ||
7 | require("x86/mul.pl"); | ||
8 | require("x86/sqr.pl"); | ||
9 | require("x86/div.pl"); | ||
10 | require("x86/add.pl"); | ||
11 | require("x86/sub.pl"); | ||
12 | require("x86/comba.pl"); | ||
13 | |||
14 | &asm_init($ARGV[0],$0); | ||
15 | |||
16 | &bn_mul_add_words("bn_mul_add_words"); | ||
17 | &bn_mul_words("bn_mul_words"); | ||
18 | &bn_sqr_words("bn_sqr_words"); | ||
19 | &bn_div_words("bn_div_words"); | ||
20 | &bn_add_words("bn_add_words"); | ||
21 | &bn_sub_words("bn_sub_words"); | ||
22 | &bn_mul_comba("bn_mul_comba8",8); | ||
23 | &bn_mul_comba("bn_mul_comba4",4); | ||
24 | &bn_sqr_comba("bn_sqr_comba8",8); | ||
25 | &bn_sqr_comba("bn_sqr_comba4",4); | ||
26 | |||
27 | &asm_finish(); | ||
28 | |||
diff --git a/src/lib/libcrypto/bn/asm/x86w16.asm b/src/lib/libcrypto/bn/asm/x86w16.asm index 74a933a8cd..80a9ed6eef 100644 --- a/src/lib/libcrypto/bn/asm/x86w16.asm +++ b/src/lib/libcrypto/bn/asm/x86w16.asm | |||
@@ -6,11 +6,11 @@ F_TEXT SEGMENT WORD PUBLIC 'CODE' | |||
6 | F_TEXT ENDS | 6 | F_TEXT ENDS |
7 | _DATA SEGMENT WORD PUBLIC 'DATA' | 7 | _DATA SEGMENT WORD PUBLIC 'DATA' |
8 | _DATA ENDS | 8 | _DATA ENDS |
9 | CONST SEGMENT WORD PUBLIC 'CONST' | 9 | _CONST SEGMENT WORD PUBLIC 'CONST' |
10 | CONST ENDS | 10 | _CONST ENDS |
11 | _BSS SEGMENT WORD PUBLIC 'BSS' | 11 | _BSS SEGMENT WORD PUBLIC 'BSS' |
12 | _BSS ENDS | 12 | _BSS ENDS |
13 | DGROUP GROUP CONST, _BSS, _DATA | 13 | DGROUP GROUP _CONST, _BSS, _DATA |
14 | ASSUME DS: DGROUP, SS: DGROUP | 14 | ASSUME DS: DGROUP, SS: DGROUP |
15 | F_TEXT SEGMENT | 15 | F_TEXT SEGMENT |
16 | ASSUME CS: F_TEXT | 16 | ASSUME CS: F_TEXT |
diff --git a/src/lib/libcrypto/bn/asm/x86w32.asm b/src/lib/libcrypto/bn/asm/x86w32.asm index fc6f917714..957d71e3b1 100644 --- a/src/lib/libcrypto/bn/asm/x86w32.asm +++ b/src/lib/libcrypto/bn/asm/x86w32.asm | |||
@@ -6,11 +6,11 @@ F_TEXT SEGMENT WORD USE16 PUBLIC 'CODE' | |||
6 | F_TEXT ENDS | 6 | F_TEXT ENDS |
7 | _DATA SEGMENT WORD USE16 PUBLIC 'DATA' | 7 | _DATA SEGMENT WORD USE16 PUBLIC 'DATA' |
8 | _DATA ENDS | 8 | _DATA ENDS |
9 | CONST SEGMENT WORD USE16 PUBLIC 'CONST' | 9 | _CONST SEGMENT WORD USE16 PUBLIC 'CONST' |
10 | CONST ENDS | 10 | _CONST ENDS |
11 | _BSS SEGMENT WORD USE16 PUBLIC 'BSS' | 11 | _BSS SEGMENT WORD USE16 PUBLIC 'BSS' |
12 | _BSS ENDS | 12 | _BSS ENDS |
13 | DGROUP GROUP CONST, _BSS, _DATA | 13 | DGROUP GROUP _CONST, _BSS, _DATA |
14 | ASSUME DS: DGROUP, SS: DGROUP | 14 | ASSUME DS: DGROUP, SS: DGROUP |
15 | F_TEXT SEGMENT | 15 | F_TEXT SEGMENT |
16 | ASSUME CS: F_TEXT | 16 | ASSUME CS: F_TEXT |
@@ -89,7 +89,7 @@ $L555: | |||
89 | mov bp,WORD PTR [bp+26] ; load num | 89 | mov bp,WORD PTR [bp+26] ; load num |
90 | and bp,3 | 90 | and bp,3 |
91 | dec bp | 91 | dec bp |
92 | js $L547 | 92 | js $L547m |
93 | 93 | ||
94 | mov eax,ecx | 94 | mov eax,ecx |
95 | mul DWORD PTR es:[bx] ; w* *a | 95 | mul DWORD PTR es:[bx] ; w* *a |
@@ -100,7 +100,7 @@ $L555: | |||
100 | mov DWORD PTR ds:[di],eax | 100 | mov DWORD PTR ds:[di],eax |
101 | mov esi,edx | 101 | mov esi,edx |
102 | dec bp | 102 | dec bp |
103 | js $L547 ; Note that we are now testing for -1 | 103 | js $L547m ; Note that we are now testing for -1 |
104 | ; | 104 | ; |
105 | mov eax,ecx | 105 | mov eax,ecx |
106 | mul DWORD PTR es:[bx+4] ; w* *a | 106 | mul DWORD PTR es:[bx+4] ; w* *a |
@@ -111,7 +111,7 @@ $L555: | |||
111 | mov DWORD PTR ds:[di+4],eax | 111 | mov DWORD PTR ds:[di+4],eax |
112 | mov esi,edx | 112 | mov esi,edx |
113 | dec bp | 113 | dec bp |
114 | js $L547 | 114 | js $L547m |
115 | ; | 115 | ; |
116 | mov eax,ecx | 116 | mov eax,ecx |
117 | mul DWORD PTR es:[bx+8] ; w* *a | 117 | mul DWORD PTR es:[bx+8] ; w* *a |
@@ -121,7 +121,7 @@ $L555: | |||
121 | adc edx,0 | 121 | adc edx,0 |
122 | mov DWORD PTR ds:[di+8],eax | 122 | mov DWORD PTR ds:[di+8],eax |
123 | mov esi,edx | 123 | mov esi,edx |
124 | $L547: | 124 | $L547m: |
125 | mov eax,esi | 125 | mov eax,esi |
126 | mov edx,esi | 126 | mov edx,esi |
127 | shr edx,16 | 127 | shr edx,16 |
@@ -315,37 +315,35 @@ _bn_add_words PROC FAR | |||
315 | ; ap = 22 | 315 | ; ap = 22 |
316 | ; rp = 18 | 316 | ; rp = 18 |
317 | xor esi,esi ;c=0; | 317 | xor esi,esi ;c=0; |
318 | mov bx,WORD PTR [bp+18] ; load low r | ||
318 | mov si,WORD PTR [bp+22] ; load a | 319 | mov si,WORD PTR [bp+22] ; load a |
319 | mov es,WORD PTR [bp+24] ; load a | 320 | mov es,WORD PTR [bp+24] ; load a |
320 | mov di,WORD PTR [bp+26] ; load b | 321 | mov di,WORD PTR [bp+26] ; load b |
321 | mov ds,WORD PTR [bp+28] ; load b | 322 | mov ds,WORD PTR [bp+28] ; load b |
322 | 323 | ||
323 | mov dx,WORD PTR [bp+30] ; load num | 324 | mov dx,WORD PTR [bp+30] ; load num |
324 | dec dx | ||
325 | js $L547 | ||
326 | xor ecx,ecx | 325 | xor ecx,ecx |
326 | dec dx | ||
327 | js $L547a | ||
327 | 328 | ||
328 | $L5477: | 329 | $L5477: |
329 | xor ebx,ebx | ||
330 | mov eax,DWORD PTR es:[si] ; *a | 330 | mov eax,DWORD PTR es:[si] ; *a |
331 | add eax,ecx | 331 | add eax,ecx |
332 | adc ebx,0 | 332 | mov ecx,0 |
333 | adc ecx,0 | ||
333 | add si,4 ; a++ | 334 | add si,4 ; a++ |
334 | add eax,DWORD PTR ds:[di] ; + *b | 335 | add eax,DWORD PTR ds:[di] ; + *b |
335 | mov ecx,ebx | ||
336 | adc ecx,0 | 336 | adc ecx,0 |
337 | add di,4 | ||
338 | mov bx,WORD PTR [bp+18] | ||
339 | mov ds,WORD PTR [bp+20] | 337 | mov ds,WORD PTR [bp+20] |
338 | add di,4 | ||
340 | mov DWORD PTR ds:[bx],eax | 339 | mov DWORD PTR ds:[bx],eax |
341 | add bx,4 | ||
342 | mov ds,WORD PTR [bp+28] | 340 | mov ds,WORD PTR [bp+28] |
343 | mov WORD PTR [bp+18],bx | 341 | add bx,4 |
344 | dec dx | 342 | dec dx |
345 | js $L547 ; Note that we are now testing for -1 | 343 | js $L547a ; Note that we are now testing for -1 |
346 | jmp $L5477 | 344 | jmp $L5477 |
347 | ; | 345 | ; |
348 | $L547: | 346 | $L547a: |
349 | mov eax,ecx | 347 | mov eax,ecx |
350 | mov edx,ecx | 348 | mov edx,ecx |
351 | shr edx,16 | 349 | shr edx,16 |