From 3ca8774f1ab174c7aac364b5e9415a9621c69cc9 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Wed, 30 Sep 2015 14:42:08 +0800 Subject: [PATCH] arm: properly handle the case when first insn in block is until address --- qemu/target-arm/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qemu/target-arm/translate.c b/qemu/target-arm/translate.c index 585ca07c..83f8ec02 100644 --- a/qemu/target-arm/translate.c +++ b/qemu/target-arm/translate.c @@ -11234,7 +11234,7 @@ static inline void gen_intermediate_code_internal(ARMCPU *cpu, // imitate WFI instruction to halt emulation gen_tb_start(tcg_ctx); dc->is_jmp = DISAS_WFI; - goto done_generating; + goto tb_end; } // Unicorn: trace this block on request @@ -11417,6 +11417,8 @@ static inline void gen_intermediate_code_internal(ARMCPU *cpu, block_full = true; } +tb_end: + /* At this stage dc->condjmp will only be set when the skipped instruction was a conditional branch or trap, and the PC has already been written. */