Use full insn code type and use casts to/from it.
@@ -758,7 +758,8 @@ static void start_insn_trace (MIR_context_t ctx, const char *name, func_desc_t f
MIR_output_insn (ctx, stderr, insn, func_desc->func_item->u.func, FALSE);
}
-static void finish_insn_trace (MIR_context_t ctx, MIR_insn_code_t code, code_t ops, MIR_val_t *bp) {
+static void finish_insn_trace (MIR_context_t ctx, MIR_full_insn_code_t code, code_t ops,
+ MIR_val_t *bp) {
int out_p;
MIR_op_mode_t op_mode = MIR_OP_UNDEF;
@@ -790,7 +791,7 @@ static void finish_insn_trace (MIR_context_t ctx, MIR_insn_code_t code, code_t o
case IC_STLD: break;
case IC_IMM_CALL: break;
default:
- op_mode = _MIR_insn_code_op_mode (ctx, code, 0, &out_p);
+ op_mode = _MIR_insn_code_op_mode (ctx, (MIR_insn_code_t) code, 0, &out_p);
if (op_mode == MIR_OP_BOUND || !out_p) op_mode = MIR_OP_UNDEF;
break;
}
@@ -845,7 +846,7 @@ static void OPTIMIZE eval (MIR_context_t ctx, func_desc_t func_desc, MIR_val_t *
MIR_full_insn_code_t trace_insn_code;
#define START_INSN(v, nops) \
do { \
- trace_insn_code = v; \
+ trace_insn_code = (MIR_full_insn_code_t) v; \
start_insn_trace (ctx, #v, func_desc, pc, nops); \
ops = pc + 2; /* skip original insn too */ \
pc += nops + 2; \
@@ -931,7 +932,7 @@ static void OPTIMIZE eval (MIR_context_t ctx, func_desc_t func_desc, MIR_val_t *
goto * pc->a;
#else
for (;;) {
- MIR_insn_code_t insn_code = pc->ic;
+ int insn_code = pc->ic;
switch (insn_code) {
#endif
