[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v3 4/6] target/arm/translate: ensure gen_goto_tb sets
From: |
Alex Bennée |
Subject: |
[Qemu-arm] [PATCH v3 4/6] target/arm/translate: ensure gen_goto_tb sets exit flags |
Date: |
Tue, 11 Jul 2017 18:59:35 +0100 |
As the gen_goto_tb function can do both static and dynamic jumps it
should also set the is_jmp field. This matches the behaviour of the
a64 code.
Signed-off-by: Alex Bennée <address@hidden>
---
target/arm/translate.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/target/arm/translate.c b/target/arm/translate.c
index 5f2cea8641..82341ee709 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -4158,15 +4158,20 @@ static void gen_goto_ptr(void)
tcg_temp_free(addr);
}
+/* This will end the TB but doesn't guarantee we'll return to
+ * cpu_loop_exec. Any live exit_requests will be processed as we
+ * enter the next TB. */
static void gen_goto_tb(DisasContext *s, int n, target_ulong dest)
{
if (use_goto_tb(s, dest)) {
tcg_gen_goto_tb(n);
gen_set_pc_im(s, dest);
tcg_gen_exit_tb((uintptr_t)s->tb + n);
+ s->is_jmp = DISAS_TB_JUMP;
} else {
gen_set_pc_im(s, dest);
gen_goto_ptr();
+ s->is_jmp = DISAS_JUMP;
}
}
@@ -4179,7 +4184,6 @@ static inline void gen_jmp (DisasContext *s, uint32_t
dest)
gen_bx_im(s, dest);
} else {
gen_goto_tb(s, 0, dest);
- s->is_jmp = DISAS_TB_JUMP;
}
}
--
2.13.0
- [Qemu-arm] [PATCH v3 4/6] target/arm/translate: ensure gen_goto_tb sets exit flags,
Alex Bennée <=