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