#define MAX_OPCODES 280
-struct op_code_struct {
+static struct op_code_struct {
const char *name;
short inst_type; /* registers and immediate values involved */
short inst_offset_type; /* immediate vals offset from PC? (= 1 for branches) */
};
/* prefix for register names */
-char register_prefix[] = "r";
-char special_register_prefix[] = "spr";
-char fsl_register_prefix[] = "rfsl";
-char pvr_register_prefix[] = "rpvr";
+static const char register_prefix[] = "r";
+static const char fsl_register_prefix[] = "rfsl";
+static const char pvr_register_prefix[] = "rpvr";
/* #defines for valid immediate range */
default :
{
if ( ((((instr & IMM_MASK) >> IMM_LOW) ^ op->immval_mask) & 0xE000) == REG_PVR_MASK) {
- sprintf(tmpstr, "%spvr%d", register_prefix, (unsigned short)(((instr & IMM_MASK) >> IMM_LOW) ^ op->immval_mask) ^ REG_PVR_MASK);
+ sprintf(tmpstr, "%s%u", pvr_register_prefix,
+ (unsigned short)(((instr & IMM_MASK) >> IMM_LOW) ^
+ op->immval_mask) ^ REG_PVR_MASK);
return(strdup(tmpstr));
} else {
strcpy(spr, "pc");