summaryrefslogtreecommitdiffstats
path: root/include/tcg/tcg.h
diff options
context:
space:
mode:
authorRichard Henderson2020-03-29 19:40:49 +0200
committerRichard Henderson2021-01-13 19:39:08 +0100
commite01fa97dea857a35be5bb8cce0d632a62e72c689 (patch)
tree358624811c65272b97e7017dfaecb7c313c0b9ac /include/tcg/tcg.h
parenttcg: Consolidate 3 bits into enum TCGTempKind (diff)
downloadqemu-e01fa97dea857a35be5bb8cce0d632a62e72c689.tar.gz
qemu-e01fa97dea857a35be5bb8cce0d632a62e72c689.tar.xz
qemu-e01fa97dea857a35be5bb8cce0d632a62e72c689.zip
tcg: Add temp_readonly
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 <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/tcg/tcg.h')
-rw-r--r--include/tcg/tcg.h5
1 files changed, 5 insertions, 0 deletions
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;