Skip to content

Commit ad33384

Browse files
committed
Unsigned extension
1 parent ca3912d commit ad33384

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

qemu/target/arm/translate.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -455,16 +455,21 @@ static void gen_sub_carry(TCGContext *tcg_ctx, TCGv_i32 dest, TCGv_i32 t0, TCGv_
455455
static inline void mb_tcg_opcode_cmp_hook(TCGContext *tcg_ctx, TCGv_i32 v0, TCGv_i32 v1, uint32_t size)
456456
{
457457
uc_engine *uc = tcg_ctx->uc;
458-
TCGv_i64 targ1 = temp_tcgv_i64(tcg_ctx, tcgv_i32_temp(tcg_ctx, v0));
459-
TCGv_i64 targ2 = temp_tcgv_i64(tcg_ctx, tcgv_i32_temp(tcg_ctx, v1));
458+
460459
if (HOOK_EXISTS_BOUNDED(uc, UC_HOOK_TCG_OPCODE, tcg_ctx->pc_start)) {
461460
struct hook *hook;
462461
HOOK_FOREACH_VAR_DECLARE;
463462
HOOK_FOREACH(uc, hook, UC_HOOK_TCG_OPCODE) {
464463
if (hook->to_delete)
465464
continue;
466465
if (hook->op == UC_TCG_OP_SUB && (hook->op_flags & UC_TCG_OP_FLAG_CMP)) {
466+
TCGv_i64 targ1 = tcg_temp_new_i64(tcg_ctx);
467+
TCGv_i64 targ2 = tcg_temp_new_i64(tcg_ctx);
468+
tcg_gen_extu_i32_i64(tcg_ctx, targ1, v0);
469+
tcg_gen_extu_i32_i64(tcg_ctx, targ2, v1);
467470
gen_uc_traceopcode(tcg_ctx, hook, targ1, targ2, size, uc, tcg_ctx->pc_start);
471+
tcg_temp_free_i64(tcg_ctx, targ1);
472+
tcg_temp_free_i64(tcg_ctx, targ2);
468473
}
469474
}
470475
}

0 commit comments

Comments
 (0)