|
|
1.1 root 1:
2: #include "evt_defs.h"
3:
4: /*
5: ********************************************************************
6: *
7: * MONITOR FOR THE FPP UNDERFLOW EVENT TEST
8: *
9: * 25-Mar-85 JJM: written
10: * 29-Mar-85 JJM: mauled the beast for CVDF (cvdf has ovfl but no undfl)
11: *
12: ********************************************************************
13: */
14: undfl_test()
15: {
16: event_msg = "Underflow";
17: test_event = ARITH_CODE; /* expect an arithmetic fault */
18: exp_code = FLT_UNDFL_CODE; /* -specificly floating underflow */
19: if( evt_inst ) /* was the op-code specified? */
20: {
21: inst_index = get_ovfl_index( evt_inst );
22: if( (inst_index < 0) ||
23: (ovfl_tbl[inst_index].undfl_data == null_data) )
24: {
25: if( (prt_hdrs) && (cycle == 1) )
26: {
27: writes(
28: "There are no UNDERFLOW faults with op-code ");
29: writeh( evt_inst ); /* print the ersatz op-code */
30: writec('\n');
31: error = TRUE; /* needed for line feeds */
32: }
33: } else
34: test_undfl_inst(); /* test the instruction */
35: } else /* test all applicable op-codes */
36: for(inst_index=0; inst_index < size_ovfl_tbl; inst_index++)
37: {
38: data_ptr = ovfl_tbl[ inst_index ].undfl_data;
39: if( data_ptr != null_data )
40: test_undfl_inst(); /* test the instruction */
41: }
42: }
43:
44:
45:
46: /*
47: ********************************************************************
48: *
49: * TEST THE UNDERFLOW EVENT ON AN INSTRUCTION
50: *
51: ********************************************************************
52: */
53: test_undfl_inst()
54: {
55: valid_test = TRUE; /* a test is being run */
56: op_code = ovfl_tbl[ inst_index ].inst_code;
57: op_name = ovfl_tbl[ inst_index ].name;
58: no_ops = ovfl_tbl[ inst_index ].no_operands;
59: precision = ovfl_tbl[ inst_index ].precision;
60: data_ptr = ovfl_tbl[ inst_index ].undfl_data;
61: max_index = *ovfl_tbl[ inst_index ].undfl_cnt;
62: if( precision == SGL ) {
63: sgl_op = TRUE;
64: acc_ld_size = SGL; /* use a sgl precision Acc. */
65: } else {
66: sgl_op = FALSE;
67: acc_ld_size = DBL; /* use a dbl precision Acc. */
68: }
69: if( (prt_hdrs) && (cycle == 1) )
70: writes( op_name );
71: disable_mask = 0; /* all events enabled */
72: evt_disabled = FALSE;
73: test_inst(); /* test the instruction */
74: disable_mask = PSL_EN_UNDFL; /* disable underflows */
75: evt_disabled = TRUE;
76: test_inst(); /* test the instruction */
77: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.