]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/mips: Replace `tb_pc()` with `tb->pc`
authorAnton Johansson <anjo@rev.ng>
Mon, 27 Feb 2023 13:51:54 +0000 (14:51 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 1 Mar 2023 17:33:17 +0000 (07:33 -1000)
Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230227135202.9710-20-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/mips/tcg/exception.c
target/mips/tcg/sysemu/special_helper.c

index 96e61170e6087336bf4496c5e8c6352e3b800cc9..da49a93912a35ba08a6882911e70b7db36480b8c 100644 (file)
@@ -82,7 +82,8 @@ void mips_cpu_synchronize_from_tb(CPUState *cs, const TranslationBlock *tb)
     MIPSCPU *cpu = MIPS_CPU(cs);
     CPUMIPSState *env = &cpu->env;
 
-    env->active_tc.PC = tb_pc(tb);
+    tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL));
+    env->active_tc.PC = tb->pc;
     env->hflags &= ~MIPS_HFLAG_BMASK;
     env->hflags |= tb->flags & MIPS_HFLAG_BMASK;
 }
index 3c5f35c759b4ce3761263efd4da7968f113c39c4..93276f789d7820802da2bf8ab85a0c7685eeadc2 100644 (file)
@@ -94,7 +94,7 @@ bool mips_io_recompile_replay_branch(CPUState *cs, const TranslationBlock *tb)
     CPUMIPSState *env = &cpu->env;
 
     if ((env->hflags & MIPS_HFLAG_BMASK) != 0
-        && env->active_tc.PC != tb_pc(tb)) {
+        && !(cs->tcg_cflags & CF_PCREL) && env->active_tc.PC != tb->pc) {
         env->active_tc.PC -= (env->hflags & MIPS_HFLAG_B16 ? 2 : 4);
         env->hflags &= ~MIPS_HFLAG_BMASK;
         return true;