accel/tcg: Access tcg_cflags with getter / setter
commitb254c342cfa4058257ded993fdb17870dcfa81b5
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 10 Jan 2024 17:09:56 +0000 (10 18:09 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 6 May 2024 09:21:05 +0000 (6 11:21 +0200)
tree665a6d499bcc22c745869e7f709b0b9820ba70c1
parent0650fc1ea33de8db48375664ae1dd1dc7ed72662
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>
23 files changed:
accel/tcg/cpu-exec.c
accel/tcg/internal-common.h
accel/tcg/tcg-accel-ops.c
include/exec/cpu-common.h
include/exec/exec-all.h
linux-user/mmap.c
linux-user/syscall.c
target/arm/cpu.c
target/avr/cpu.c
target/hexagon/cpu.c
target/hppa/cpu.c
target/i386/cpu.c
target/i386/helper.c
target/loongarch/cpu.c
target/microblaze/cpu.c
target/mips/tcg/exception.c
target/mips/tcg/sysemu/special_helper.c
target/openrisc/cpu.c
target/riscv/tcg/tcg-cpu.c
target/rx/cpu.c
target/sh4/cpu.c
target/sparc/cpu.c
target/tricore/cpu.c