|
|
Power 6/32 Unix version 1.21
#include "dmp_defs.h"
/*************************************************************************
*
* SCHEDULE THE ADDRESSING / DEMAND PAGING TESTS FOR AN INSTRUCTION
*
*************************************************************************/
sched_test( test_index )
int test_index;
{
exp_event = FALSE; /* clear event expected flag */
force_loop = FALSE; /* clear the force a loop flag */
unexp_event_ret = FALSE; /* clear unexpected event return */
/*
* get the information about this instruction
*/
op_code = inst_tbl[ test_index ].inst_code;
op_name = inst_tbl[ test_index ].name;
precision = inst_tbl[ test_index ].precision;
no_ops = inst_tbl[ test_index ].no_operands;
op_type = inst_tbl[ test_index ].type;
data_ptr = inst_tbl[ test_index ].data;
test_ptr = inst_tbl[ test_index ].test_routine;
max_index = *inst_tbl[ test_index ].no_patterns;
/*
* if we're using the "no-fpp" wcs the instruction might be emulated
*/
if( no_fpp_wcs )
emulated_inst = inst_tbl[ test_index ].emulation_flg;
else
emulated_inst = FALSE;
/*
* set the accumulator type flags based on the instruction type
*/
if( precision == SGL ) {
acc_ld_size = SGL; /* load a sgl operand */
acc_st_size = SGL; /* store a sgl operand */
} else {
acc_ld_size = DBL; /* load a dbl operand */
acc_st_size = DBL; /* store a dbl operand */
}
if( op_code == CVDF_OP_CODE )
acc_st_size = SGL; /* store a sgl operand */
/*
* set the operand type flags based on the instruction type
*/
if( (op_code == LDFD_OP_CODE) ||
(op_code == CVLD_OP_CODE) )
s_to_d = TRUE; /* set sgl-to-dbl conversion flag */
else
s_to_d = FALSE; /* reset sgl-to-dbl conversion flag */
if( op_code == CVDL_OP_CODE )
d_to_s = TRUE; /* set dbl-to-sgl conversion flag */
else
d_to_s = FALSE; /* reset dbl-to-sgl conversion flag */
if( s_to_d || d_to_s || (precision == SGL) )
sgl_op = TRUE; /* set sgl-operand flag */
else
sgl_op = FALSE; /* reset sgl-operand flag */
/*
* Now go out there and test 'em
*/
test_inst(); /* test the instruction */
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.