|
|
1.1 ! root 1: ! 2: #include "dmp_defs.h" ! 3: ! 4: /*********************************************************************** ! 5: * ! 6: * Verify final single precision accumulator value for Math functions ! 7: * ! 8: * This code is the same as CHK_SGL_ACC in that it checks the final ! 9: * single precision accumulator value except that this code doesn't ! 10: * check the PSL flag bits. In fact, the error printing and halting ! 11: * routines are in file CHK_SGL_ACC. ! 12: * This routine is used because SINF & COSF play with the PSL flags. ! 13: ***********************************************************************/ ! 14: chk_math() ! 15: { ! 16: sgl_ld_acc = dbl_ld_acc.m; /* move the data to */ ! 17: sgl_st_acc = dbl_st_acc.m; /* the sgl data */ ! 18: sgl_expected = dbl_expected.m; /* operands */ ! 19: sgl_value_1 = dbl_value_1.m; ! 20: sgl_value_2 = dbl_value_2.m; ! 21: sgl_dummy1 = init_psl & 0xffffff00; /* clear PSL's DBL bit */ ! 22: sgl_dummy2 = psl_val & 0xffffff00; /* get final PSL value */ ! 23: ! 24: if( sgl_st_acc != sgl_expected ) { ! 25: errcnt++; ! 26: if( prt_error ) ! 27: prt_s_acc_e( bad_result_msg ); ! 28: if( halt_flg ) ! 29: hlt_s_acc_e( 1 ); /* error code 1 */ ! 30: if( loop_on_err ) ! 31: force_loop = TRUE; /* set loop flag */ ! 32: } ! 33: else if( sgl_dummy2 != sgl_dummy1 ) { ! 34: errcnt++; ! 35: if( prt_error ) ! 36: prt_s_acc_e( bad_psl_msg ); ! 37: if( halt_flg ) ! 38: hlt_s_acc_e( 2 ); /* error code 2 */ ! 39: if( loop_on_err ) ! 40: force_loop = TRUE; /* set loop flag */ ! 41: } ! 42: else if( no_page_faults != exp_page_faults ) { ! 43: errcnt++; ! 44: if( prt_error ) ! 45: prt_s_acc_e( trans_flt_cnt_msg ); ! 46: if( halt_flg ) ! 47: hlt_s_acc_e( 3 ); /* error code 3 */ ! 48: if( loop_on_err ) ! 49: force_loop = TRUE; /* set loop flag */ ! 50: } ! 51: else { ! 52: reg_no = 0; ! 53: regs_ok = TRUE; ! 54: while( (reg_no <= 13) && (regs_ok) ) /* check 1st 13 regs */ ! 55: if( store_regs[ reg_no ] == exp_regs[ reg_no ] ) ! 56: reg_no++; ! 57: else ! 58: regs_ok = FALSE; ! 59: if( !regs_ok ) { ! 60: errcnt++; ! 61: if( prt_error ) ! 62: prt_s_acc_e( reg_modified_msg ); ! 63: if( halt_flg ) ! 64: hlt_s_acc_e( 4 ); /* error code 4 */ ! 65: if( loop_on_err ) ! 66: force_loop = TRUE; /* set loop flag */ ! 67: } ! 68: } ! 69: } ! 70: ! 71:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.