Should use tcg_ctx->pc_start as pc
This commit is contained in:
@@ -454,17 +454,15 @@ static void gen_sub_carry(TCGContext *tcg_ctx, TCGv_i32 dest, TCGv_i32 t0, TCGv_
|
|||||||
|
|
||||||
static inline void mb_tcg_opcode_cmp_hook(TCGContext *tcg_ctx, TCGv_i64 v0, TCGv_i64 v1, uint32_t size)
|
static inline void mb_tcg_opcode_cmp_hook(TCGContext *tcg_ctx, TCGv_i64 v0, TCGv_i64 v1, uint32_t size)
|
||||||
{
|
{
|
||||||
CPUARMState *cpuarm = (CPUARMState *)(tcg_ctx->cpu->env_ptr);
|
|
||||||
uint64_t pc = cpuarm->regs[15] + (cpuarm->thumb ? 1 : 0);
|
|
||||||
uc_engine *uc = tcg_ctx->uc;
|
uc_engine *uc = tcg_ctx->uc;
|
||||||
if (HOOK_EXISTS_BOUNDED(uc, UC_HOOK_TCG_OPCODE, pc)) {
|
if (HOOK_EXISTS_BOUNDED(uc, UC_HOOK_TCG_OPCODE, tcg_ctx->pc_start)) {
|
||||||
struct hook *hook;
|
struct hook *hook;
|
||||||
HOOK_FOREACH_VAR_DECLARE;
|
HOOK_FOREACH_VAR_DECLARE;
|
||||||
HOOK_FOREACH(uc, hook, UC_HOOK_TCG_OPCODE) {
|
HOOK_FOREACH(uc, hook, UC_HOOK_TCG_OPCODE) {
|
||||||
if (hook->to_delete)
|
if (hook->to_delete)
|
||||||
continue;
|
continue;
|
||||||
if (hook->op == UC_TCG_OP_SUB && (hook->op_flags & UC_TCG_OP_FLAG_CMP)) {
|
if (hook->op == UC_TCG_OP_SUB && (hook->op_flags & UC_TCG_OP_FLAG_CMP)) {
|
||||||
gen_uc_traceopcode(tcg_ctx, hook, v0, v1, size, uc, pc);
|
gen_uc_traceopcode(tcg_ctx, hook, v0, v1, size, uc, tcg_ctx->pc_start);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user