|
|
Power 6/32 Unix version 1.21
1 00000000 LL0:
2 00000000 .data
3 00000a60 * .text
4 00000000 .align 1
5 00000000 .globl _sqrtf
6 00000000 _sqrtf:
7 000200FC 0000 .word L215
8 000200FE # #include "fpp_defs.h"
9 000200FE #
10 000200FE #
11 000200FE #
12 000200FE # /***************************************************************************
13 000200FE # *
14 000200FE # * SQRTF - SINGLE PRECISION FLOATING POINT SQUARE-ROOT FUNCTION TEST
15 000200FE # *
16 000200FE # * SQRTF TEST MONITOR
17 000200FE # *
18 000200FE # *****************************************************************************/
19 000200FE # sqrtf()
20 000200FE # {
21 000200FE 11 4f jbr L217
22 00020100 L218:
23 00020100 # asm(".globl _sqrtf_t");
24 00020100 .globl _sqrtf_t
25 00020100 # asm("_sqrtf_t:"); /* entry address */
26 00020100 _sqrtf_t:
27 00020100 # if( ( cycle == 1 ) && ( prt_hdrs ) ) /* print headers on 1st pass */
28 00020100 1d effffffff6 01 cmpl _cycle,$1
29 00020107 21 15 jneq L219
30 00020109 5d efffffffed tstl _prt_hdrs
31 0002010F 31 0d jeql L219
32 00020111 # {
33 00020111 # writes(" SQRTF");
34 00020111 .data 1
35 00000a60 * L221:
36 00000a60 * 20535152544600 .ascii " SQRTF\0"
37 00000a67 * .text
38 00020111 dd 8f00000a60 pushl $L221
39 00020117 fe 08 efffffffde callf $8,_writes
40 0002011E # }
41 0002011E # sqrtf_1(); /* test square root w/ delay */
42 0002011E L219:
43 0002011E fe 04 ef0000002d callf $4,_sqrtf_1
44 00020125 # sqrtf_2(); /* test square root */
45 00020125 fe 04 ef00000198 callf $4,_sqrtf_2
46 0002012C # sqrtf_3(); /* register corruption */
47 0002012C fe 04 ef000002f1 callf $4,_sqrtf_3
48 00020133 # sqrtf_4(); /* test the PSL */
49 00020133 fe 04 ef000004d4 callf $4,_sqrtf_4
50 0002013A # sqrtf_5(); /* pipelined entry */
51 0002013A fe 04 ef0000067d callf $4,_sqrtf_5
52 00020141 # sqrtf_6(); /* pipelined exit */
53 00020141 fe 04 ef000007d2 callf $4,_sqrtf_6
54 00020148 # asm("jmp *return"); /* return to the test monitor */
55 00020148 71 ffffffffae jmp *return
56 0002014E # }
57 0002014E 40 ret#2
58 0002014F .set L215,0x0
59 0002014F L217:
60 0002014F 11 af jbr L218
61 00020151 .data
62 00000a60 * .text
63 00020151 00 .align 1
64 00020152 .globl _sqrtf_1
65 00020152 _sqrtf_1:
66 00020152 0000 .word L228
67 00020154 #
68 00020154 # /***************************************************************************
69 00020154 # *
70 00020154 # * SUBTEST 1 - SQUARE-ROOT FUNCTION
71 00020154 # *
72 00020154 # ***************************************************************************/
73 00020154 # sqrtf_1()
74 00020154 # {
75 00020154 13 016a jbr L230
76 00020157 L231:
77 00020157 # #define DELAY 5 /* wait 10 ticks between SQRTF & STF */
78 00020157 # force_loop = FALSE; /* clear the LOOP flag */
79 00020157 4d efffffff9f clrl _force_loop
80 0002015D # subtest = 1;
81 0002015D 0d 01 efffffff98 movl $1,_subtest
82 00020164 # index = 0;
83 00020164 4d efffffff92 clrl _index
84 0002016A # do
85 0002016A L234:
86 0002016A # {
87 0002016A # sgl_ld_acc = sqrtf_1_data[index].ld; /* get the operand */
88 0002016A 0d efffffff8c 50 movl _index,r0
89 00020171 48 03 50 50 shll $3,r0,r0
90 00020175 0d e000000000 efffffff7c movl _sqrtf_1_data(r0),_sgl_ld_acc
91 00020180 # sgl_expected = sqrtf_1_data[index].exp; /* get expected results */
92 00020180 0d efffffff76 50 movl _index,r0
93 00020187 48 03 50 50 shll $3,r0,r0
94 0002018B 0d e000000004 efffffff66 movl _sqrtf_1_data+4(r0),_sgl_expected
95 00020196 # sgl_dummy1 = DELAY;
96 00020196 0d 05 efffffff5f movl $5,_sgl_dummy1
97 0002019D # /*
98 0002019D # * If LOOP ON ERROR is set, this is the loop for this subtest.
99 0002019D # * The force loop flag is set after the first error.
100 0002019D # */
101 0002019D # asm("_sqrtf_1_lp1:");
102 0002019D _sqrtf_1_lp1:
103 0002019D # asm("movl _sgl_ld_acc,r4"); /* set the data to load */
104 0002019D 0d efffffff59 54 movl _sgl_ld_acc,r4
105 000201A4 # asm("ldf r4"); /* load the accumulator */
106 000201A4 06 54 ldf r4
107 000201A6 # asm("movl _sgl_dummy1,r0"); /* get the delay factor */
108 000201A6 0d efffffff50 50 movl _sgl_dummy1,r0
109 000201AD # asm("sqrtf"); /* get ACC.'s square root */
110 000201AD 45 sqrtf
111 000201AE # asm("1:");
112 000201AE 1:
113 000201AE # asm("decl r0"); /* delay to let the SQRTF */
114 000201AE 7d 50 decl r0
115 000201B0 # asm("bgtr 1b"); /* instruction finish */
116 000201B0 41 fc bgtr 1b
117 000201B2 # asm("stf r5"); /* store the result */
118 000201B2 26 55 stf r5
119 000201B4 # if( force_loop )
120 000201B4 5d efffffff42 tstl _force_loop
121 000201BA 31 02 jeql L235
122 000201BC # asm("brb _sqrtf_1_lp1");; /* loop on the error */
123 000201BC 11 df brb _sqrtf_1_lp1
124 000201BE L235:
125 000201BE # /*
126 000201BE # * end error loop
127 000201BE # */
128 000201BE # asm("movl r5,_sgl_st_acc"); /* save the result */
129 000201BE 0d 55 efffffff37 movl r5,_sgl_st_acc
130 000201C5 # if( sgl_st_acc != sgl_expected ) /* COMPARE the values */
131 000201C5 1d efffffff31 efffffff2c cmpl _sgl_st_acc,_sgl_expected
132 000201D0 21 03 13 00d2 jeql L236
133 000201D5 # {
134 000201D5 # errcnt++; /* bump the error count */
135 000201D5 6d efffffff21 incl _errcnt
136 000201DB # if ( prt_error ) {
137 000201DB 5d efffffff1b tstl _prt_error
138 000201E1 21 03 13 009b jeql L237
139 000201E6 # writes(" \n"); /* start a new print line */
140 000201E6 .data 1
141 00000a67 * L238:
142 00000a67 * 200A00 .ascii " \12\0"
143 00000a6a * .text
144 000201E6 dd 8f00000a67 pushl $L238
145 000201EC fe 08 efffffff09 callf $8,_writes
146 000201F3 # writes("cycle: ");
147 000201F3 .data 1
148 00000a6a * L239:
149 00000a6a * 6379636C653A2000 .ascii "cycle: \0"
150 00000a72 * .text
151 000201F3 dd 8f00000a6a pushl $L239
152 000201F9 fe 08 effffffefc callf $8,_writes
153 00020200 # writed( cycle );
154 00020200 dd effffffef6 pushl _cycle
155 00020206 fe 08 effffffeef callf $8,_writed
156 0002020D # writes(" SQRTF test ");
157 0002020D .data 1
158 00000a72 * L241:
159 00000a72 * 2020535152544620746573742 .ascii " SQRTF test \0"
000
160 00000a80 * .text
161 0002020D dd 8f00000a72 pushl $L241
162 00020213 fe 08 effffffee2 callf $8,_writes
163 0002021A # writed( test_no );
164 0002021A dd effffffedc pushl _test_no
165 00020220 fe 08 effffffed5 callf $8,_writed
166 00020227 # writes(", subtest 1 (delayed store) - BAD FINAL ACC\n");
167 00020227 .data 1
168 00000a80 * L242:
169 00000a80 * 2C20737562746573742031202 .ascii ", subtest 1 (delayed store) - BAD FINAL ACC\12\0"
864656C617965642073746F72
6529202D204241442046494E4
14C204143430A00
170 00000aad * .text
171 00020227 dd 8f00000a80 pushl $L242
172 0002022D fe 08 effffffec8 callf $8,_writes
173 00020234 # print_sqrtf_data();
174 00020234 fe 04 ef0000083b callf $4,_print_sqrtf_data
175 0002023B # writes(", data index = ");
176 0002023B .data 1
177 00000aad * L244:
178 00000aad * 2C20206461746120696E64657 .ascii ", data index = \0"
8203D2000
179 00000abe * .text
180 0002023B dd 8f00000aad pushl $L244
181 00020241 fe 08 effffffeb4 callf $8,_writes
182 00020248 # writed( index );
183 00020248 dd effffffeae pushl _index
184 0002024E fe 08 effffffea7 callf $8,_writed
185 00020255 # writec('\n');
186 00020255 dd 0a pushl $10
187 00020257 fe 08 effffffe9e callf $8,_writec
188 0002025E # writes(" Acc expected = ");
189 0002025E .data 1
190 00000abe * L246:
191 00000abe * 2020202020202020202020202 .ascii " Acc expected = \0"
0202020202020202020416363
206578706563746564203D200
0
192 00000ae4 * .text
193 0002025E dd 8f00000abe pushl $L246
194 00020264 fe 08 effffffe91 callf $8,_writes
195 0002026B # write32h( sgl_expected );
196 0002026B dd effffffe8b pushl _sgl_expected
197 00020271 fe 08 effffffe84 callf $8,_write32h
198 00020278 # writec('\n');
199 00020278 dd 0a pushl $10
200 0002027A fe 08 effffffe7b callf $8,_writec
201 00020281 # }
202 00020281 # if ( halt_flg ) /* halt on error? */
203 00020281 L237:
204 00020281 5d effffffe75 tstl _halt_flg
205 00020287 31 09 jeql L248
206 00020289 # sqrtf_er_halt( BAD_ACC_HLT );
207 00020289 dd 01 pushl $1
208 0002028B fe 08 ef00000820 callf $8,_sqrtf_er_halt
209 00020292 # if ( loop_on_err )
210 00020292 L248:
211 00020292 5d effffffe64 tstl _loop_on_err
212 00020298 31 0d jeql L250
213 0002029A # {
214 0002029A # force_loop = TRUE; /* set the force loop flag */
215 0002029A 0d 01 effffffe5b movl $1,_force_loop
216 000202A1 # asm("jmp _sqrtf_1_lp1"); /* and loop */
217 000202A1 71 effffffef6 jmp _sqrtf_1_lp1
218 000202A7 # }
219 000202A7 # } /* end of compare error */
220 000202A7 L250:
221 000202A7 # } while( index++ < max_sqrtf_1_index );
222 000202A7 L236:
223 000202A7 L233:
224 000202A7 0d effffffe4f 50 movl _index,r0
225 000202AE 6d effffffe48 incl _index
226 000202B4 1d 50 effffffe41 cmpl r0,_max_sqrtf_1_index
227 000202BB 81 03 13 feaa jlss L234
228 000202C0 L232:
229 000202C0 # } /* end of subtest 1 */
230 000202C0 40 ret#2
231 000202C1 .set L228,0x0
232 000202C1 L230:
233 000202C1 13 fe93 jbr L231
234 000202C4 .data
235 00000a60 * .text
236 000202C4 .align 1
237 000202C4 .globl _sqrtf_2
238 000202C4 _sqrtf_2:
239 000202C4 0000 .word L251
240 000202C6 #
241 000202C6 #
242 000202C6 #
243 000202C6 # /***************************************************************************
244 000202C6 # *
245 000202C6 # * SUBTEST 2 - SQUARE-ROOT FUNCTION
246 000202C6 # *
247 000202C6 # ***************************************************************************/
248 000202C6 # sqrtf_2()
249 000202C6 # {
250 000202C6 13 0158 jbr L253
251 000202C9 L254:
252 000202C9 # force_loop = FALSE; /* clear the LOOP flag */
253 000202C9 4d effffffe2d clrl _force_loop
254 000202CF # subtest = 2;
255 000202CF 0d 02 effffffe26 movl $2,_subtest
256 000202D6 # index = 0;
257 000202D6 4d effffffe20 clrl _index
258 000202DC # do
259 000202DC L257:
260 000202DC # {
261 000202DC # sgl_ld_acc = sqrtf_1_data[index].ld; /* get the operand */
262 000202DC 0d effffffe1a 50 movl _index,r0
263 000202E3 48 03 50 50 shll $3,r0,r0
264 000202E7 0d e000000000 effffffe0a movl _sqrtf_1_data(r0),_sgl_ld_acc
265 000202F2 # sgl_expected = sqrtf_1_data[index].exp; /* get expected results */
266 000202F2 0d effffffe04 50 movl _index,r0
267 000202F9 48 03 50 50 shll $3,r0,r0
268 000202FD 0d e000000004 effffffdf4 movl _sqrtf_1_data+4(r0),_sgl_expected
269 00020308 # /*
270 00020308 # * If LOOP ON ERROR is set, this is the loop for this subtest.
271 00020308 # * The force loop flag is set after the first error.
272 00020308 # */
273 00020308 # asm("_sqrtf_2_lp1:");
274 00020308 _sqrtf_2_lp1:
275 00020308 # asm("movl _sgl_ld_acc,r4"); /* set the data to load */
276 00020308 0d effffffdee 54 movl _sgl_ld_acc,r4
277 0002030F # asm("ldf r4"); /* load the accumulator */
278 0002030F 06 54 ldf r4
279 00020311 # asm("sqrtf"); /* get ACC.'s square root */
280 00020311 45 sqrtf
281 00020312 # asm("stf r5"); /* store the result */
282 00020312 26 55 stf r5
283 00020314 # if( force_loop )
284 00020314 5d effffffde2 tstl _force_loop
285 0002031A 31 02 jeql L258
286 0002031C # asm("brb _sqrtf_2_lp1");; /* loop on the error */
287 0002031C 11 ea brb _sqrtf_2_lp1
288 0002031E L258:
289 0002031E # /*
290 0002031E # * end error loop
291 0002031E # */
292 0002031E # asm("movl r5,_sgl_st_acc"); /* save the result */
293 0002031E 0d 55 effffffdd7 movl r5,_sgl_st_acc
294 00020325 # if( sgl_st_acc != sgl_expected ) /* COMPARE the values */
295 00020325 1d effffffdd1 effffffdcc cmpl _sgl_st_acc,_sgl_expected
296 00020330 21 03 13 00d2 jeql L259
297 00020335 # {
298 00020335 # errcnt++; /* bump the error count */
299 00020335 6d effffffdc1 incl _errcnt
300 0002033B # if ( prt_error ) {
301 0002033B 5d effffffdbb tstl _prt_error
302 00020341 21 03 13 009b jeql L260
303 00020346 # writes(" \n"); /* start a new print line */
304 00020346 .data 1
305 00000ae4 * L261:
306 00000ae4 * 200A00 .ascii " \12\0"
307 00000ae7 * .text
308 00020346 dd 8f00000ae4 pushl $L261
309 0002034C fe 08 effffffda9 callf $8,_writes
310 00020353 # writes("cycle: ");
311 00020353 .data 1
312 00000ae7 * L262:
313 00000ae7 * 6379636C653A2000 .ascii "cycle: \0"
314 00000aef * .text
315 00020353 dd 8f00000ae7 pushl $L262
316 00020359 fe 08 effffffd9c callf $8,_writes
317 00020360 # writed( cycle );
318 00020360 dd effffffd96 pushl _cycle
319 00020366 fe 08 effffffd8f callf $8,_writed
320 0002036D # writes(" SQRTF test ");
321 0002036D .data 1
322 00000aef * L263:
323 00000aef * 2020535152544620746573742 .ascii " SQRTF test \0"
000
324 00000afd * .text
325 0002036D dd 8f00000aef pushl $L263
326 00020373 fe 08 effffffd82 callf $8,_writes
327 0002037A # writed( test_no );
328 0002037A dd effffffd7c pushl _test_no
329 00020380 fe 08 effffffd75 callf $8,_writed
330 00020387 # writes(", subtest 2 (immediate store) - BAD FINAL ACC\n");
331 00020387 .data 1
332 00000afd * L264:
333 00000afd * 2C20737562746573742032202 .ascii ", subtest 2 (immediate store) - BAD FINAL ACC\12\0"
8696D6D656469617465207374
6F726529202D2042414420464
94E414C204143430A00
334 00000b2c * .text
335 00020387 dd 8f00000afd pushl $L264
336 0002038D fe 08 effffffd68 callf $8,_writes
337 00020394 # print_sqrtf_data();
338 00020394 fe 04 ef000006db callf $4,_print_sqrtf_data
339 0002039B # writes(", data index = ");
340 0002039B .data 1
341 00000b2c * L265:
342 00000b2c * 2C20206461746120696E64657 .ascii ", data index = \0"
8203D2000
343 00000b3d * .text
344 0002039B dd 8f00000b2c pushl $L265
345 000203A1 fe 08 effffffd54 callf $8,_writes
346 000203A8 # writed( index );
347 000203A8 dd effffffd4e pushl _index
348 000203AE fe 08 effffffd47 callf $8,_writed
349 000203B5 # writec('\n');
350 000203B5 dd 0a pushl $10
351 000203B7 fe 08 effffffd3e callf $8,_writec
352 000203BE # writes(" Acc expected = ");
353 000203BE .data 1
354 00000b3d * L266:
355 00000b3d * 2020202020202020202020202 .ascii " Acc expected = \0"
0202020202020202020416363
206578706563746564203D200
0
356 00000b63 * .text
357 000203BE dd 8f00000b3d pushl $L266
358 000203C4 fe 08 effffffd31 callf $8,_writes
359 000203CB # write32h( sgl_expected );
360 000203CB dd effffffd2b pushl _sgl_expected
361 000203D1 fe 08 effffffd24 callf $8,_write32h
362 000203D8 # writec('\n');
363 000203D8 dd 0a pushl $10
364 000203DA fe 08 effffffd1b callf $8,_writec
365 000203E1 # }
366 000203E1 # if ( halt_flg ) /* halt on error? */
367 000203E1 L260:
368 000203E1 5d effffffd15 tstl _halt_flg
369 000203E7 31 09 jeql L267
370 000203E9 # sqrtf_er_halt( BAD_ACC_HLT );
371 000203E9 dd 01 pushl $1
372 000203EB fe 08 ef000006c0 callf $8,_sqrtf_er_halt
373 000203F2 # if ( loop_on_err )
374 000203F2 L267:
375 000203F2 5d effffffd04 tstl _loop_on_err
376 000203F8 31 0d jeql L268
377 000203FA # {
378 000203FA # force_loop = TRUE; /* set the force loop flag */
379 000203FA 0d 01 effffffcfb movl $1,_force_loop
380 00020401 # asm("jmp _sqrtf_2_lp1"); /* and loop */
381 00020401 71 efffffff01 jmp _sqrtf_2_lp1
382 00020407 # }
383 00020407 # } /* end of compare error */
384 00020407 L268:
385 00020407 # } while( index++ < max_sqrtf_1_index );
386 00020407 L259:
387 00020407 L256:
388 00020407 0d effffffcef 50 movl _index,r0
389 0002040E 6d effffffce8 incl _index
390 00020414 1d 50 effffffce1 cmpl r0,_max_sqrtf_1_index
391 0002041B 81 03 13 febc jlss L257
392 00020420 L255:
393 00020420 # } /* end of subtest 2 */
394 00020420 40 ret#2
395 00020421 .set L251,0x0
396 00020421 L253:
397 00020421 13 fea5 jbr L254
398 00020424 .data
399 00000a60 * .text
400 00020424 .align 1
401 00020424 .globl _sqrtf_3
402 00020424 _sqrtf_3:
403 00020424 0000 .word L269
404 00020426 #
405 00020426 #
406 00020426 #
407 00020426 # /***************************************************************************
408 00020426 # *
409 00020426 # * SUBTEST 3 - REGISTER INTEGRITY WITH THE SQRTF FUNCTION
410 00020426 # *
411 00020426 # ***************************************************************************/
412 00020426 # sqrtf_3()
413 00020426 # {
414 00020426 13 01e1 jbr L271
415 00020429 L272:
416 00020429 # fill_reg_buf( load_regs ); /* set reg values to load */
417 00020429 dd 8f00000000 pushl $_load_regs
418 0002042F fe 08 effffffcc6 callf $8,_fill_reg_buf
419 00020436 # force_loop = FALSE; /* clear the LOOP flag */
420 00020436 4d effffffcc0 clrl _force_loop
421 0002043C # subtest = 3;
422 0002043C 0d 03 effffffcb9 movl $3,_subtest
423 00020443 # index = 0;
424 00020443 4d effffffcb3 clrl _index
425 00020449 # do
426 00020449 L276:
427 00020449 # {
428 00020449 # sgl_ld_acc = sqrtf_1_data[index].ld; /* get the operand */
429 00020449 0d effffffcad 50 movl _index,r0
430 00020450 48 03 50 50 shll $3,r0,r0
431 00020454 0d e000000000 effffffc9d movl _sqrtf_1_data(r0),_sgl_ld_acc
432 0002045F # sgl_expected = sqrtf_1_data[index].exp; /* get expected results */
433 0002045F 0d effffffc97 50 movl _index,r0
434 00020466 48 03 50 50 shll $3,r0,r0
435 0002046A 0d e000000004 effffffc87 movl _sqrtf_1_data+4(r0),_sgl_expected
436 00020475 # /*
437 00020475 # * If LOOP ON ERROR is set, this is the loop for this subtest.
438 00020475 # * The force loop flag is set after the first error.
439 00020475 # */
440 00020475 # asm("_sqrtf_3_lp1:");
441 00020475 _sqrtf_3_lp1:
442 00020475 # asm("loadr $0x1fff,_load_regs"); /* load regs 0 - 12 */
443 00020475 ab 891fff effffffc7e loadr $0x1fff,_load_regs
444 0002047E # asm("ldf _sgl_ld_acc"); /* load the accumulator */
445 0002047E 06 effffffc78 ldf _sgl_ld_acc
446 00020484 # asm("sqrtf"); /* get ACC.'s sqrt */
447 00020484 45 sqrtf
448 00020485 # asm("stf _sgl_st_acc"); /* store the result */
449 00020485 26 effffffc71 stf _sgl_st_acc
450 0002048B # asm("storer $0x1fff,_store_regs"); /* store regs 0 - 12 */
451 0002048B bb 891fff effffffc68 storer $0x1fff,_store_regs
452 00020494 # if( force_loop )
453 00020494 5d effffffc62 tstl _force_loop
454 0002049A 31 02 jeql L277
455 0002049C # asm("brb _sqrtf_3_lp1");; /* loop on the error */
456 0002049C 11 d7 brb _sqrtf_3_lp1
457 0002049E L277:
458 0002049E # /*
459 0002049E # * end error loop
460 0002049E # */
461 0002049E # reg_no = 0;
462 0002049E 4d effffffc58 clrl _reg_no
463 000204A4 # regs_ok = TRUE;
464 000204A4 0d 01 effffffc51 movl $1,_regs_ok
465 000204AB # while( (reg_no < 13) && (regs_ok) ) /* check 1st 12 regs */
466 000204AB L278:
467 000204AB 1d effffffc4b 0d cmpl _reg_no,$13
468 000204B2 81 35 jgeq L279
469 000204B4 5d effffffc42 tstl _regs_ok
470 000204BA 31 2d jeql L279
471 000204BC # if( store_regs[ reg_no ] == load_regs[ reg_no ] )
472 000204BC 0d effffffc3a 50 movl _reg_no,r0
473 000204C3 0d effffffc33 51 movl _reg_no,r1
474 000204CA 1d 40effffffc2b cmpl _store_regs[r0],_load_regs[r1]
41effffffc25
475 000204D7 21 08 jneq L280
476 000204D9 # reg_no++;
477 000204D9 6d effffffc1d incl _reg_no
478 000204DF # else
479 000204DF 11 06 jbr L281
480 000204E1 L280:
481 000204E1 # regs_ok = FALSE;
482 000204E1 4d effffffc15 clrl _regs_ok
483 000204E7 L281:
484 000204E7 11 c2 jbr L278
485 000204E9 L279:
486 000204E9 # if( !regs_ok )
487 000204E9 5d effffffc0d tstl _regs_ok
488 000204EF 31 03 13 00fc jneq L282
489 000204F4 # {
490 000204F4 # errcnt++; /* bump the error count */
491 000204F4 6d effffffc02 incl _errcnt
492 000204FA # if ( prt_error ) {
493 000204FA 5d effffffbfc tstl _prt_error
494 00020500 21 03 13 00eb jeql L283
495 00020505 # writes(" \n"); /* start a new print line */
496 00020505 .data 1
497 00000b63 * L284:
498 00000b63 * 200A00 .ascii " \12\0"
499 00000b66 * .text
500 00020505 dd 8f00000b63 pushl $L284
501 0002050B fe 08 effffffbea callf $8,_writes
502 00020512 # writes("cycle: ");
503 00020512 .data 1
504 00000b66 * L285:
505 00000b66 * 6379636C653A2000 .ascii "cycle: \0"
506 00000b6e * .text
507 00020512 dd 8f00000b66 pushl $L285
508 00020518 fe 08 effffffbdd callf $8,_writes
509 0002051F # writed( cycle );
510 0002051F dd effffffbd7 pushl _cycle
511 00020525 fe 08 effffffbd0 callf $8,_writed
512 0002052C # writes(" SQRTF test ");
513 0002052C .data 1
514 00000b6e * L286:
515 00000b6e * 2020535152544620746573742 .ascii " SQRTF test \0"
000
516 00000b7c * .text
517 0002052C dd 8f00000b6e pushl $L286
518 00020532 fe 08 effffffbc3 callf $8,_writes
519 00020539 # writed( test_no );
520 00020539 dd effffffbbd pushl _test_no
521 0002053F fe 08 effffffbb6 callf $8,_writed
522 00020546 # writes(", subtest 3 - A REGISTER WAS MODIFIED\n"); {
523 00020546 .data 1
524 00000b7c * L287:
525 00000b7c * 2C20737562746573742033202 .ascii ", subtest 3 - A REGISTER WAS MODIFIED\12\0"
D204120524547495354455220
574153204D4F4449464945440
A00
526 00000ba3 * .text
527 00020546 dd 8f00000b7c pushl $L287
528 0002054C fe 08 effffffba9 callf $8,_writes
529 00020553 # print_sqrtf_data();
530 00020553 fe 04 ef0000051c callf $4,_print_sqrtf_data
531 0002055A # writec('\n');
532 0002055A dd 0a pushl $10
533 0002055C fe 08 effffffb99 callf $8,_writec
534 00020563 # writes("register ");
535 00020563 .data 1
536 00000ba3 * L288:
537 00000ba3 * 72656769737465722000 .ascii "register \0"
538 00000bad * .text
539 00020563 dd 8f00000ba3 pushl $L288
540 00020569 fe 08 effffffb8c callf $8,_writes
541 00020570 # writed( reg_no );
542 00020570 dd effffffb86 pushl _reg_no
543 00020576 fe 08 effffffb7f callf $8,_writed
544 0002057D # writes(" = ");
545 0002057D .data 1
546 00000bad * L289:
547 00000bad * 203D2000 .ascii " = \0"
548 00000bb1 * .text
549 0002057D dd 8f00000bad pushl $L289
550 00020583 fe 08 effffffb72 callf $8,_writes
551 0002058A # write32h( load_regs[reg_no] );
552 0002058A 0d effffffb6c 50 movl _reg_no,r0
553 00020591 dd 40effffffb64 pushl _load_regs[r0]
554 00020598 fe 08 effffffb5d callf $8,_write32h
555 0002059F # writes(", should be = ");
556 0002059F .data 1
557 00000bb1 * L290:
558 00000bb1 * 2C202073686F756C642062652 .ascii ", should be = \0"
03D2000
559 00000bc1 * .text
560 0002059F dd 8f00000bb1 pushl $L290
561 000205A5 fe 08 effffffb50 callf $8,_writes
562 000205AC # write32h( store_regs[reg_no] );
563 000205AC 0d effffffb4a 50 movl _reg_no,r0
564 000205B3 dd 40effffffb42 pushl _store_regs[r0]
565 000205BA fe 08 effffffb3b callf $8,_write32h
566 000205C1 # writec('\n');
567 000205C1 dd 0a pushl $10
568 000205C3 fe 08 effffffb32 callf $8,_writec
569 000205CA # }
570 000205CA # if ( halt_flg ) /* halt on error? */
571 000205CA 5d effffffb2c tstl _halt_flg
572 000205D0 31 09 jeql L291
573 000205D2 # sqrtf_er_halt( BAD_REG_HLT );
574 000205D2 dd 02 pushl $2
575 000205D4 fe 08 ef000004d7 callf $8,_sqrtf_er_halt
576 000205DB # if ( loop_on_err )
577 000205DB L291:
578 000205DB 5d effffffb1b tstl _loop_on_err
579 000205E1 31 0d jeql L292
580 000205E3 # {
581 000205E3 # force_loop = TRUE; /* get the force loop flag */
582 000205E3 0d 01 effffffb12 movl $1,_force_loop
583 000205EA # asm("jmp _sqrtf_3_lp1"); /* and loop */
584 000205EA 71 effffffe85 jmp _sqrtf_3_lp1
585 000205F0 # }
586 000205F0 # } /* end of compare error */
587 000205F0 L292:
588 000205F0 # } /* end of while loop */
589 000205F0 L283:
590 000205F0 # } while( index++ < max_sqrtf_1_index );
591 000205F0 L282:
592 000205F0 L275:
593 000205F0 0d effffffb06 50 movl _index,r0
594 000205F7 6d effffffaff incl _index
595 000205FD 1d 50 effffffaf8 cmpl r0,_max_sqrtf_1_index
596 00020604 81 03 13 fe40 jlss L276
597 00020609 L274:
598 00020609 # } /* end of subtest 3 */
599 00020609 40 ret#2
600 0002060A .set L269,0x0
601 0002060A L271:
602 0002060A 13 fe1c jbr L272
603 0002060D .data
604 00000a60 * .text
605 0002060D 00 .align 1
606 0002060E .globl _sqrtf_4
607 0002060E _sqrtf_4:
608 0002060E 0000 .word L293
609 00020610 #
610 00020610 #
611 00020610 #
612 00020610 # /************************************************************************
613 00020610 # *
614 00020610 # * SUBTEST 4 - Check for PSL corruption
615 00020610 # *
616 00020610 # ************************************************************************/
617 00020610 # sqrtf_4()
618 00020610 # {
619 00020610 13 01a8 jbr L295
620 00020613 L296:
621 00020613 # force_loop = FALSE; /* clear force_loop flg */
622 00020613 4d effffffae3 clrl _force_loop
623 00020619 # subtest = 4;
624 00020619 0d 04 effffffadc movl $4,_subtest
625 00020620 # fill_reg_buf( load_regs ); /* get patterns for regs */
626 00020620 dd 8f00000000 pushl $_load_regs
627 00020626 fe 08 effffffacf callf $8,_fill_reg_buf
628 0002062D # for( index = 0; index < 3; index++ ) {
629 0002062D 4d effffffac9 clrl _index
630 00020633 L299:
631 00020633 1d effffffac3 03 cmpl _index,$3
632 0002063A 91 03 13 017b jgeq L298
633 0002063F # sgl_ld_acc = sqrtf_1_data[index].ld; /* get operand 1 */
634 0002063F 0d effffffab7 50 movl _index,r0
635 00020646 48 03 50 50 shll $3,r0,r0
636 0002064A 0d e000000000 effffffaa7 movl _sqrtf_1_data(r0),_sgl_ld_acc
637 00020655 # sgl_expected = sqrtf_1_data[index].exp; /* get expected */
638 00020655 0d effffffaa1 50 movl _index,r0
639 0002065C 48 03 50 50 shll $3,r0,r0
640 00020660 0d e000000004 effffffa91 movl _sqrtf_1_data+4(r0),_sgl_expected
641 0002066B # sgl_dummy1 = status_array[status_index]; /* status = +, -, 0 */
642 0002066B 0d effffffa8b 50 movl _status_index,r0
643 00020672 0d 40effffffa83 movl _status_array[r0],_sgl_dummy1
effffffa7e
644 0002067E # /*
645 0002067E # * If LOOP ON ERROR is set, this is the loop for this subtest.
646 0002067E # * The force loop flag is set after the first error.
647 0002067E # */
648 0002067E # asm("_sqrtf_4_lp1:");
649 0002067E _sqrtf_4_lp1:
650 0002067E # asm("ldf _sgl_ld_acc"); /* LOAD the accumulator */
651 0002067E 06 effffffa78 ldf _sgl_ld_acc
652 00020684 # asm("nop");
653 00020684 10 nop
654 00020685 # asm("tstl _sgl_dummy1"); /* set the PSL status */
655 00020685 5d effffffa71 tstl _sgl_dummy1
656 0002068B # asm("movpsl _init_psl"); /* save the initial PSL */
657 0002068B cd effffffa6b movpsl _init_psl
658 00020691 # asm("sqrtf"); /* do the sqrt */
659 00020691 45 sqrtf
660 00020692 # asm("nop");
661 00020692 10 nop
662 00020693 # asm("movpsl _psl_val"); /* save the final PSL */
663 00020693 cd effffffa63 movpsl _psl_val
664 00020699 # asm("stf _sgl_st_acc"); /* save the accumulator */
665 00020699 26 effffffa5d stf _sgl_st_acc
666 0002069F # if( force_loop )
667 0002069F 5d effffffa57 tstl _force_loop
668 000206A5 31 02 jeql L300
669 000206A7 # asm("brb _sqrtf_4_lp1");; /* loop on the error */
670 000206A7 11 d5 brb _sqrtf_4_lp1
671 000206A9 L300:
672 000206A9 # /*
673 000206A9 # * Now compare the final PSL to the initial PSL -they should be the same
674 000206A9 # */
675 000206A9 # exp_psl = init_psl;
676 000206A9 0d effffffa4d effffffa48 movl _init_psl,_exp_psl
677 000206B4 # if( psl_val != exp_psl ) {
678 000206B4 1d effffffa42 effffffa3d cmpl _psl_val,_exp_psl
679 000206BF 21 03 13 00ed jeql L301
680 000206C4 # errcnt++; /* bump the error count */
681 000206C4 6d effffffa32 incl _errcnt
682 000206CA # if( prt_error ) {
683 000206CA 5d effffffa2c tstl _prt_error
684 000206D0 21 03 13 00b9 jeql L302
685 000206D5 # writes(" \n"); /* start a new print line */
686 000206D5 .data 1
687 00000bc1 * L303:
688 00000bc1 * 200A00 .ascii " \12\0"
689 00000bc4 * .text
690 000206D5 dd 8f00000bc1 pushl $L303
691 000206DB fe 08 effffffa1a callf $8,_writes
692 000206E2 # writes("cycle: ");
693 000206E2 .data 1
694 00000bc4 * L304:
695 00000bc4 * 6379636C653A2000 .ascii "cycle: \0"
696 00000bcc * .text
697 000206E2 dd 8f00000bc4 pushl $L304
698 000206E8 fe 08 effffffa0d callf $8,_writes
699 000206EF # writed( cycle );
700 000206EF dd effffffa07 pushl _cycle
701 000206F5 fe 08 effffffa00 callf $8,_writed
702 000206FC # writes(" SQRTF test ");
703 000206FC .data 1
704 00000bcc * L305:
705 00000bcc * 2020535152544620746573742 .ascii " SQRTF test \0"
000
706 00000bda * .text
707 000206FC dd 8f00000bcc pushl $L305
708 00020702 fe 08 effffff9f3 callf $8,_writes
709 00020709 # writed( test_no );
710 00020709 dd effffff9ed pushl _test_no
711 0002070F fe 08 effffff9e6 callf $8,_writed
712 00020716 # writes(", subtest 4 - INCORRECT FINAL PSL\n");
713 00020716 .data 1
714 00000bda * L306:
715 00000bda * 2C20737562746573742034202 .ascii ", subtest 4 - INCORRECT FINAL PSL\12\0"
D20494E434F52524543542046
494E414C2050534C0A00
716 00000bfd * .text
717 00020716 dd 8f00000bda pushl $L306
718 0002071C fe 08 effffff9d9 callf $8,_writes
719 00020723 # print_sqrtf_data(); /* print the operands */
720 00020723 fe 04 ef0000034c callf $4,_print_sqrtf_data
721 0002072A # writec('\n');
722 0002072A dd 0a pushl $10
723 0002072C fe 08 effffff9c9 callf $8,_writec
724 00020733 # writes("initial PSL = ");
725 00020733 .data 1
726 00000bfd * L307:
727 00000bfd * 696E697469616C2050534C203 .ascii "initial PSL = \0"
D2000
728 00000c0c * .text
729 00020733 dd 8f00000bfd pushl $L307
730 00020739 fe 08 effffff9bc callf $8,_writes
731 00020740 # write32h( init_psl );
732 00020740 dd effffff9b6 pushl _init_psl
733 00020746 fe 08 effffff9af callf $8,_write32h
734 0002074D # writes(", final PSL = ");
735 0002074D .data 1
736 00000c0c * L308:
737 00000c0c * 2C202066696E616C2050534C2 .ascii ", final PSL = \0"
03D2000
738 00000c1c * .text
739 0002074D dd 8f00000c0c pushl $L308
740 00020753 fe 08 effffff9a2 callf $8,_writes
741 0002075A # write32h( psl_val );
742 0002075A dd effffff99c pushl _psl_val
743 00020760 fe 08 effffff995 callf $8,_write32h
744 00020767 # writes(", expected PSL = ");
745 00020767 .data 1
746 00000c1c * L309:
747 00000c1c * 2C20206578706563746564205 .ascii ", expected PSL = \0"
0534C203D2000
748 00000c2f * .text
749 00020767 dd 8f00000c1c pushl $L309
750 0002076D fe 08 effffff988 callf $8,_writes
751 00020774 # write32h( exp_psl );
752 00020774 dd effffff982 pushl _exp_psl
753 0002077A fe 08 effffff97b callf $8,_write32h
754 00020781 # writes("\n");
755 00020781 .data 1
756 00000c2f * L310:
757 00000c2f * 0A00 .ascii "\12\0"
758 00000c31 * .text
759 00020781 dd 8f00000c2f pushl $L310
760 00020787 fe 08 effffff96e callf $8,_writes
761 0002078E # }
762 0002078E # if( halt_flg )
763 0002078E L302:
764 0002078E 5d effffff968 tstl _halt_flg
765 00020794 31 09 jeql L311
766 00020796 # sqrtf_er_halt( BAD_PSL_HLT ); /* halt on the error */
767 00020796 dd 03 pushl $3
768 00020798 fe 08 ef00000313 callf $8,_sqrtf_er_halt
769 0002079F # if( loop_on_err ) {
770 0002079F L311:
771 0002079F 5d effffff957 tstl _loop_on_err
772 000207A5 31 0a jeql L312
773 000207A7 # force_loop = TRUE; /* set the force loop flag */
774 000207A7 0d 01 effffff94e movl $1,_force_loop
775 000207AE # asm("brw _sqrtf_4_lp1");; /* and loop on the error */
776 000207AE 13 fecd brw _sqrtf_4_lp1
777 000207B1 # } /* end of loop on error */
778 000207B1 # } /* end of PSL corruption error */
779 000207B1 L312:
780 000207B1 # } /* end of WHILE loop */
781 000207B1 L301:
782 000207B1 L297:
783 000207B1 6d effffff945 incl _index
784 000207B7 13 fe79 jbr L299
785 000207BA L298:
786 000207BA # } /* end of subtest 4 */
787 000207BA 40 ret#2
788 000207BB .set L293,0x0
789 000207BB L295:
790 000207BB 13 fe55 jbr L296
791 000207BE .data
792 00000a60 * .text
793 000207BE .align 1
794 000207BE .globl _sqrtf_5
795 000207BE _sqrtf_5:
796 000207BE 0000 .word L313
797 000207C0 #
798 000207C0 #
799 000207C0 #
800 000207C0 # /************************************************************************
801 000207C0 # *
802 000207C0 # * SUBTEST 5 - pipelined entry test
803 000207C0 # *
804 000207C0 # ************************************************************************/
805 000207C0 # sqrtf_5()
806 000207C0 # {
807 000207C0 13 0154 jbr L315
808 000207C3 L316:
809 000207C3 # force_loop = FALSE;
810 000207C3 4d effffff933 clrl _force_loop
811 000207C9 # subtest = 8;
812 000207C9 0d 08 effffff92c movl $8,_subtest
813 000207D0 # for( index = 0; index < max_sqrtf_1_index; index++ ) {
814 000207D0 4d effffff926 clrl _index
815 000207D6 L319:
816 000207D6 1d effffff920 effffff91b cmpl _index,_max_sqrtf_1_index
817 000207E1 91 03 13 0130 jgeq L318
818 000207E6 # sgl_ld_acc = sqrtf_1_data[index].ld; /* get operand 1 */
819 000207E6 0d effffff910 50 movl _index,r0
820 000207ED 48 03 50 50 shll $3,r0,r0
821 000207F1 0d e000000000 effffff900 movl _sqrtf_1_data(r0),_sgl_ld_acc
822 000207FC # sgl_expected = sqrtf_1_data[index].exp; /* get expected result */
823 000207FC 0d effffff8fa 50 movl _index,r0
824 00020803 48 03 50 50 shll $3,r0,r0
825 00020807 0d e000000004 effffff8ea movl _sqrtf_1_data+4(r0),_sgl_expected
826 00020812 # /*
827 00020812 # * If LOOP ON ERROR is set, this is the loop for this subtest.
828 00020812 # * The force loop flag is set after the first error.
829 00020812 # */
830 00020812 # asm("_sqrtf_5_lp1:");
831 00020812 _sqrtf_5_lp1:
832 00020812 # asm("movl $0,r0"); /* clear r0 */
833 00020812 0d 00 50 movl $0,r0
834 00020815 # asm("ldf r0"); /* load the Acc. with 0.0 */
835 00020815 06 50 ldf r0
836 00020817 # asm("addf _sgl_ld_acc"); /* add the 1st operand */
837 00020817 c6 effffff8df addf _sgl_ld_acc
838 0002081D # asm("sqrtf"); /* get the sqrt */
839 0002081D 45 sqrtf
840 0002081E # asm("stf _sgl_st_acc"); /* store the result */
841 0002081E 26 effffff8d8 stf _sgl_st_acc
842 00020824 # if( force_loop )
843 00020824 5d effffff8d2 tstl _force_loop
844 0002082A 31 02 jeql L320
845 0002082C # asm("brb _sqrtf_5_lp1");; /* loop on the error */
846 0002082C 11 e4 brb _sqrtf_5_lp1
847 0002082E L320:
848 0002082E # /*
849 0002082E # * end error loop - test the results
850 0002082E # */
851 0002082E # if( sgl_st_acc != sgl_expected ) { /* COMPARE the values */
852 0002082E 1d effffff8c8 effffff8c3 cmpl _sgl_st_acc,_sgl_expected
853 00020839 21 03 13 00cf jeql L321
854 0002083E # errcnt++; /* bump the error count */
855 0002083E 6d effffff8b8 incl _errcnt
856 00020844 # if( prt_error ) {
857 00020844 5d effffff8b2 tstl _prt_error
858 0002084A 21 03 13 009b jeql L322
859 0002084F # writes(" \n"); /* start a new print line */
860 0002084F .data 1
861 00000c31 * L323:
862 00000c31 * 200A00 .ascii " \12\0"
863 00000c34 * .text
864 0002084F dd 8f00000c31 pushl $L323
865 00020855 fe 08 effffff8a0 callf $8,_writes
866 0002085C # writes("cycle: ");
867 0002085C .data 1
868 00000c34 * L324:
869 00000c34 * 6379636C653A2000 .ascii "cycle: \0"
870 00000c3c * .text
871 0002085C dd 8f00000c34 pushl $L324
872 00020862 fe 08 effffff893 callf $8,_writes
873 00020869 # writed( cycle );
874 00020869 dd effffff88d pushl _cycle
875 0002086F fe 08 effffff886 callf $8,_writed
876 00020876 # writes(" SQRTF test ");
877 00020876 .data 1
878 00000c3c * L325:
879 00000c3c * 2020535152544620746573742 .ascii " SQRTF test \0"
000
880 00000c4a * .text
881 00020876 dd 8f00000c3c pushl $L325
882 0002087C fe 08 effffff879 callf $8,_writes
883 00020883 # writed( test_no );
884 00020883 dd effffff873 pushl _test_no
885 00020889 fe 08 effffff86c callf $8,_writed
886 00020890 # writes(", subtest 5 (Piped Entry) - BAD FINAL ACC\n");
887 00020890 .data 1
888 00000c4a * L326:
889 00000c4a * 2C20737562746573742035202 .ascii ", subtest 5 (Piped Entry) - BAD FINAL ACC\12\0"
8506970656420456E74727929
202D204241442046494E414C2
04143430A00
890 00000c75 * .text
891 00020890 dd 8f00000c4a pushl $L326
892 00020896 fe 08 effffff85f callf $8,_writes
893 0002089D # print_sqrtf_data();
894 0002089D fe 04 ef000001d2 callf $4,_print_sqrtf_data
895 000208A4 # writes(", data index = ");
896 000208A4 .data 1
897 00000c75 * L327:
898 00000c75 * 2C20206461746120696E64657 .ascii ", data index = \0"
8203D2000
899 00000c86 * .text
900 000208A4 dd 8f00000c75 pushl $L327
901 000208AA fe 08 effffff84b callf $8,_writes
902 000208B1 # writed( index );
903 000208B1 dd effffff845 pushl _index
904 000208B7 fe 08 effffff83e callf $8,_writed
905 000208BE # writec('\n');
906 000208BE dd 0a pushl $10
907 000208C0 fe 08 effffff835 callf $8,_writec
908 000208C7 # writes(" Acc expected = ");
909 000208C7 .data 1
910 00000c86 * L328:
911 00000c86 * 2020202020202020202020202 .ascii " Acc expected = \0"
0202020202020202020416363
206578706563746564203D200
0
912 00000cac * .text
913 000208C7 dd 8f00000c86 pushl $L328
914 000208CD fe 08 effffff828 callf $8,_writes
915 000208D4 # write32h( sgl_expected );
916 000208D4 dd effffff822 pushl _sgl_expected
917 000208DA fe 08 effffff81b callf $8,_write32h
918 000208E1 # writec('\n');
919 000208E1 dd 0a pushl $10
920 000208E3 fe 08 effffff812 callf $8,_writec
921 000208EA # }
922 000208EA # if( halt_flg )
923 000208EA L322:
924 000208EA 5d effffff80c tstl _halt_flg
925 000208F0 31 09 jeql L329
926 000208F2 # sqrtf_er_halt( BAD_ACC_HLT ); /* halt on the error */
927 000208F2 dd 01 pushl $1
928 000208F4 fe 08 ef000001b7 callf $8,_sqrtf_er_halt
929 000208FB # if( loop_on_err ) {
930 000208FB L329:
931 000208FB 5d effffff7fb tstl _loop_on_err
932 00020901 31 0a jeql L330
933 00020903 # force_loop = TRUE; /* set the force loop flag */
934 00020903 0d 01 effffff7f2 movl $1,_force_loop
935 0002090A # asm("brw _sqrtf_5_lp1");; /* and loop on the error */
936 0002090A 13 ff05 brw _sqrtf_5_lp1
937 0002090D # } /* end of loop on error */
938 0002090D # } /* end of compare error */
939 0002090D L330:
940 0002090D # } /* end of WHILE loop */
941 0002090D L321:
942 0002090D L317:
943 0002090D 6d effffff7e9 incl _index
944 00020913 13 fec0 jbr L319
945 00020916 L318:
946 00020916 # } /* end of subtest 5 */
947 00020916 40 ret#2
948 00020917 .set L313,0x0
949 00020917 L315:
950 00020917 13 fea9 jbr L316
951 0002091A .data
952 00000a60 * .text
953 0002091A .align 1
954 0002091A .globl _sqrtf_6
955 0002091A _sqrtf_6:
956 0002091A 0000 .word L331
957 0002091C #
958 0002091C #
959 0002091C #
960 0002091C # /************************************************************************
961 0002091C # *
962 0002091C # * SUBTEST 6 - pipelined exit test
963 0002091C # *
964 0002091C # ************************************************************************/
965 0002091C # sqrtf_6()
966 0002091C # {
967 0002091C 13 0154 jbr L333
968 0002091F L334:
969 0002091F # force_loop = FALSE;
970 0002091F 4d effffff7d7 clrl _force_loop
971 00020925 # subtest = 8;
972 00020925 0d 08 effffff7d0 movl $8,_subtest
973 0002092C # for( index = 0; index < max_sqrtf_1_index; index++ ) {
974 0002092C 4d effffff7ca clrl _index
975 00020932 L337:
976 00020932 1d effffff7c4 effffff7bf cmpl _index,_max_sqrtf_1_index
977 0002093D 91 03 13 0130 jgeq L336
978 00020942 # sgl_ld_acc = sqrtf_1_data[index].ld; /* get operand 1 */
979 00020942 0d effffff7b4 50 movl _index,r0
980 00020949 48 03 50 50 shll $3,r0,r0
981 0002094D 0d e000000000 effffff7a4 movl _sqrtf_1_data(r0),_sgl_ld_acc
982 00020958 # sgl_expected = sqrtf_1_data[index].exp; /* get expected result */
983 00020958 0d effffff79e 50 movl _index,r0
984 0002095F 48 03 50 50 shll $3,r0,r0
985 00020963 0d e000000004 effffff78e movl _sqrtf_1_data+4(r0),_sgl_expected
986 0002096E # /*
987 0002096E # * If LOOP ON ERROR is set, this is the loop for this subtest.
988 0002096E # * The force loop flag is set after the first error.
989 0002096E # */
990 0002096E # asm("_sqrtf_6_lp1:");
991 0002096E _sqrtf_6_lp1:
992 0002096E # asm("movl $0,r0"); /* clear r0 */
993 0002096E 0d 00 50 movl $0,r0
994 00020971 # asm("ldf _sgl_ld_acc"); /* load the Acc. */
995 00020971 06 effffff785 ldf _sgl_ld_acc
996 00020977 # asm("sqrtf"); /* get the sqrt */
997 00020977 45 sqrtf
998 00020978 # asm("addf r0"); /* add a zero to the acc */
999 00020978 c6 50 addf r0
1000 0002097A # asm("stf _sgl_st_acc"); /* store the result */
1001 0002097A 26 effffff77c stf _sgl_st_acc
1002 00020980 # if( force_loop )
1003 00020980 5d effffff776 tstl _force_loop
1004 00020986 31 02 jeql L338
1005 00020988 # asm("brb _sqrtf_6_lp1");; /* loop on the error */
1006 00020988 11 e4 brb _sqrtf_6_lp1
1007 0002098A L338:
1008 0002098A # /*
1009 0002098A # * end error loop - test the results
1010 0002098A # */
1011 0002098A # if( sgl_st_acc != sgl_expected ) { /* COMPARE the values */
1012 0002098A 1d effffff76c effffff767 cmpl _sgl_st_acc,_sgl_expected
1013 00020995 21 03 13 00cf jeql L339
1014 0002099A # errcnt++; /* bump the error count */
1015 0002099A 6d effffff75c incl _errcnt
1016 000209A0 # if( prt_error ) {
1017 000209A0 5d effffff756 tstl _prt_error
1018 000209A6 21 03 13 009b jeql L340
1019 000209AB # writes(" \n"); /* start a new print line */
1020 000209AB .data 1
1021 00000cac * L341:
1022 00000cac * 200A00 .ascii " \12\0"
1023 00000caf * .text
1024 000209AB dd 8f00000cac pushl $L341
1025 000209B1 fe 08 effffff744 callf $8,_writes
1026 000209B8 # writes("cycle: ");
1027 000209B8 .data 1
1028 00000caf * L342:
1029 00000caf * 6379636C653A2000 .ascii "cycle: \0"
1030 00000cb7 * .text
1031 000209B8 dd 8f00000caf pushl $L342
1032 000209BE fe 08 effffff737 callf $8,_writes
1033 000209C5 # writed( cycle );
1034 000209C5 dd effffff731 pushl _cycle
1035 000209CB fe 08 effffff72a callf $8,_writed
1036 000209D2 # writes(" SQRTF test ");
1037 000209D2 .data 1
1038 00000cb7 * L343:
1039 00000cb7 * 2020535152544620746573742 .ascii " SQRTF test \0"
000
1040 00000cc5 * .text
1041 000209D2 dd 8f00000cb7 pushl $L343
1042 000209D8 fe 08 effffff71d callf $8,_writes
1043 000209DF # writed( test_no );
1044 000209DF dd effffff717 pushl _test_no
1045 000209E5 fe 08 effffff710 callf $8,_writed
1046 000209EC # writes(", subtest 6 (Piped Exit) - BAD FINAL ACC\n");
1047 000209EC .data 1
1048 00000cc5 * L344:
1049 00000cc5 * 2C20737562746573742036202 .ascii ", subtest 6 (Piped Exit) - BAD FINAL ACC\12\0"
8506970656420457869742920
2D204241442046494E414C204
143430A00
1050 00000cef * .text
1051 000209EC dd 8f00000cc5 pushl $L344
1052 000209F2 fe 08 effffff703 callf $8,_writes
1053 000209F9 # print_sqrtf_data();
1054 000209F9 fe 04 ef00000076 callf $4,_print_sqrtf_data
1055 00020A00 # writes(", data index = ");
1056 00020A00 .data 1
1057 00000cef * L345:
1058 00000cef * 2C20206461746120696E64657 .ascii ", data index = \0"
8203D2000
1059 00000d00 * .text
1060 00020A00 dd 8f00000cef pushl $L345
1061 00020A06 fe 08 effffff6ef callf $8,_writes
1062 00020A0D # writed( index );
1063 00020A0D dd effffff6e9 pushl _index
1064 00020A13 fe 08 effffff6e2 callf $8,_writed
1065 00020A1A # writec('\n');
1066 00020A1A dd 0a pushl $10
1067 00020A1C fe 08 effffff6d9 callf $8,_writec
1068 00020A23 # writes(" Acc expected = ");
1069 00020A23 .data 1
1070 00000d00 * L346:
1071 00000d00 * 2020202020202020202020202 .ascii " Acc expected = \0"
0202020202020202020416363
206578706563746564203D200
0
1072 00000d26 * .text
1073 00020A23 dd 8f00000d00 pushl $L346
1074 00020A29 fe 08 effffff6cc callf $8,_writes
1075 00020A30 # write32h( sgl_expected );
1076 00020A30 dd effffff6c6 pushl _sgl_expected
1077 00020A36 fe 08 effffff6bf callf $8,_write32h
1078 00020A3D # writec('\n');
1079 00020A3D dd 0a pushl $10
1080 00020A3F fe 08 effffff6b6 callf $8,_writec
1081 00020A46 # }
1082 00020A46 # if( halt_flg )
1083 00020A46 L340:
1084 00020A46 5d effffff6b0 tstl _halt_flg
1085 00020A4C 31 09 jeql L347
1086 00020A4E # sqrtf_er_halt( BAD_ACC_HLT ); /* halt on the error */
1087 00020A4E dd 01 pushl $1
1088 00020A50 fe 08 ef0000005b callf $8,_sqrtf_er_halt
1089 00020A57 # if( loop_on_err ) {
1090 00020A57 L347:
1091 00020A57 5d effffff69f tstl _loop_on_err
1092 00020A5D 31 0a jeql L348
1093 00020A5F # force_loop = TRUE; /* set the force loop flag */
1094 00020A5F 0d 01 effffff696 movl $1,_force_loop
1095 00020A66 # asm("brw _sqrtf_6_lp1");; /* and loop on the error */
1096 00020A66 13 ff05 brw _sqrtf_6_lp1
1097 00020A69 # } /* end of loop on error */
1098 00020A69 # } /* end of compare error */
1099 00020A69 L348:
1100 00020A69 # } /* end of WHILE loop */
1101 00020A69 L339:
1102 00020A69 L335:
1103 00020A69 6d effffff68d incl _index
1104 00020A6F 13 fec0 jbr L337
1105 00020A72 L336:
1106 00020A72 # } /* end of subtest 6 */
1107 00020A72 40 ret#2
1108 00020A73 .set L331,0x0
1109 00020A73 L333:
1110 00020A73 13 fea9 jbr L334
1111 00020A76 .data
1112 00000a60 * .text
1113 00020A76 .align 1
1114 00020A76 .globl _print_sqrtf_data
1115 00020A76 _print_sqrtf_data:
1116 00020A76 0000 .word L349
1117 00020A78 #
1118 00020A78 #
1119 00020A78 #
1120 00020A78 # /**************************************************************************
1121 00020A78 # *
1122 00020A78 # * PRINT THE DATA AND STORE RESULTS
1123 00020A78 # *
1124 00020A78 # * initial Acc = xxxxxxxx, stored = xxxxxxxx, data index = xx
1125 00020A78 # * Acc expected = xxxxxxxx
1126 00020A78 # **************************************************************************/
1127 00020A78 # print_sqrtf_data()
1128 00020A78 # {
1129 00020A78 11 35 jbr L351
1130 00020A7A L352:
1131 00020A7A # writes("initial Acc = ");
1132 00020A7A .data 1
1133 00000d26 * L353:
1134 00000d26 * 696E697469616C20416363203 .ascii "initial Acc = \0"
D2000
1135 00000d35 * .text
1136 00020A7A dd 8f00000d26 pushl $L353
1137 00020A80 fe 08 effffff675 callf $8,_writes
1138 00020A87 # write32h( sgl_ld_acc );
1139 00020A87 dd effffff66f pushl _sgl_ld_acc
1140 00020A8D fe 08 effffff668 callf $8,_write32h
1141 00020A94 # writes(", final Acc = ");
1142 00020A94 .data 1
1143 00000d35 * L354:
1144 00000d35 * 2C202066696E616C204163632 .ascii ", final Acc = \0"
03D2000
1145 00000d45 * .text
1146 00020A94 dd 8f00000d35 pushl $L354
1147 00020A9A fe 08 effffff65b callf $8,_writes
1148 00020AA1 # write32h( sgl_st_acc );
1149 00020AA1 dd effffff655 pushl _sgl_st_acc
1150 00020AA7 fe 08 effffff64e callf $8,_write32h
1151 00020AAE # }
1152 00020AAE 40 ret#2
1153 00020AAF .set L349,0x0
1154 00020AAF L351:
1155 00020AAF 11 c9 jbr L352
1156 00020AB1 .data
1157 00000a60 * .text
1158 00020AB1 00 .align 1
1159 00020AB2 .globl _sqrtf_er_halt
1160 00020AB2 _sqrtf_er_halt:
1161 00020AB2 0000 .word L355
1162 00020AB4 #
1163 00020AB4 #
1164 00020AB4 #
1165 00020AB4 # /**************************************************************************
1166 00020AB4 # *
1167 00020AB4 # * HALT ON ERROR ROUTINE
1168 00020AB4 # *
1169 00020AB4 # **************************************************************************/
1170 00020AB4 # sqrtf_er_halt( halt_code )
1171 00020AB4 # int halt_code;
1172 00020AB4 # {
1173 00020AB4 13 00a0 jbr L357
1174 00020AB7 L358:
1175 00020AB7 # sgl_dummy1 = halt_code; /* get the error type */
1176 00020AB7 0d ad04 effffff63d movl 4(fp),_sgl_dummy1
1177 00020ABF # asm("movl _test_no,r0"); /* r0 = test number */
1178 00020ABF 0d effffff637 50 movl _test_no,r0
1179 00020AC6 # asm("movl _subtest,r1"); /* r1 = subtest number */
1180 00020AC6 0d effffff630 51 movl _subtest,r1
1181 00020ACD # asm("movl _sgl_dummy1,r2"); /* r2 = error code */
1182 00020ACD 0d effffff629 52 movl _sgl_dummy1,r2
1183 00020AD4 # asm("movl _cycle,r3"); /* r3 = cycle count */
1184 00020AD4 0d effffff622 53 movl _cycle,r3
1185 00020ADB # asm("movl _sgl_ld_acc,r4"); /* r4 = initial data */
1186 00020ADB 0d effffff61b 54 movl _sgl_ld_acc,r4
1187 00020AE2 # asm("movl _sgl_st_acc,r5"); /* r5 = data stored */
1188 00020AE2 0d effffff614 55 movl _sgl_st_acc,r5
1189 00020AE9 # asm("movl _sgl_expected,r6"); /* r6 = data expected */
1190 00020AE9 0d effffff60d 56 movl _sgl_expected,r6
1191 00020AF0 # asm("movl _index,r7"); /* r7 = data index */
1192 00020AF0 0d effffff606 57 movl _index,r7
1193 00020AF7 # if( halt_code == BAD_REG_HLT ) {
1194 00020AF7 1d ad04 02 cmpl 4(fp),$2
1195 00020AFB 21 3d jneq L359
1196 00020AFD # sgl_dummy1 = load_regs[index2];
1197 00020AFD 0d effffff5f9 50 movl _index2,r0
1198 00020B04 0d 40effffff5f1 movl _load_regs[r0],_sgl_dummy1
effffff5ec
1199 00020B10 # sgl_dummy2 = store_regs[index2];
1200 00020B10 0d effffff5e6 50 movl _index2,r0
1201 00020B17 0d 40effffff5de movl _store_regs[r0],_sgl_dummy2
effffff5d9
1202 00020B23 # asm("movl _index2,r6"); /* r6 = bad register # */
1203 00020B23 0d effffff5d3 56 movl _index2,r6
1204 00020B2A # asm("movl _sgl_dummy2,r7"); /* r7 = actual value */
1205 00020B2A 0d effffff5cc 57 movl _sgl_dummy2,r7
1206 00020B31 # asm("movl _sgl_dummy1,r8"); /* r8 = expected value */
1207 00020B31 0d effffff5c5 58 movl _sgl_dummy1,r8
1208 00020B38 # } else
1209 00020B38 11 1b jbr L360
1210 00020B3A L359:
1211 00020B3A # if( halt_code == BAD_PSL_HLT ) {
1212 00020B3A 1d ad04 03 cmpl 4(fp),$3
1213 00020B3E 21 15 jneq L361
1214 00020B40 # asm("movl _init_psl,r6"); /* r6 = initial PSL */
1215 00020B40 0d effffff5b6 56 movl _init_psl,r6
1216 00020B47 # asm("movl _psl_val,r7"); /* r7 = final PSL */
1217 00020B47 0d effffff5af 57 movl _psl_val,r7
1218 00020B4E # asm("movl _exp_psl,r8"); /* r8 = expected PSL */
1219 00020B4E 0d effffff5a8 58 movl _exp_psl,r8
1220 00020B55 # };
1221 00020B55 L361:
1222 00020B55 L360:
1223 00020B55 # asm("halt"); /* HALT ... */
1224 00020B55 00 halt
1225 00020B56 # }
1226 00020B56 40 ret#2
1227 00020B57 .set L355,0x0
1228 00020B57 L357:
1229 00020B57 13 ff5d jbr L358
1230 00020B5A .data
1230 00040C56 .data
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.