|
|
1.1 root 1: #include "fpp_defs.h"
2:
3:
4: /*****************************************************************************
5: *
6: * DBL PIPELINE TEST #12 MONITOR
7: *
8: * This test will do:
9: *
10: * LDD(x) SUBD(x) ADDD(0) SUBD(x) ADDD(x) SUBD(0) ADDD(x) STD
11: *
12: * where the x's are the LDD data patterns.
13: *****************************************************************************/
14: pipe_12()
15: {
16: asm(".globl _pipeline_12_t");
17: asm("_pipeline_12_t:"); /* entry address */
18: if( (cycle == 1) && (prt_hdrs) ) /* print headers on 1st cycle */
19: {
20: if( run_all )
21: writes("\n");
22: writes(" PIPE_12");
23: }
24: subtest = 1;
25: pipe12_1(); /* data in REGs, no NOPs */
26: subtest++; /* increment subtest num */
27: pipe12_2(); /* data in REGs, 1 NOP */
28: subtest++; /* increment subtest num */
29: pipe12_3(); /* data in REGs, 2 NOPs */
30: subtest++; /* increment subtest num */
31: pipe12_4(); /* data in REGs, 3 NOPs */
32: subtest++; /* increment subtest num */
33: pipe12_5(); /* data in CACHE, no NOPs */
34: subtest++; /* increment subtest num */
35: pipe12_6(); /* data in CACHE, 1 NOP */
36: subtest++; /* increment subtest num */
37: pipe12_7(); /* data in CACHE, 2 NOPs */
38: subtest++; /* increment subtest num */
39: pipe12_8(); /* data in CACHE, 3 NOPs */
40: subtest++; /* increment subtest num */
41: pipe12_9(); /* data via F.P. 0 NOPs */
42: asm("jmp *return"); /* return to the test monitor */
43: }
44:
45:
46:
47:
48:
49: /************************************************************************
50: *
51: * SUBTEST 1
52: * data in registers, no NO-OPs
53: *
54: ************************************************************************/
55: pipe12_1()
56: {
57: force_loop = FALSE; /* clear the force_loop flg */
58: index = 0;
59: do
60: {
61: sgl_value_1 = ldd_1_data[index].ld.m; /* get the operand's MSW */
62: sgl_value_2 = ldd_1_data[index].ld.l; /* get the operand's MSW */
63: dbl_expected = ldd_1_data[index].exp; /* get the expected results */
64: /*
65: * If LOOP ON ERROR is set, this is the loop for this subtest.
66: * The force loop flag is set after the first error.
67: */
68: asm("_pipe12_1_lp1:");
69: asm("movl _sgl_value_1,r4"); /* move the data to r4/r5 */
70: asm("movl _sgl_value_2,r5");
71: asm("clrl r2"); /* clear r2 / r3 */
72: asm("clrl r3");
73: asm("ldd r4"); /* load the op. ( op ) */
74: asm("subd r4"); /* subtract the op. ( 0 ) */
75: asm("addd r2"); /* add a '0' ( 0 ) */
76: asm("subd r4"); /* subtract the op. (-op ) */
77: asm("addd r4"); /* add the op. ( 0 ) */
78: asm("subd r2"); /* subtract a '0' ( 0 ) */
79: asm("addd r4"); /* add the op. ( op ) */
80: asm("std r6"); /* store the result ( op ) */
81: if( force_loop )
82: asm("brb _pipe12_1_lp1");; /* run the loop again */
83: /*
84: * verify the results
85: */
86: asm("movl r6,_sgl_value_3"); /* get the result */
87: asm("movl r7,_sgl_value_4");
88: dbl_st_acc.m = sgl_value_3;
89: dbl_st_acc.l = sgl_value_4;
90: if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results */
91: (dbl_st_acc.l != dbl_expected.l) )
92: {
93: errcnt++; /* bump the error count */
94: if ( prt_error )
95: print_pipe12_er("Reg. Data, 0 NO-OPs");
96: if ( halt_flg ) /* halt on error? */
97: pipe12_er_hlt( subtest );
98: if ( loop_on_err ) {
99: force_loop = TRUE; /* set the force loop flag */
100: asm("brw _pipe12_1_lp1"); /* and loop */
101: }
102: } /* end of compare error */
103: } while( index++ < max_ldd_1_index );
104: } /* end of subtest 1 */
105:
106:
107:
108:
109:
110:
111: /************************************************************************
112: *
113: * SUBTEST 2
114: * data in registers, 1 NO-OP
115: *
116: ************************************************************************/
117: pipe12_2()
118: {
119: force_loop = FALSE; /* clear the force_loop flg */
120: index = 0;
121: do
122: {
123: sgl_value_1 = ldd_1_data[index].ld.m; /* get the operand's MSW */
124: sgl_value_2 = ldd_1_data[index].ld.l; /* get the operand's MSW */
125: dbl_expected = ldd_1_data[index].exp; /* get the expected results */
126: /*
127: * If LOOP ON ERROR is set, this is the loop for this subtest.
128: * The force loop flag is set after the first error.
129: */
130: asm("_pipe12_2_lp1:");
131: asm("movl _sgl_value_1,r4"); /* move the data to r4/r5 */
132: asm("movl _sgl_value_2,r5");
133: asm("clrl r2"); /* clear r2 / r3 */
134: asm("clrl r3");
135: asm("ldd r4"); /* load the op. ( op ) */
136: asm("nop");
137: asm("subd r4"); /* subtract the op. ( 0 ) */
138: asm("nop");
139: asm("addd r2"); /* add a '0' ( 0 ) */
140: asm("nop");
141: asm("subd r4"); /* subtract the op. (-op ) */
142: asm("nop");
143: asm("addd r4"); /* add the op. ( 0 ) */
144: asm("nop");
145: asm("subd r2"); /* subtract a '0' ( 0 ) */
146: asm("nop");
147: asm("addd r4"); /* add the op. ( op ) */
148: asm("nop");
149: asm("std r6"); /* store the result ( op ) */
150: if( force_loop )
151: asm("brb _pipe12_2_lp1");; /* run the loop again */
152: /*
153: * verify the results
154: */
155: asm("movl r6,_sgl_value_3"); /* get the result */
156: asm("movl r7,_sgl_value_4");
157: dbl_st_acc.m = sgl_value_3;
158: dbl_st_acc.l = sgl_value_4;
159: if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results */
160: (dbl_st_acc.l != dbl_expected.l) )
161: {
162: errcnt++; /* bump the error count */
163: if ( prt_error )
164: print_pipe12_er("Reg. Data, 1 NO-OP");
165: if ( halt_flg ) /* halt on error? */
166: pipe12_er_hlt( subtest );
167: if ( loop_on_err ) {
168: force_loop = TRUE; /* set the force loop flag */
169: asm("brw _pipe12_2_lp1"); /* and loop */
170: }
171: } /* end of compare error */
172: } while( index++ < max_ldd_1_index );
173: } /* end of subtest 2 */
174:
175:
176:
177:
178:
179: /************************************************************************
180: *
181: * SUBTEST 3
182: * data in registers, 2 NO-OPs
183: *
184: ************************************************************************/
185: pipe12_3()
186: {
187: force_loop = FALSE; /* clear the force_loop flg */
188: index = 0;
189: do
190: {
191: sgl_value_1 = ldd_1_data[index].ld.m; /* get the operand's MSW */
192: sgl_value_2 = ldd_1_data[index].ld.l; /* get the operand's MSW */
193: dbl_expected = ldd_1_data[index].exp; /* get the expected results */
194: /*
195: * If LOOP ON ERROR is set, this is the loop for this subtest.
196: * The force loop flag is set after the first error.
197: */
198: asm("_pipe12_3_lp1:");
199: asm("movl _sgl_value_1,r4"); /* move the data to r4/r5 */
200: asm("movl _sgl_value_2,r5");
201: asm("clrl r2"); /* clear r2 / r3 */
202: asm("clrl r3");
203: asm("ldd r4"); /* load the op. ( op ) */
204: asm("nop");
205: asm("nop");
206: asm("subd r4"); /* subtract the op. ( 0 ) */
207: asm("nop");
208: asm("nop");
209: asm("addd r2"); /* add a '0' ( 0 ) */
210: asm("nop");
211: asm("nop");
212: asm("subd r4"); /* subtract the op. (-op ) */
213: asm("nop");
214: asm("nop");
215: asm("addd r4"); /* add the op. ( 0 ) */
216: asm("nop");
217: asm("nop");
218: asm("subd r2"); /* subtract a '0' ( 0 ) */
219: asm("nop");
220: asm("nop");
221: asm("addd r4"); /* add the op. ( op ) */
222: asm("nop");
223: asm("nop");
224: asm("std r6"); /* store the result ( op ) */
225: if( force_loop )
226: asm("brb _pipe12_3_lp1");; /* run the loop again */
227: /*
228: * verify the results
229: */
230: asm("movl r6,_sgl_value_3"); /* get the result */
231: asm("movl r7,_sgl_value_4");
232: dbl_st_acc.m = sgl_value_3;
233: dbl_st_acc.l = sgl_value_4;
234: if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results */
235: (dbl_st_acc.l != dbl_expected.l) )
236: {
237: errcnt++; /* bump the error count */
238: if ( prt_error )
239: print_pipe12_er("Reg. Data, 2 NO-OPs");
240: if ( halt_flg ) /* halt on error? */
241: pipe12_er_hlt( subtest );
242: if ( loop_on_err ) {
243: force_loop = TRUE; /* set the force loop flag */
244: asm("brw _pipe12_3_lp1"); /* and loop */
245: }
246: } /* end of compare error */
247: } while( index++ < max_ldd_1_index );
248: } /* end of subtest 3 */
249:
250:
251:
252:
253:
254: /************************************************************************
255: *
256: * SUBTEST 4
257: * data in registers, 3 NO-OPs
258: *
259: ************************************************************************/
260: pipe12_4()
261: {
262: force_loop = FALSE; /* clear the force_loop flg */
263: index = 0;
264: do
265: {
266: sgl_value_1 = ldd_1_data[index].ld.m; /* get the operand's MSW */
267: sgl_value_2 = ldd_1_data[index].ld.l; /* get the operand's MSW */
268: dbl_expected = ldd_1_data[index].exp; /* get the expected results */
269: /*
270: * If LOOP ON ERROR is set, this is the loop for this subtest.
271: * The force loop flag is set after the first error.
272: */
273: asm("_pipe12_4_lp1:");
274: asm("movl _sgl_value_1,r4"); /* move the data to r4/r5 */
275: asm("movl _sgl_value_2,r5");
276: asm("clrl r2"); /* clear r2 / r3 */
277: asm("clrl r3");
278: asm("ldd r4"); /* load the op. ( op ) */
279: asm("nop");
280: asm("nop");
281: asm("nop");
282: asm("subd r4"); /* subtract the op. ( 0 ) */
283: asm("nop");
284: asm("nop");
285: asm("nop");
286: asm("addd r2"); /* add a '0' ( 0 ) */
287: asm("nop");
288: asm("nop");
289: asm("nop");
290: asm("subd r4"); /* subtract the op. (-op ) */
291: asm("nop");
292: asm("nop");
293: asm("nop");
294: asm("addd r4"); /* add the op. ( 0 ) */
295: asm("nop");
296: asm("nop");
297: asm("nop");
298: asm("subd r2"); /* subtract a '0' ( 0 ) */
299: asm("nop");
300: asm("nop");
301: asm("nop");
302: asm("addd r4"); /* add the op. ( op ) */
303: asm("nop");
304: asm("nop");
305: asm("nop");
306: asm("std r6"); /* store the result ( op ) */
307: if( force_loop )
308: asm("brb _pipe12_4_lp1");; /* run the loop again */
309: /*
310: * verify the results
311: */
312: asm("movl r6,_sgl_value_3"); /* get the result */
313: asm("movl r7,_sgl_value_4");
314: dbl_st_acc.m = sgl_value_3;
315: dbl_st_acc.l = sgl_value_4;
316: if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results */
317: (dbl_st_acc.l != dbl_expected.l) )
318: {
319: errcnt++; /* bump the error count */
320: if ( prt_error )
321: print_pipe12_er("Reg. Data, 3 NO-OPs");
322: if ( halt_flg ) /* halt on error? */
323: pipe12_er_hlt( subtest );
324: if ( loop_on_err ) {
325: force_loop = TRUE; /* set the force loop flag */
326: asm("brw _pipe12_4_lp1"); /* and loop */
327: }
328: } /* end of compare error */
329: } while( index++ < max_ldd_1_index );
330: } /* end of subtest 4 */
331:
332:
333:
334:
335:
336:
337: /************************************************************************
338: *
339: * SUBTEST 5
340: * data in cache, no NO-OPs
341: *
342: ************************************************************************/
343: pipe12_5()
344: {
345: force_loop = FALSE; /* clear the force_loop flg */
346: index = 0;
347: do
348: {
349: dbl_value_1 = ldd_1_data[index].ld; /* get the operand's MSW */
350: dbl_value_2.m = 0; /* clear the '0.0' operand */
351: dbl_value_2.l = 0;
352: dbl_expected = ldd_1_data[index].exp; /* get the expected results */
353: /*
354: * If LOOP ON ERROR is set, this is the loop for this subtest.
355: * The force loop flag is set after the first error.
356: */
357: asm("_pipe12_5_lp1:");
358: asm("ldd _dbl_value_1"); /* load the op. ( op ) */
359: asm("subd _dbl_value_1"); /* subtract the op. ( 0 ) */
360: asm("addd _dbl_value_2"); /* add a '0' ( 0 ) */
361: asm("subd _dbl_value_1"); /* subtract the op. (-op ) */
362: asm("addd _dbl_value_1"); /* add the op. ( 0 ) */
363: asm("subd _dbl_value_2"); /* subtract a '0' ( 0 ) */
364: asm("addd _dbl_value_1"); /* add the op. ( op ) */
365: asm("std _dbl_st_acc"); /* store the result ( op ) */
366: if( force_loop )
367: asm("brb _pipe12_5_lp1");; /* run the loop again */
368: /*
369: * verify the results
370: */
371: if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results */
372: (dbl_st_acc.l != dbl_expected.l) )
373: {
374: errcnt++; /* bump the error count */
375: if ( prt_error )
376: print_pipe12_er("Cache Data, 0 NO-OPs");
377: if ( halt_flg ) /* halt on error? */
378: pipe12_er_hlt( subtest );
379: if ( loop_on_err ) {
380: force_loop = TRUE; /* set the force loop flag */
381: asm("brw _pipe12_5_lp1"); /* and loop */
382: }
383: } /* end of compare error */
384: } while( index++ < max_ldd_1_index );
385: } /* end of subtest 5 */
386:
387:
388:
389:
390:
391:
392:
393: /************************************************************************
394: *
395: * SUBTEST 6
396: * data in cache, 1 NO-OP
397: *
398: ************************************************************************/
399: pipe12_6()
400: {
401: force_loop = FALSE; /* clear the force_loop flg */
402: index = 0;
403: do
404: {
405: dbl_value_1 = ldd_1_data[index].ld; /* get the operand's MSW */
406: dbl_value_2.m = 0; /* clear the '0.0' operand */
407: dbl_value_2.l = 0;
408: dbl_expected = ldd_1_data[index].exp; /* get the expected results */
409: /*
410: * If LOOP ON ERROR is set, this is the loop for this subtest.
411: * The force loop flag is set after the first error.
412: */
413: asm("_pipe12_6_lp1:");
414: asm("ldd _dbl_value_1"); /* load the op. ( op ) */
415: asm("nop");
416: asm("subd _dbl_value_1"); /* subtract the op. ( 0 ) */
417: asm("nop");
418: asm("addd _dbl_value_2"); /* add a '0' ( 0 ) */
419: asm("nop");
420: asm("subd _dbl_value_1"); /* subtract the op. (-op ) */
421: asm("nop");
422: asm("addd _dbl_value_1"); /* add the op. ( 0 ) */
423: asm("nop");
424: asm("subd _dbl_value_2"); /* subtract a '0' ( 0 ) */
425: asm("nop");
426: asm("addd _dbl_value_1"); /* add the op. ( op ) */
427: asm("nop");
428: asm("std _dbl_st_acc"); /* store the result ( op ) */
429: if( force_loop )
430: asm("brb _pipe12_6_lp1");; /* run the loop again */
431: /*
432: * verify the results
433: */
434: if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results */
435: (dbl_st_acc.l != dbl_expected.l) )
436: {
437: errcnt++; /* bump the error count */
438: if ( prt_error )
439: print_pipe12_er("Cache Data, 1 NO-OP");
440: if ( halt_flg ) /* halt on error? */
441: pipe12_er_hlt( subtest );
442: if ( loop_on_err ) {
443: force_loop = TRUE; /* set the force loop flag */
444: asm("brw _pipe12_6_lp1"); /* and loop */
445: }
446: } /* end of compare error */
447: } while( index++ < max_ldd_1_index );
448: } /* end of subtest 6 */
449:
450:
451:
452:
453:
454:
455:
456: /************************************************************************
457: *
458: * SUBTEST 7
459: * data in cache, 2 NO-OPs
460: *
461: ************************************************************************/
462: pipe12_7()
463: {
464: force_loop = FALSE; /* clear the force_loop flg */
465: index = 0;
466: do
467: {
468: dbl_value_1 = ldd_1_data[index].ld; /* get the operand's MSW */
469: dbl_value_2.m = 0; /* clear the '0.0' operand */
470: dbl_value_2.l = 0;
471: dbl_expected = ldd_1_data[index].exp; /* get the expected results */
472: /*
473: * If LOOP ON ERROR is set, this is the loop for this subtest.
474: * The force loop flag is set after the first error.
475: */
476: asm("_pipe12_7_lp1:");
477: asm("ldd _dbl_value_1"); /* load the op. ( op ) */
478: asm("nop");
479: asm("nop");
480: asm("subd _dbl_value_1"); /* subtract the op. ( 0 ) */
481: asm("nop");
482: asm("nop");
483: asm("addd _dbl_value_2"); /* add a '0' ( 0 ) */
484: asm("nop");
485: asm("nop");
486: asm("subd _dbl_value_1"); /* subtract the op. (-op ) */
487: asm("nop");
488: asm("nop");
489: asm("addd _dbl_value_1"); /* add the op. ( 0 ) */
490: asm("nop");
491: asm("nop");
492: asm("subd _dbl_value_2"); /* subtract a '0' ( 0 ) */
493: asm("nop");
494: asm("nop");
495: asm("addd _dbl_value_1"); /* add the op. ( op ) */
496: asm("nop");
497: asm("nop");
498: asm("std _dbl_st_acc"); /* store the result ( op ) */
499: if( force_loop )
500: asm("brb _pipe12_7_lp1");; /* run the loop again */
501: /*
502: * verify the results
503: */
504: if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results */
505: (dbl_st_acc.l != dbl_expected.l) )
506: {
507: errcnt++; /* bump the error count */
508: if ( prt_error )
509: print_pipe12_er("Cache Data, 2 NO-OPs");
510: if ( halt_flg ) /* halt on error? */
511: pipe12_er_hlt( subtest );
512: if ( loop_on_err ) {
513: force_loop = TRUE; /* set the force loop flag */
514: asm("brw _pipe12_7_lp1"); /* and loop */
515: }
516: } /* end of compare error */
517: } while( index++ < max_ldd_1_index );
518: } /* end of subtest 7 */
519:
520:
521:
522:
523:
524:
525:
526: /************************************************************************
527: *
528: * SUBTEST 8
529: * data in cache, 3 NO-OPs
530: *
531: ************************************************************************/
532: pipe12_8()
533: {
534: force_loop = FALSE; /* clear the force_loop flg */
535: index = 0;
536: do
537: {
538: dbl_value_1 = ldd_1_data[index].ld; /* get the operand's MSW */
539: dbl_value_2.m = 0; /* clear the '0.0' operand */
540: dbl_value_2.l = 0;
541: dbl_expected = ldd_1_data[index].exp; /* get the expected results */
542: /*
543: * If LOOP ON ERROR is set, this is the loop for this subtest.
544: * The force loop flag is set after the first error.
545: */
546: asm("_pipe12_8_lp1:");
547: asm("ldd _dbl_value_1"); /* load the op. ( op ) */
548: asm("nop");
549: asm("nop");
550: asm("nop");
551: asm("subd _dbl_value_1"); /* subtract the op. ( 0 ) */
552: asm("nop");
553: asm("nop");
554: asm("nop");
555: asm("addd _dbl_value_2"); /* add a '0' ( 0 ) */
556: asm("nop");
557: asm("nop");
558: asm("nop");
559: asm("subd _dbl_value_1"); /* subtract the op. (-op ) */
560: asm("nop");
561: asm("nop");
562: asm("nop");
563: asm("addd _dbl_value_1"); /* add the op. ( 0 ) */
564: asm("nop");
565: asm("nop");
566: asm("nop");
567: asm("subd _dbl_value_2"); /* subtract a '0' ( 0 ) */
568: asm("nop");
569: asm("nop");
570: asm("nop");
571: asm("addd _dbl_value_1"); /* add the op. ( op ) */
572: asm("nop");
573: asm("nop");
574: asm("nop");
575: asm("std _dbl_st_acc"); /* store the result ( op ) */
576: if( force_loop )
577: asm("brb _pipe12_8_lp1");; /* run the loop again */
578: /*
579: * verify the results
580: */
581: if( (dbl_st_acc.m != dbl_expected.m) || /* compare the results */
582: (dbl_st_acc.l != dbl_expected.l) )
583: {
584: errcnt++; /* bump the error count */
585: if ( prt_error )
586: print_pipe12_er("Cache Data, 3 NO-OPs");
587: if ( halt_flg ) /* halt on error? */
588: pipe12_er_hlt( subtest );
589: if ( loop_on_err ) {
590: force_loop = TRUE; /* set the force loop flag */
591: asm("brw _pipe12_8_lp1"); /* and loop */
592: }
593: } /* end of compare error */
594: } while( index++ < max_ldd_1_index );
595: } /* end of subtest 8 */
596:
597:
598:
599:
600:
601:
602:
603:
604: /******************************************************************************
605: *
606: * SUBTEST 9
607: *
608: * Get the data via the FRAME POINTER ( quad word indexed )
609: *
610: * ADDRESSES OF DATA OPERANDS INDEX DATA
611: * pointer_data,-4 ( FP+24 ) 3 the STF result goes here
612: * pointer_data-8,-12 ( FP+16 ) 2 <operand data>
613: * pointer_data-16,-20 ( FP+8 ) 1 < '0.0' data>
614: * pointer_data-24,-28 ( FP ) 0 point the frame pointer here
615: *
616: * NOTE: The double precision instructions are using Quad Word indexing.
617: ******************************************************************************/
618: pipe12_9()
619: {
620: asm("moval (r13),_pre_event_fp"); /* save the frame pointer */
621: asm("moval (r14),_pre_event_sp"); /* save the stack pointer */
622: force_loop = FALSE; /* clear force_loop flag */
623: index = 0;
624: do
625: {
626: sgl_value_1 = ldd_1_data[index].ld.m; /* get operand 1's MSW */
627: sgl_value_2 = ldd_1_data[index].ld.l; /* get operand 1's LSW */
628: dbl_expected = ldd_1_data[index].exp; /* get expected results */
629: /*
630: * If LOOP ON ERROR is set, this is the loop for this subtest.
631: * The force loop flag is set after the first error.
632: */
633: asm("_pipe12_9_lp1:");
634: asm("moval _pointer_data,_sgl_value_9");/* get store data's addr */
635: sgl_value_9 -= 8;
636: asm("movl _sgl_value_2,*_sgl_value_9");/* set the operand's LSW */
637: sgl_value_9 -= 4;
638: asm("movl _sgl_value_1,*_sgl_value_9");/* set the operand's MSW */
639: sgl_value_9 -= 4;
640: asm("clrl *_sgl_value_9"); /* set the '0' data's LSW */
641: sgl_value_9 -= 4;
642: asm("clrl *_sgl_value_9"); /* set the '0' data's MSW */
643: sgl_value_9 -= 8; /* get the FP addr to use */
644: asm("movl _sgl_value_9,r13"); /* set the FRAME POINTER */
645: asm("movl $1,r5"); /* r5 index = 1 quadwords */
646: asm("movl $2,r6"); /* r6 index = 2 quadwords */
647: asm("movl $3,r7"); /* r7 index = 3 quadwords */
648: asm("ldd (r13)[r6]"); /* load the operand ( op ) */
649: asm("subd (r13)[r6]"); /* subtract the op. ( 0 ) */
650: asm("addd (r13)[r5]"); /* add a '0' ( 0 ) */
651: asm("subd (r13)[r6]"); /* subtract the op. (-op ) */
652: asm("addd (r13)[r6]"); /* add the op. ( 0 ) */
653: asm("subd (r13)[r5]"); /* subtract a '0' ( 0 ) */
654: asm("addd (r13)[r6]"); /* add the op. ( op ) */
655: asm("std (r13)[r7]"); /* store the result ( op ) */
656: if( force_loop )
657: asm("brw _pipe12_9_lp1");; /* run the loop again */
658: /*
659: * verify the results
660: */
661: asm("moval (r13),_sgl_value_10"); /* save the frame pointer */
662: asm("movl _pointer_data,_sgl_value_4"); /* save the LSW stored */
663: asm("movl _pointer_data-4,_sgl_value_3"); /* and the MSW */
664: if( (sgl_value_3 != dbl_expected.m) || /* verify the result... */
665: (sgl_value_4 != dbl_expected.l) || /* verify the result... */
666: (sgl_value_10 != sgl_value_9) ) /* ... and the final FP */
667: {
668: asm("movl _pre_event_fp,r13"); /* restore frame pointer */
669: asm("movl _pre_event_sp,r14"); /* restore stack pointer */
670: errcnt++; /* bump the error count */
671: if ( prt_error ) {
672: print_pipe12_er("indexed FP addressing");
673: writes("final Frame Pointer = ");
674: write32h( sgl_value_10 );
675: writes(", expected FP = ");
676: write32h( sgl_value_9 );
677: writes(" \n");
678: }
679: if ( halt_flg ) /* halt on error? */
680: pipe12_er_hlt( subtest );
681: if ( loop_on_err ) {
682: force_loop = TRUE; /* set the force loop flag */
683: asm("brw _pipe12_9_lp1"); /* and loop */
684: }
685: } /* end of compare error */
686: } while( index++ < max_ldd_1_index );
687: asm("movl _pre_event_fp,r13"); /* restore the frame pointer */
688: asm("movl _pre_event_sp,r14"); /* restore the stack pointer */
689: } /* end of subtest 9 */
690:
691:
692: /******************************************************************************
693: *
694: * ERROR ROUTINE
695: *
696: * print an error in the following form
697: *
698: *operand = xxxxxxxx xxxxxxxx, final Acc = xxxxxxxx xxxxxxxx, data index = dd
699: * expected Acc = xxxxxxxx xxxxxxxx
700: *
701: ******************************************************************************/
702: print_pipe12_er(msg)
703: char *msg;
704: {
705: writes(" \n"); /* start a new print line */
706: writes("cycle: ");
707: writed( cycle );
708: writes(" test ");
709: writed( test_no );
710: writes(" (Pipe 12), subtest ");
711: writed( subtest );
712: writes(" error - ");
713: writes( msg );
714: writec('\n');
715: writes(
716: " LDD(op), SUBD(op), ADDD(0.0), SUBD(op), ADDD(op), SUBD(0.0), ADD(op), STD\n");
717: writes("operand = ");
718: write32h( dbl_ld_acc.m );
719: writec(' ');
720: write32h( dbl_ld_acc.l );
721: writes(", final Acc = ");
722: write32h( dbl_st_acc.m );
723: writec(' ');
724: write32h( dbl_st_acc.l );
725: writes(", data index = ");
726: writed( index );
727: writec('\n');
728: writes(" expected Acc = ");
729: write32h( dbl_expected.m );
730: writec(' ');
731: write32h( dbl_expected.l );
732: writec('\n');
733: }
734:
735:
736:
737:
738:
739: /******************************************************************************
740: *
741: * HALT ON ERROR ROUTINE
742: *
743: * halt with the necessary information saved in the registers
744: *
745: ******************************************************************************/
746: pipe12_er_hlt( subtest )
747: int subtest;
748: {
749: sgl_value_3 = dbl_st_acc.m;
750: sgl_value_4 = dbl_st_acc.l;
751: asm("movl _test_no,r0"); /* r0 = test number */
752: asm("movl _subtest,r1"); /* r1 = subtest number */
753: asm("movl $1,r2"); /* r2 = error code */
754: asm("movl _cycle,r3"); /* r3 = cycle count */
755: asm("movl _sgl_value_1,r4"); /* r4 = MSW operand loaded */
756: asm("movl _sgl_value_2,r5"); /* r5 = LSW operand loaded */
757: asm("movl _sgl_value_3,r6"); /* r6 = MSW operand stored */
758: asm("movl _sgl_value_4,r7"); /* r7 = LSW operand stored */
759: asm("movl _sgl_value_5,r8"); /* r8 = MSW operand expect */
760: asm("movl _sgl_value_6,r9"); /* r9 = LSW operand expect */
761: asm("movl _index,r10"); /* r10 = data index */
762: if( subtest == 9 ) {
763: asm("movl _sgl_value_10,r11"); /* r11 = final FP value */
764: asm("movl _sgl_value_9,r12"); /* r12 = expected FP value */
765: };
766: asm(".globl _pipe12_1_hlt");
767: asm("_pipe12_1_hlt:"); /* PC after the halt */
768: asm("halt"); /* HALT ... */
769: } /* end of halt on error */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.