aboutsummaryrefslogtreecommitdiff
path: root/target/mips/translate.c
diff options
context:
space:
mode:
authorEmilio G. Cota <cota@braap.org>2018-04-11 11:44:28 -0400
committerRichard Henderson <richard.henderson@linaro.org>2018-05-09 10:12:21 -0700
commitcd314a7d0190a03122ca0606ecf71b4b873a22c6 (patch)
tree0b32ccbf1fe9cd23959437c95a4bf4a85e4ba3aa /target/mips/translate.c
parent6e61bc941025345ab01c48d116bef60bb8990406 (diff)
downloadqemu-cd314a7d0190a03122ca0606ecf71b4b873a22c6.zip
qemu-cd314a7d0190a03122ca0606ecf71b4b873a22c6.tar.gz
qemu-cd314a7d0190a03122ca0606ecf71b4b873a22c6.tar.bz2
target/mips: use lookup_and_goto_ptr on BS_STOP
The TB after BS_STOP is not fixed (e.g. helper_mtc0_hwrena changes hflags, which ends up changing the TB flags via cpu_get_tb_cpu_state). This requires a full lookup (i.e. with flags) via lookup_and_goto_ptr instead of gen_goto_tb, since the latter only looks at the PC for in-page goto's. Fix it. Reported-by: Richard Henderson <richard.henderson@linaro.org> Suggested-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/mips/translate.c')
-rw-r--r--target/mips/translate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/mips/translate.c b/target/mips/translate.c
index d8e717d..69137d0 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -20343,7 +20343,8 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb)
} else {
switch (ctx.bstate) {
case BS_STOP:
- gen_goto_tb(&ctx, 0, ctx.pc);
+ gen_save_pc(ctx.pc);
+ tcg_gen_lookup_and_goto_ptr();
break;
case BS_NONE:
save_cpu_state(&ctx, 0);