|
|
1.1 ! root 1: #include "fpp_defs.h" ! 2: ! 3: ! 4: ! 5: /*************************************************************************** ! 6: * ! 7: * CMPD2 -COMPARE 2 DBL OPERANDS TO EACH OTHER -IGNORE THE ACCUMULATOR ! 8: * ! 9: *****************************************************************************/ ! 10: cmpd2() ! 11: { ! 12: asm(".globl _cmpd2_t"); ! 13: asm("_cmpd2_t:"); /* entry address */ ! 14: if( ( cycle == 1 ) && ( prt_hdrs ) ) /* print headers on 1st pass */ ! 15: writes(" CMPD2"); ! 16: cmpd2_1(); /* register / register data */ ! 17: cmpd2_2(); /* cache / cache data */ ! 18: cmpd2_3(); /* cache / register data */ ! 19: cmpd2_4(); /* register / cache data */ ! 20: cmpd2_5(); /* acc. corruption test */ ! 21: cmpd2_6(); /* register corruption test */ ! 22: asm("jmp *return"); /* return to the test monitor */ ! 23: } ! 24: ! 25: ! 26: ! 27: /**************************************************************************** ! 28: * ! 29: * SUBTEST 1 - CMPD2 test -register / register data ! 30: * ! 31: ****************************************************************************/ ! 32: cmpd2_1() ! 33: { ! 34: force_loop = FALSE; ! 35: subtest = 1; ! 36: index = 0; ! 37: do ! 38: { ! 39: dbl_value_1 = cmpd_1_data[index].one; /* get the data operands */ ! 40: dbl_value_2 = cmpd_1_data[index].two; ! 41: sgl_expected = cmpd_1_data[index].flag; /* get expected results */ ! 42: sgl_value_1 = dbl_value_1.m; ! 43: sgl_value_2 = dbl_value_1.l; ! 44: sgl_value_3 = dbl_value_2.m; ! 45: sgl_value_4 = dbl_value_2.l; ! 46: index2 = 0; /* clear Acc. data index */ ! 47: do ! 48: { ! 49: dbl_ld_acc = ldd_1_data[index2].ld; /* get the Accumulator data */ ! 50: asm("ldd _dbl_ld_acc"); /* load the accumulator */ ! 51: status_index = 0; /* clear the status index */ ! 52: do ! 53: { ! 54: sgl_dummy1 = status_array[status_index]; /* array = +, -, 0 */ ! 55: /* ! 56: * If LOOP ON ERROR is set, this is the loop for this subtest. ! 57: * The force loop flag is set after the first error. ! 58: */ ! 59: asm("_cmpd2_1_lp1:"); ! 60: asm("movl _sgl_value_1,r4"); /* r4 = operand #1's MSW */ ! 61: asm("movl _sgl_value_2,r5"); /* r5 = operand #1's LSW */ ! 62: asm("movl _sgl_value_3,r6"); /* r6 = operand #2's MSW */ ! 63: asm("movl _sgl_value_4,r7"); /* r7 = operand #2's LSW */ ! 64: asm("nop"); ! 65: asm("tstl _sgl_dummy1"); /* generate initial status */ ! 66: asm("movpsl _init_psl"); /* save the initial status */ ! 67: asm("cmpd2 r4,r6"); /* compare the operands */ ! 68: asm("movpsl _psl_val"); /* save the final status */ ! 69: asm("std _dbl_st_acc"); /* save the acc */ ! 70: if( force_loop ) /* loop? */ ! 71: asm("brb _cmpd2_1_lp1");; /* run the loop again */ ! 72: exp_psl = init_psl; /* get the initial PSL */ ! 73: exp_psl &= 0xfffffff3; /* clear ZERO, NEGATIVE */ ! 74: if( sgl_expected == ZERO ) ! 75: exp_psl |= PSL_Z; /* expect the ZERO bit set */ ! 76: if( sgl_expected == NEGATIVE ) ! 77: exp_psl |= PSL_N; /* expect the NEG bit set */ ! 78: if( psl_val != exp_psl ) { /* COMPARE the values */ ! 79: errcnt++; /* bump the error count */ ! 80: if ( prt_error ) { ! 81: writes(" \n"); /* start a new print line */ ! 82: writes("cycle: "); ! 83: writed( cycle ); ! 84: writes(" CMPD2 test "); ! 85: writed( test_no ); ! 86: writes(", subtest 1 (Reg./Reg. Data) - BAD FINAL PSL\n"); ! 87: print_cmpd2_data(); ! 88: writes(", index = "); ! 89: writed( index ); ! 90: writec('\n'); ! 91: writes(" final Acc = "); ! 92: write32h( dbl_st_acc.m ); ! 93: writec(' '); ! 94: write32h( dbl_st_acc.l ); ! 95: writes(", operand 2 = "); ! 96: write32h( sgl_value_3); ! 97: writec(' '); ! 98: write32h( sgl_value_4); ! 99: writec('\n'); ! 100: writes(" initial PSL = "); ! 101: write32h( init_psl ); ! 102: writes(", final PSL = "); ! 103: write32h( psl_val ); ! 104: writes(", expected PSL = "); ! 105: write32h( exp_psl ); ! 106: writes(" \n"); ! 107: } ! 108: if ( halt_flg ) ! 109: cmpd2_er_halt( BAD_PSL_HLT ); /* halt on the error */ ! 110: if ( loop_on_err ) { ! 111: force_loop = TRUE; /* set the force loop flag */ ! 112: asm("brw _cmpd2_1_lp1"); /* and loop */ ! 113: }; /* end of loop-on-error */ ! 114: } /* end of compare error */ ! 115: } while( ++status_index < 3 ); ! 116: index2++; ! 117: } while( (index2 < 10) && (index2 < max_ldf_1_index) ); ! 118: } while( index++ < max_cmpd_1_index ); ! 119: } /* end of subtest 1 */ ! 120: ! 121: ! 122: ! 123: /**************************************************************************** ! 124: * ! 125: * SUBTEST 2 - CMPD2 test - cache / cache data ! 126: * ! 127: ****************************************************************************/ ! 128: cmpd2_2() ! 129: { ! 130: force_loop = FALSE; ! 131: subtest = 2; ! 132: index = 0; ! 133: do ! 134: { ! 135: dbl_value_1 = cmpd_1_data[index].one; /* get the data operands */ ! 136: dbl_value_2 = cmpd_1_data[index].two; ! 137: sgl_value_1 = dbl_value_1.m; ! 138: sgl_value_2 = dbl_value_1.l; ! 139: sgl_value_3 = dbl_value_2.m; ! 140: sgl_value_4 = dbl_value_2.l; ! 141: sgl_expected = cmpd_1_data[index].flag; /* get expected results */ ! 142: index2 = 0; /* clear Acc. data index */ ! 143: do ! 144: { ! 145: dbl_ld_acc = ldd_1_data[index2].ld; /* get the Accumulator data */ ! 146: asm("ldd _dbl_ld_acc"); /* load the accumulator */ ! 147: status_index = 0; /* clear the status index */ ! 148: do ! 149: { ! 150: sgl_dummy1 = status_array[status_index]; /* array = +, -, 0 */ ! 151: /* ! 152: * If LOOP ON ERROR is set, this is the loop for this subtest. ! 153: * The force loop flag is set after the first error. ! 154: */ ! 155: asm("_cmpd2_2_lp1:"); ! 156: asm("tstl _sgl_dummy1"); /* generate initial status */ ! 157: asm("movpsl _init_psl"); /* save the initial status */ ! 158: asm("nop"); ! 159: asm("cmpd2 _dbl_value_1,_dbl_value_2"); /* compare the data */ ! 160: asm("nop"); ! 161: asm("movpsl _psl_val"); /* save the final status */ ! 162: asm("std _dbl_st_acc"); /* save the acc */ ! 163: if( force_loop ) /* loop? */ ! 164: asm("brb _cmpd2_2_lp1");; /* run the loop again */ ! 165: exp_psl = init_psl; /* get the initial PSL */ ! 166: exp_psl &= 0xfffffff3; /* clear ZERO, NEGATIVE */ ! 167: if( sgl_expected == ZERO ) ! 168: exp_psl |= PSL_Z; /* expect the ZERO bit set */ ! 169: if( sgl_expected == NEGATIVE ) ! 170: exp_psl |= PSL_N; /* expect the NEG bit set */ ! 171: if( psl_val != exp_psl ) { /* COMPARE the values */ ! 172: errcnt++; /* bump the error count */ ! 173: if ( prt_error ) { ! 174: writes(" \n"); /* start a new print line */ ! 175: writes("cycle: "); ! 176: writed( cycle ); ! 177: writes(" CMPD2 test "); ! 178: writed( test_no ); ! 179: writes(", subtest 2 (Cache/Cache Data) - BAD FINAL PSL\n"); ! 180: print_cmpd2_data(); ! 181: writes(", index = "); ! 182: writed( index ); ! 183: writec('\n'); ! 184: writes(" final Acc = "); ! 185: write32h( dbl_st_acc.m ); ! 186: writec(' '); ! 187: write32h( dbl_st_acc.l ); ! 188: writes(", operand 2 = "); ! 189: write32h( sgl_value_3); ! 190: writec(' '); ! 191: write32h( sgl_value_4); ! 192: writec('\n'); ! 193: writes(" initial PSL = "); ! 194: write32h( init_psl ); ! 195: writes(", final PSL = "); ! 196: write32h( psl_val ); ! 197: writes(", expected PSL = "); ! 198: write32h( exp_psl ); ! 199: writes(" \n"); ! 200: } ! 201: if ( halt_flg ) ! 202: cmpd2_er_halt( BAD_PSL_HLT ); /* halt on the error */ ! 203: if ( loop_on_err ) ! 204: { ! 205: force_loop = TRUE; /* set the force loop flag */ ! 206: asm("brw _cmpd2_2_lp1"); /* and loop */ ! 207: }; /* end of loop-on-error */ ! 208: } /* end of compare error */ ! 209: } while( ++status_index < 3 ); ! 210: index2++; ! 211: } while( (index2 < 10) && (index2 < max_ldf_1_index) ); ! 212: } while( index++ < max_cmpd_1_index ); ! 213: } /* end of subtest 2 */ ! 214: ! 215: ! 216: ! 217: /**************************************************************************** ! 218: * ! 219: * SUBTEST 3 - CMPD2 test - cache / register data ! 220: * ! 221: ****************************************************************************/ ! 222: cmpd2_3() ! 223: { ! 224: force_loop = FALSE; ! 225: subtest = 3; ! 226: index = 0; ! 227: do ! 228: { ! 229: dbl_value_1 = cmpd_1_data[index].one; /* get the data operands */ ! 230: dbl_value_2 = cmpd_1_data[index].two; ! 231: sgl_value_1 = dbl_value_1.m; ! 232: sgl_value_2 = dbl_value_1.l; ! 233: sgl_value_3 = dbl_value_2.m; ! 234: sgl_value_4 = dbl_value_2.l; ! 235: sgl_expected = cmpd_1_data[index].flag; /* get expected results */ ! 236: index2 = 0; /* clear Acc. data index */ ! 237: do ! 238: { ! 239: dbl_ld_acc = ldd_1_data[index2].ld; /* get the Accumulator data */ ! 240: asm("ldd _dbl_ld_acc"); /* load the accumulator */ ! 241: status_index = 0; /* clear the status index */ ! 242: do ! 243: { ! 244: sgl_dummy1 = status_array[status_index]; /* array = +, -, 0 */ ! 245: /* ! 246: * If LOOP ON ERROR is set, this is the loop for this subtest. ! 247: * The force loop flag is set after the first error. ! 248: */ ! 249: asm("_cmpd2_3_lp1:"); ! 250: asm("movl _sgl_value_3,r4"); /* move operand #2's MSW,r4 */ ! 251: asm("movl _sgl_value_4,r5"); /* move operand #2's LSW,r5 */ ! 252: asm("tstl _sgl_dummy1"); /* generate initial status */ ! 253: asm("movpsl _init_psl"); /* save the initial status */ ! 254: asm("nop"); ! 255: asm("cmpd2 _dbl_value_1,r4"); /* compare the data */ ! 256: asm("nop"); ! 257: asm("movpsl _psl_val"); /* save the final status */ ! 258: asm("std _sgl_st_acc"); /* save the acc */ ! 259: if( force_loop ) /* loop? */ ! 260: asm("brb _cmpd2_3_lp1");; /* run the loop again */ ! 261: exp_psl = init_psl; /* get the initial PSL */ ! 262: exp_psl &= 0xfffffff3; /* clear ZERO, NEGATIVE */ ! 263: if( sgl_expected == ZERO ) ! 264: exp_psl |= PSL_Z; /* expect the ZERO bit set */ ! 265: if( sgl_expected == NEGATIVE ) ! 266: exp_psl |= PSL_N; /* expect the NEG bit set */ ! 267: if( psl_val != exp_psl ) { /* COMPARE the values */ ! 268: errcnt++; /* bump the error count */ ! 269: if ( prt_error ) { ! 270: writes(" \n"); /* start a new print line */ ! 271: writes("cycle: "); ! 272: writed( cycle ); ! 273: writes(" CMPD2 test "); ! 274: writed( test_no ); ! 275: writes(", subtest 3 (Cache/Reg. Data) - BAD FINAL PSL\n"); ! 276: print_cmpd2_data(); ! 277: writes(", index = "); ! 278: writed( index ); ! 279: writec('\n'); ! 280: writes(" final Acc = "); ! 281: write32h( dbl_st_acc.m ); ! 282: writec(' '); ! 283: write32h( dbl_st_acc.l ); ! 284: writes(", operand 2 = "); ! 285: write32h( sgl_value_3); ! 286: writec(' '); ! 287: write32h( sgl_value_4); ! 288: writec('\n'); ! 289: writes(" initial PSL = "); ! 290: write32h( init_psl ); ! 291: writes(", final PSL = "); ! 292: write32h( psl_val ); ! 293: writes(", expected PSL = "); ! 294: write32h( exp_psl ); ! 295: writes(" \n"); ! 296: } ! 297: if ( halt_flg ) ! 298: cmpd2_er_halt( BAD_PSL_HLT ); /* halt on the error */ ! 299: if ( loop_on_err ) ! 300: { ! 301: force_loop = TRUE; /* set the force loop flag */ ! 302: asm("brw _cmpd2_3_lp1"); /* and loop */ ! 303: }; /* end of loop-on-error */ ! 304: } /* end of compare error */ ! 305: } while( ++status_index < 3 ); ! 306: index2++; ! 307: } while( (index2 < 10) && (index2 < max_ldf_1_index) ); ! 308: } while( index++ < max_cmpd_1_index ); ! 309: } /* end of subtest 3 */ ! 310: ! 311: ! 312: ! 313: /**************************************************************************** ! 314: * ! 315: * SUBTEST 4 - CMPD2 test - register / cache data ! 316: * ! 317: ****************************************************************************/ ! 318: cmpd2_4() ! 319: { ! 320: force_loop = FALSE; ! 321: subtest = 4; ! 322: index = 0; ! 323: do ! 324: { ! 325: dbl_value_1 = cmpd_1_data[index].one; /* get the data operands */ ! 326: dbl_value_2 = cmpd_1_data[index].two; ! 327: sgl_value_1 = dbl_value_1.m; ! 328: sgl_value_2 = dbl_value_1.l; ! 329: sgl_value_3 = dbl_value_2.m; ! 330: sgl_value_4 = dbl_value_2.l; ! 331: sgl_expected = cmpd_1_data[index].flag; /* get expected results */ ! 332: index2 = 0; /* clear Acc. data index */ ! 333: do ! 334: { ! 335: dbl_ld_acc = ldd_1_data[index2].ld; /* get the Accumulator data */ ! 336: asm("ldd _dbl_ld_acc"); /* load the accumulator */ ! 337: status_index = 0; /* clear the status index */ ! 338: do ! 339: { ! 340: sgl_dummy1 = status_array[status_index]; /* array = +, -, 0 */ ! 341: /* ! 342: * If LOOP ON ERROR is set, this is the loop for this subtest. ! 343: * The force loop flag is set after the first error. ! 344: */ ! 345: asm("_cmpd2_4_lp1:"); ! 346: asm("movl _sgl_value_1,r2"); /* move operand #1,s MSW,r2 */ ! 347: asm("movl _sgl_value_2,r3"); /* move operand #1's LSW,r3 */ ! 348: asm("tstl _sgl_dummy1"); /* generate initial status */ ! 349: asm("movpsl _init_psl"); /* save the initial status */ ! 350: asm("nop"); ! 351: asm("cmpd2 r2,_dbl_value_2"); /* compare the data */ ! 352: asm("nop"); ! 353: asm("movpsl _psl_val"); /* save the final status */ ! 354: asm("std _dbl_st_acc"); /* save the acc */ ! 355: if( force_loop ) /* loop? */ ! 356: asm("brb _cmpd2_4_lp1");; /* run the loop again */ ! 357: exp_psl = init_psl; /* get the initial PSL */ ! 358: exp_psl &= 0xfffffff3; /* clear ZERO, NEGATIVE */ ! 359: if( sgl_expected == ZERO ) ! 360: exp_psl |= PSL_Z; /* expect the ZERO bit set */ ! 361: if( sgl_expected == NEGATIVE ) ! 362: exp_psl |= PSL_N; /* expect the NEG bit set */ ! 363: if( psl_val != exp_psl ) { /* COMPARE the values */ ! 364: errcnt++; /* bump the error count */ ! 365: if ( prt_error ) { ! 366: writes(" \n"); /* start a new print line */ ! 367: writes("cycle: "); ! 368: writed( cycle ); ! 369: writes(" CMPD2 test "); ! 370: writed( test_no ); ! 371: writes(", subtest 4 (Reg./Cache Data) - BAD FINAL PSL\n"); ! 372: print_cmpd2_data(); ! 373: writes(", index = "); ! 374: writed( index ); ! 375: writec('\n'); ! 376: writes(" final Acc = "); ! 377: write32h( dbl_st_acc.m ); ! 378: writec(' '); ! 379: write32h( dbl_st_acc.l ); ! 380: writes(", operand 2 = "); ! 381: write32h( sgl_value_3); ! 382: writec(' '); ! 383: write32h( sgl_value_4); ! 384: writec('\n'); ! 385: writes(" initial PSL = "); ! 386: write32h( init_psl ); ! 387: writes(", final PSL = "); ! 388: write32h( psl_val ); ! 389: writes(", expected PSL = "); ! 390: write32h( exp_psl ); ! 391: writes(" \n"); ! 392: } ! 393: if ( halt_flg ) ! 394: cmpd2_er_halt( BAD_PSL_HLT ); /* halt on the error */ ! 395: if ( loop_on_err ) ! 396: { ! 397: force_loop = TRUE; /* set the force loop flag */ ! 398: asm("jmp _cmpd2_4_lp1"); /* and loop */ ! 399: } /* end of loop-on-error */ ! 400: } /* end of compare error */ ! 401: } while( ++status_index < 3 ); /* end of status loop */ ! 402: index2++; ! 403: } while( (index2 < 10) && (index2 < max_ldf_1_index) ); ! 404: } while( index++ < max_cmpd_1_index ); ! 405: } /* end of subtest 4 */ ! 406: ! 407: ! 408: ! 409: /************************************************************************ ! 410: * ! 411: * SUBTEST 5 - Check for register corruption ! 412: * ! 413: ************************************************************************/ ! 414: cmpd2_5() ! 415: { ! 416: force_loop = FALSE; /* clear force_loop flg */ ! 417: subtest = 5; ! 418: fill_reg_buf( load_regs ); /* get pattern for regs */ ! 419: index = 0; ! 420: do ! 421: { ! 422: dbl_value_1 = cmpd_1_data[index].one; /* data to load */ ! 423: dbl_value_2 = cmpd_1_data[index].two; /* data to compare */ ! 424: dbl_ld_acc.m = 0x40800000; /* get acc data */ ! 425: dbl_ld_acc.l = 0x10101010; /* get acc data */ ! 426: sgl_value_1 = dbl_value_1.m; ! 427: sgl_value_2 = dbl_value_1.l; ! 428: sgl_value_3 = dbl_value_2.m; ! 429: sgl_value_4 = dbl_value_2.l; ! 430: asm("ldd _dbl_ld_acc"); /* load the acc */ ! 431: /* ! 432: * If LOOP ON ERROR is set, this is the loop for this subtest. ! 433: * The force loop flag is set after the first error. ! 434: */ ! 435: asm("_cmpd2_5_lp1:"); ! 436: asm("loadr $0x1fff,_load_regs"); /* load regs 0 - 12 */ ! 437: asm("nop"); ! 438: asm("cmpd2 _dbl_value_1,_dbl_value_2"); /* compare the data */ ! 439: asm("nop"); ! 440: asm("storer $0x1fff,_store_regs"); /* store regs 0 - 12 */ ! 441: asm("std _dbl_st_acc"); /* save the acc */ ! 442: if( force_loop ) /* loop? */ ! 443: asm("brb _cmpd2_5_lp1");; /* run the loop again */ ! 444: /* ! 445: * Now compare the stored register values to those that were loaded ! 446: */ ! 447: index2 = 0; ! 448: while( (load_regs[index2] == store_regs[index2]) && (index2 < 13) ) ! 449: index2++; /* check reg values */ ! 450: if( index2 < 13 ) { /* error if index2 < 13 */ ! 451: errcnt++; /* bump the error count */ ! 452: if ( prt_error ) { ! 453: writes(" \n"); /* start a new print line */ ! 454: writes("cycle: "); ! 455: writed( cycle ); ! 456: writes(", CMPD2 test "); ! 457: writed( test_no ); ! 458: writes(", subtest 5 - A REGISTER WAS MODIFIED\n"); ! 459: print_cmpd2_data(); ! 460: writec('\n'); ! 461: writes(" final Acc = "); ! 462: write32h( dbl_st_acc.m ); ! 463: writec(' '); ! 464: write32h( dbl_st_acc.l ); ! 465: writes(", operand 2 = "); ! 466: write32h( sgl_value_3); ! 467: writec(' '); ! 468: write32h( sgl_value_4); ! 469: writec('\n'); ! 470: writes("register "); ! 471: writed( index2 ); ! 472: writes(" = "); ! 473: write32h( store_regs[ index2 ] ); ! 474: writes(", should be = "); ! 475: write32h( load_regs[ index2 ] ); ! 476: writes("\n"); ! 477: } ! 478: if ( halt_flg ) ! 479: cmpd2_er_halt( BAD_REG_HLT ); /* halt on the error */ ! 480: if ( loop_on_err ) ! 481: { ! 482: force_loop = TRUE; /* set the force loop flag */ ! 483: asm("jmp _cmpd2_5_lp1"); /* and loop */ ! 484: }; /* end of loop-on-error */ ! 485: } /* end of compare error */ ! 486: } while( index++ < max_cmpd_1_index ); ! 487: } /* end of subtest 5 */ ! 488: ! 489: ! 490: ! 491: /**************************************************************************** ! 492: * ! 493: * SUBTEST 6 - CMPD2 test Accumulator stability test ! 494: * ! 495: ****************************************************************************/ ! 496: cmpd2_6() ! 497: { ! 498: force_loop = FALSE; ! 499: subtest = 6; ! 500: index = 0; ! 501: do ! 502: { ! 503: dbl_value_1 = cmpd_1_data[index].one; /* get the data operands */ ! 504: dbl_value_2 = cmpd_1_data[index].two; ! 505: sgl_value_1 = dbl_value_1.m; ! 506: sgl_value_2 = dbl_value_1.l; ! 507: sgl_value_3 = dbl_value_2.m; ! 508: sgl_value_4 = dbl_value_2.l; ! 509: index2 = 0; /* clear Acc. data index */ ! 510: do ! 511: { ! 512: dbl_ld_acc = ldd_1_data[index2].ld; /* get the Accumulator data */ ! 513: if( !(dbl_ld_acc.m & 0x7f800000 ) ) { ! 514: dbl_expected.m = 0; /* expect a '0' stored */ ! 515: dbl_expected.l = 0; ! 516: } else ! 517: dbl_expected = dbl_ld_acc; ! 518: asm("ldd _dbl_ld_acc"); /* load the acc */ ! 519: /* ! 520: * If LOOP ON ERROR is set, this is the loop for this subtest. ! 521: * The force loop flag is set after the first error. ! 522: */ ! 523: asm("_cmpd2_6_lp1:"); ! 524: asm("nop"); ! 525: asm("cmpd2 _dbl_value_1,_dbl_value_2");/* compare the operands */ ! 526: asm("nop"); ! 527: asm("std _dbl_st_acc"); /* store the accumulator */ ! 528: if( force_loop ) /* loop? */ ! 529: asm("brb _cmpd2_6_lp1");; /* run the loop again */ ! 530: if( (dbl_st_acc.m != dbl_expected.m) || /* compare the final */ ! 531: (dbl_st_acc.l != dbl_expected.l) ) { /* results */ ! 532: errcnt++; /* bump the error count */ ! 533: if ( prt_error ) { ! 534: writes(" \n"); /* start a new print line */ ! 535: writes("cycle: "); ! 536: writed( cycle ); ! 537: writes(" CMPD2 test "); ! 538: writed( test_no ); ! 539: writes(", subtest 6 - BAD FINAL ACC\n"); ! 540: print_cmpd2_data(); ! 541: writes(", index = "); ! 542: writed( index ); ! 543: writec('\n'); ! 544: writes(" final Acc = "); ! 545: write32h( dbl_st_acc.m ); ! 546: writec(' '); ! 547: write32h( dbl_st_acc.l ); ! 548: writes(", operand 2 = "); ! 549: write32h( sgl_value_3); ! 550: writec(' '); ! 551: write32h( sgl_value_4); ! 552: writec('\n'); ! 553: writes("expected Acc = "); ! 554: write32h( dbl_expected.m ); ! 555: writec(' '); ! 556: write32h( dbl_expected.l ); ! 557: writec('\n'); ! 558: } ! 559: if ( halt_flg ) /* halt on error? */ ! 560: cmpd2_er_halt( BAD_ACC_HLT ); ! 561: if ( loop_on_err ) ! 562: { ! 563: force_loop = TRUE; /* set the force loop flag */ ! 564: asm("jmp _cmpd2_6_lp1"); /* and loop */ ! 565: }; /* end of loop-on-error */ ! 566: } /* end of compare error */ ! 567: index2++; ! 568: } while( (index2 < 10) && (index2 < max_ldf_1_index) ); ! 569: } while( index++ < max_cmpd_1_index ); ! 570: } /* end of subtest 6 */ ! 571: ! 572: ! 573: ! 574: /************************************************************************** ! 575: * ! 576: * PRINT THE DATA AND STORE RESULTS ! 577: * ! 578: * initial Acc = xxxxxxxx xxxxxxxx, operand 1 = xxxxxxxx xxxxxxxx ! 579: **************************************************************************/ ! 580: print_cmpd2_data() ! 581: { ! 582: writes(" initial Acc = "); ! 583: write32h( dbl_ld_acc.m ); ! 584: writec(' '); ! 585: write32h( dbl_ld_acc.l ); ! 586: writes(", operand 1 = "); ! 587: write32h( sgl_value_1 ); ! 588: writec(' '); ! 589: write32h( sgl_value_2 ); ! 590: } ! 591: ! 592: ! 593: ! 594: /************************************************************************** ! 595: * ! 596: * HALT ON ERROR ROUTINE ! 597: * ! 598: **************************************************************************/ ! 599: cmpd2_er_halt( halt_code ) ! 600: int halt_code; ! 601: { ! 602: sgl_value_1 = dbl_value_1.m; ! 603: sgl_value_2 = dbl_value_1.l; ! 604: sgl_value_3 = dbl_value_2.m; ! 605: sgl_value_4 = dbl_value_2.l; ! 606: sgl_value_5 = dbl_ld_acc.m; ! 607: sgl_value_6 = dbl_ld_acc.l; ! 608: sgl_value_7 = dbl_st_acc.m; ! 609: sgl_value_8 = dbl_st_acc.l; ! 610: sgl_dummy1 = halt_code; /* get the error type */ ! 611: asm("movl _test_no,r0"); /* r0 = test number */ ! 612: asm("movl _subtest,r1"); /* r1 = subtest number */ ! 613: asm("movl _sgl_dummy1,r2"); /* r2 = error code */ ! 614: asm("movl _cycle,r3"); /* r3 = cycle count */ ! 615: asm("movl _sgl_value_5,r4"); /* r4 = MS acc loaded */ ! 616: asm("movl _sgl_value_6,r5"); /* r5 = LS acc loaded */ ! 617: asm("movl _sgl_value_1,r6"); /* r6 = MS operand 1 */ ! 618: asm("movl _sgl_value_2,r7"); /* r7 = MS operand 1 */ ! 619: asm("movl _sgl_value_3,r8"); /* r8 = MS operand 2 */ ! 620: asm("movl _sgl_value_4,r9"); /* r9 = MS operand 2 */ ! 621: asm("movl _psl_val,r10"); /* r10 = actual PSL */ ! 622: if( halt_code == BAD_ACC_HLT ) { ! 623: sgl_value_1 = dbl_expected.m; ! 624: sgl_value_2 = dbl_expected.l; ! 625: asm("movl _sgl_value_7,r11"); /* r11 = MS stored */ ! 626: asm("movl _sgl_value_8,r12"); /* r12 = LS stored */ ! 627: asm("movl _sgl_value_1,r13"); /* r13 = MS expected */ ! 628: asm("movl _sgl_value_2,r14"); /* r14 = LS expected */ ! 629: } else ! 630: if( halt_code == BAD_REG_HLT ) { ! 631: sgl_dummy1 = load_regs[index2]; ! 632: sgl_dummy2 = store_regs[index2]; ! 633: asm("movl _index2,r11"); /* r11 = bad register # */ ! 634: asm("movl _sgl_dummy2,r12"); /* r12 = actual value */ ! 635: asm("movl _sgl_dummy1,r13"); /* r13 = expected value */ ! 636: } else ! 637: if( halt_code == BAD_PSL_HLT ) { ! 638: asm("movl _exp_psl,r11"); /* r11 = expected PSL */ ! 639: asm("movl _index,r12"); /* r12 = data index */ ! 640: }; ! 641: asm("halt"); /* HALT ... */ ! 642: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.