aboutsummaryrefslogtreecommitdiff
path: root/include/exec/gen-icount.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2020-10-29 09:49:05 -0700
committerRichard Henderson <richard.henderson@linaro.org>2021-01-07 05:09:41 -1000
commitd997143533e010b37363b10eddaf18ccb0e5659f (patch)
treeab81d43635bc78c894f5de4038da3993c2e1801e /include/exec/gen-icount.h
parent1acbad0f278ad585bbfc46081b5b639447585be0 (diff)
downloadqemu-d997143533e010b37363b10eddaf18ccb0e5659f.zip
qemu-d997143533e010b37363b10eddaf18ccb0e5659f.tar.gz
qemu-d997143533e010b37363b10eddaf18ccb0e5659f.tar.bz2
tcg: Make DisasContextBase.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 'include/exec/gen-icount.h')
-rw-r--r--include/exec/gen-icount.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h
index 822c43c..aa4b443 100644
--- a/include/exec/gen-icount.h
+++ b/include/exec/gen-icount.h
@@ -32,7 +32,7 @@ static inline void gen_io_end(void)
tcg_temp_free_i32(tmp);
}
-static inline void gen_tb_start(TranslationBlock *tb)
+static inline void gen_tb_start(const TranslationBlock *tb)
{
TCGv_i32 count, imm;
@@ -71,7 +71,7 @@ static inline void gen_tb_start(TranslationBlock *tb)
tcg_temp_free_i32(count);
}
-static inline void gen_tb_end(TranslationBlock *tb, int num_insns)
+static inline void gen_tb_end(const TranslationBlock *tb, int num_insns)
{
if (tb_cflags(tb) & CF_USE_ICOUNT) {
/* Update the num_insn immediate parameter now that we know