diff options
author | Richard Henderson | 2020-10-29 17:49:05 +0100 |
---|---|---|
committer | Richard Henderson | 2021-01-07 16:09:41 +0100 |
commit | d997143533e010b37363b10eddaf18ccb0e5659f (patch) | |
tree | ab81d43635bc78c894f5de4038da3993c2e1801e /include/exec | |
parent | tcg: Adjust tb_target_set_jmp_target for split-wx (diff) | |
download | qemu-d997143533e010b37363b10eddaf18ccb0e5659f.tar.gz qemu-d997143533e010b37363b10eddaf18ccb0e5659f.tar.xz qemu-d997143533e010b37363b10eddaf18ccb0e5659f.zip |
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')
-rw-r--r-- | include/exec/gen-icount.h | 4 | ||||
-rw-r--r-- | include/exec/translator.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index 822c43cfd3..aa4b44354a 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 diff --git a/include/exec/translator.h b/include/exec/translator.h index 638e1529c5..24232ead41 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -67,7 +67,7 @@ typedef enum DisasJumpType { * Architecture-agnostic disassembly context. */ typedef struct DisasContextBase { - TranslationBlock *tb; + const TranslationBlock *tb; target_ulong pc_first; target_ulong pc_next; DisasJumpType is_jmp; |