[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 28/33] target: Use forward declared type instead of structure
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PULL 28/33] target: Use forward declared type instead of structure type |
Date: |
Sun, 6 Mar 2022 22:25:27 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 |
On 6/3/22 13:59, Philippe Mathieu-Daudé wrote:
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
The CPU / CPU state are forward declared.
$ git grep -E 'struct [A-Za-z]+CPU\ \*'
target/arm/hvf_arm.h:16:void hvf_arm_set_cpu_features_from_host(struct
ARMCPU *cpu);
target/openrisc/cpu.h:234: int (*cpu_openrisc_map_address_code)(struct
OpenRISCCPU *cpu,
target/openrisc/cpu.h:238: int (*cpu_openrisc_map_address_data)(struct
OpenRISCCPU *cpu,
$ git grep -E 'struct CPU[A-Za-z]+State\ \*'
Updating this regexp to catch CPUX86State:
$ git grep -E 'struct CPU[A-Za-z0-9]+State\ \*'
target/i386/hvf/x86_emu.c:174:static bool is_host_reg(struct
CPUX86State *env, target_ulong ptr)
target/i386/hvf/x86_emu.c:179:void write_val_ext(struct CPUX86State
*env, target_ulong ptr, target_ulong val, int size)
target/i386/hvf/x86_emu.c:188:uint8_t *read_mmio(struct CPUX86State
*env, target_ulong ptr, int bytes)
...
target/mips/internal.h:137: int (*map_address)(struct CPUMIPSState *env,
hwaddr *physical, int *prot,
target/mips/internal.h:139: void (*helper_tlbwi)(struct CPUMIPSState
*env);
target/mips/internal.h:140: void (*helper_tlbwr)(struct CPUMIPSState
*env);
target/mips/internal.h:141: void (*helper_tlbp)(struct CPUMIPSState *env);
target/mips/internal.h:142: void (*helper_tlbr)(struct CPUMIPSState *env);
target/mips/internal.h:143: void (*helper_tlbinv)(struct CPUMIPSState
*env);
target/mips/internal.h:144: void (*helper_tlbinvf)(struct CPUMIPSState
*env);
target/xtensa/cpu.h:347: struct CPUXtensaState *env;
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214183144.27402-12-f4bug@amsat.org>
---
target/arm/hvf_arm.h | 2 +-
target/mips/internal.h | 14 +++++++-------
target/openrisc/cpu.h | 4 ++--
target/xtensa/cpu.h | 2 +-
target/i386/nvmm/nvmm-all.c | 14 +++++++-------
target/i386/whpx/whpx-all.c | 18 +++++++++---------
6 files changed, 27 insertions(+), 27 deletions(-)
Diffstat with new regexp:
target/arm/hvf_arm.h | 2 +-
target/i386/hvf/x86_emu.c | 110
+++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------
target/i386/hvf/x86_emu.h | 22 +++++++++++-----------
target/i386/nvmm/nvmm-all.c | 14 +++++++-------
target/i386/whpx/whpx-all.c | 18 +++++++++---------
target/mips/internal.h | 14 +++++++-------
target/openrisc/cpu.h | 4 ++--
target/xtensa/cpu.h | 2 +-
8 files changed, 93 insertions(+), 93 deletions(-)
- [PULL 19/33] softmmu: Add qemu_init_arch_modules(), (continued)
- [PULL 19/33] softmmu: Add qemu_init_arch_modules(), Philippe Mathieu-Daudé, 2022/03/06
- [PULL 20/33] softmmu: Build target-agnostic objects once, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 21/33] meson: Display libfdt as disabled when system emulation is disabled, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 22/33] exec/cpu_ldst: Include 'cpu.h' to get target_ulong definition, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 23/33] cpu: Add missing 'exec/exec-all.h' and 'qemu/accel.h' headers, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 25/33] Hexagon (target/hexagon) convert to OBJECT_DECLARE_TYPE, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 24/33] target/i386/tcg/sysemu: Include missing 'exec/exec-all.h' header, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 26/33] target: Include missing 'cpu.h', Philippe Mathieu-Daudé, 2022/03/06
- [PULL 27/33] target/hexagon: Add missing 'hw/core/cpu.h' include, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 28/33] target: Use forward declared type instead of structure type, Philippe Mathieu-Daudé, 2022/03/06
- Re: [PULL 28/33] target: Use forward declared type instead of structure type,
Philippe Mathieu-Daudé <=
- [PULL 29/33] target: Use CPUArchState as interface to target-specific CPU state, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 30/33] target: Introduce and use OBJECT_DECLARE_CPU_TYPE() macro, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 31/33] target: Use ArchCPU as interface to target CPU, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 32/33] target/i386: Remove pointless CPUArchState casts, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 33/33] accel/tcg: Remove pointless CPUArchState casts, Philippe Mathieu-Daudé, 2022/03/06
- Re: [PULL 00/33] Abstract ArchCPU, Peter Maydell, 2022/03/06