From e01fa97dea857a35be5bb8cce0d632a62e72c689 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 29 Mar 2020 10:40:49 -0700 Subject: tcg: Add temp_readonly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In most, but not all, places that we check for TEMP_FIXED, we are really testing that we do not modify the temporary. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/tcg') diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 571d4e0fa3..2bdaeaa69c 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -679,6 +679,11 @@ struct TCGContext { target_ulong gen_insn_data[TCG_MAX_INSNS][TARGET_INSN_START_WORDS]; }; +static inline bool temp_readonly(TCGTemp *ts) +{ + return ts->kind == TEMP_FIXED; +} + extern TCGContext tcg_init_ctx; extern __thread TCGContext *tcg_ctx; extern const void *tcg_code_gen_epilogue; -- cgit v1.2.3