summaryrefslogtreecommitdiffstats
path: root/target/i386
diff options
context:
space:
mode:
authorRichard Henderson2020-10-29 20:30:01 +0100
committerRichard Henderson2021-01-07 16:09:41 +0100
commit04a37d4ca4bfef595b2e9bec99eac8bfc806c76b (patch)
treebbfa000533efff43d45ad1946b97a0d647b016cc /target/i386
parenttcg: Make DisasContextBase.tb const (diff)
downloadqemu-04a37d4ca4bfef595b2e9bec99eac8bfc806c76b.tar.gz
qemu-04a37d4ca4bfef595b2e9bec99eac8bfc806c76b.tar.xz
qemu-04a37d4ca4bfef595b2e9bec99eac8bfc806c76b.zip
tcg: Make tb arg to synchronize_from_tb const
There is nothing within the translators that ought to be changing the TranslationBlock data, so make it const. This does not actually use the read-only copy of the data structure that exists within the rx region. Reviewed-by: Joelle van Dyne <j@getutm.app> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/i386')
-rw-r--r--target/i386/tcg/tcg-cpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c
index 628dd29fe7..4fa013720e 100644
--- a/target/i386/tcg/tcg-cpu.c
+++ b/target/i386/tcg/tcg-cpu.c
@@ -49,7 +49,8 @@ static void x86_cpu_exec_exit(CPUState *cs)
env->eflags = cpu_compute_eflags(env);
}
-static void x86_cpu_synchronize_from_tb(CPUState *cs, TranslationBlock *tb)
+static void x86_cpu_synchronize_from_tb(CPUState *cs,
+ const TranslationBlock *tb)
{
X86CPU *cpu = X86_CPU(cs);