On 8/2/22 23:40, Richard Henderson wrote:
On 2/9/22 02:22, Philippe Mathieu-Daudé wrote:
While CPUState is our interface with generic code, CPUArchState is
our interface with target-specific code. Use CPUArchState as an
abstract type, defined by each target.
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>
---
include/exec/poison.h | 2 --
include/hw/core/cpu.h | 2 +-
include/qemu/typedefs.h | 1 +
target/alpha/cpu.h | 6 ++----
target/arm/cpu.h | 2 +-
target/avr/cpu.h | 6 ++----
target/cris/cpu.h | 2 +-
target/hexagon/cpu.h | 5 ++---
target/hppa/cpu.h | 6 ++----
target/i386/cpu.h | 2 +-
target/m68k/cpu.h | 2 +-
target/microblaze/cpu.h | 4 ++--
target/mips/cpu.h | 5 ++---
target/nios2/cpu.h | 4 ++--
target/openrisc/cpu.h | 2 +-
target/ppc/cpu-qom.h | 2 +-
target/ppc/cpu.h | 3 +--
target/riscv/cpu.h | 4 ++--
target/rx/cpu-qom.h | 2 --
target/rx/cpu.h | 2 +-
target/s390x/cpu-qom.h | 2 +-
target/s390x/cpu.h | 2 +-
target/sh4/cpu.h | 2 +-
target/sparc/cpu.h | 4 ++--
target/tricore/cpu.h | 5 ++---
target/xtensa/cpu.h | 6 +++---
26 files changed, 36 insertions(+), 49 deletions(-)
Nice.
It's tempting to purge CPUFooState entirely, which would eliminate e.g.
patch 8, and put the onus on having cpu.h (and thus the actual
definition of CPUArchState) in scope to the C file that includes those
headers.
I tried but I doubt the result code will please maintainers. I went
back and inverted the typedef, to keep CPUFooState. Maybe a simple
aesthetic concern... I can post (on top of the respin) if you are
interested.
Thanks,
Phil.