diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-10 18:09:56 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-05-06 11:21:05 +0200 |
| commit | b254c342cfa4058257ded993fdb17870dcfa81b5 (patch) | |
| tree | 665a6d499bcc22c745869e7f709b0b9820ba70c1 /include/exec/cpu-common.h | |
| parent | 0650fc1ea33de8db48375664ae1dd1dc7ed72662 (diff) | |
| download | focaccia-qemu-b254c342cfa4058257ded993fdb17870dcfa81b5.tar.gz focaccia-qemu-b254c342cfa4058257ded993fdb17870dcfa81b5.zip | |
accel/tcg: Access tcg_cflags with getter / setter
Access the CPUState::tcg_cflags via tcg_cflags_has() and tcg_cflags_set() helpers. Mechanical change using the following Coccinelle spatch script: @@ expression cpu; expression flags; @@ - cpu->tcg_cflags & flags + tcg_cflags_has(cpu, flags) @@ expression cpu; expression flags; @@ - (tcg_cflags_has(cpu, flags)) + tcg_cflags_has(cpu, flags) @@ expression cpu; expression flags; @@ - cpu->tcg_cflags |= flags; + tcg_cflags_set(cpu, flags); Then manually moving the declarations, and adding both tcg_cflags_has() and tcg_cflags_set() definitions. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240427155714.53669-15-philmd@linaro.org>
Diffstat (limited to 'include/exec/cpu-common.h')
| -rw-r--r-- | include/exec/cpu-common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 78f2c381b1..8bc397e251 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -178,6 +178,13 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, void list_cpus(void); #ifdef CONFIG_TCG + +bool tcg_cflags_has(CPUState *cpu, uint32_t flags); +void tcg_cflags_set(CPUState *cpu, uint32_t flags); + +/* current cflags for hashing/comparison */ +uint32_t curr_cflags(CPUState *cpu); + /** * cpu_unwind_state_data: * @cpu: the cpu context |