Skip to content

Commit

Permalink
instrument missing MIPS instructions (qemu#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
rvantonder authored and ivg committed Oct 11, 2017
1 parent dd23ceb commit 1ffb7a6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions target-mips/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2176,6 +2176,13 @@ static void gen_logic_imm(DisasContext *ctx, uint32_t opc,
return;
}
uimm = (uint16_t)imm;

#ifdef HAS_TRACEWRAP
TCGv trs = tcg_const_i32(rs);
gen_helper_trace_load_reg(trs, cpu_gpr[rs]);
tcg_temp_free(trs);
#endif //HAS_TRACEWRAP

switch (opc) {
case OPC_ANDI:
if (likely(rs != 0))
Expand Down Expand Up @@ -2210,6 +2217,11 @@ static void gen_logic_imm(DisasContext *ctx, uint32_t opc,
MIPS_DEBUG("Unknown logical immediate opcode %08x", opc);
break;
}
#ifdef HAS_TRACEWRAP
TCGv trt = tcg_const_i32(rt);
gen_helper_trace_store_reg(trt, cpu_gpr[rt]);
tcg_temp_free(trt);
#endif //HAS_TRACEWRAP
}

/* Set on less than with immediate operand */
Expand Down

0 comments on commit 1ffb7a6

Please sign in to comment.