qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 10/13] target: Use CPUArchState as interface to target-specif


From: Richard Henderson
Subject: Re: [PATCH 10/13] target: Use CPUArchState as interface to target-specific CPU state
Date: Wed, 9 Feb 2022 09:40:17 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

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é <f4bug@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.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]