[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL 16/28] target/mips: use lookup_and_goto_ptr on BS_STO
From: |
Richard Henderson |
Subject: |
[qemu-s390x] [PULL 16/28] target/mips: use lookup_and_goto_ptr on BS_STOP |
Date: |
Wed, 9 May 2018 10:54:46 -0700 |
From: "Emilio G. Cota" <address@hidden>
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 <address@hidden>
Suggested-by: Richard Henderson <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target/mips/translate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/mips/translate.c b/target/mips/translate.c
index d8e717dacf..69137d0b3f 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);
--
2.17.0
- [qemu-s390x] [PULL 04/28] target/xtensa: avoid integer overflow in next_page PC check, (continued)
- [qemu-s390x] [PULL 04/28] target/xtensa: avoid integer overflow in next_page PC check, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 06/28] target/tilegx: avoid integer overflow in next_page PC check, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 05/28] target/unicore32: avoid integer overflow in next_page PC check, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 07/28] target/microblaze: avoid integer overflow in next_page PC check, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 09/28] target/s390x: avoid integer overflow in next_page PC check, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 08/28] target/arm: avoid integer overflow in next_page PC check, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 10/28] target/mips: avoid integer overflow in next_page PC check, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 11/28] translator: merge max_insns into DisasContextBase, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 12/28] target/sh4: convert to TranslatorOps, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 13/28] target/sparc: convert to DisasJumpType, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 16/28] target/mips: use lookup_and_goto_ptr on BS_STOP,
Richard Henderson <=
- [qemu-s390x] [PULL 14/28] target/sparc: convert to DisasContextBase, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 15/28] target/sparc: convert to TranslatorOps, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 19/28] target/mips: use *ctx for DisasContext, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 20/28] target/mips: convert to TranslatorOps, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 17/28] target/mips: convert to DisasJumpType, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 23/28] target/s390x: convert to TranslatorOps, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 22/28] target/s390x: convert to DisasContextBase, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 24/28] target/openrisc: convert to DisasContextBase, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 18/28] target/mips: convert to DisasContextBase, Richard Henderson, 2018/05/09
- [qemu-s390x] [PULL 26/28] target/riscv: convert to DisasJumpType, Richard Henderson, 2018/05/09