Skip to content

Commit

Permalink
Fix reg+imm accesses
Browse files Browse the repository at this point in the history
  • Loading branch information
thestr4ng3r authored and ivg committed Feb 14, 2022
1 parent 6bf64d7 commit ba70ab7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions target/arm/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,17 @@ TCGv_i32 add_reg_for_lit(DisasContext *s, int reg, int ofs)

if (reg == 15) {
tcg_gen_movi_i32(tmp, (read_pc(s) & ~3) + ofs);
#ifdef HAS_TRACEWRAP
TCGv pc_tmp = tcg_const_i32(read_pc(s));
gen_trace_load_reg(reg, pc_tmp);
tcg_temp_free_i32(pc_tmp);
#endif //HAS_TRACEWRAP
} else {
tcg_gen_addi_i32(tmp, cpu_R[reg], ofs);
}
#ifdef HAS_TRACEWRAP
gen_trace_load_reg(reg, tmp);
gen_trace_load_reg(reg, cpu_R[reg]);
#endif //HAS_TRACEWRAP
}
return tmp;
}

Expand Down

0 comments on commit ba70ab7

Please sign in to comment.