mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target: Move ArchCPUClass definition to 'cpu.h'
The OBJECT_DECLARE_CPU_TYPE() macro forward-declares each ArchCPUClass type. These forward declarations are sufficient for code in hw/ to use the QOM definitions. No need to expose these structure definitions. Keep each local to their target/ by moving them to the corresponding "cpu.h" header. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231013140116.255-13-philmd@linaro.org>
This commit is contained in:
parent
c61b18a5d0
commit
9348028e7e
37 changed files with 287 additions and 335 deletions
|
@ -21,7 +21,6 @@
|
|||
#define QEMU_SPARC_CPU_QOM_H
|
||||
|
||||
#include "hw/core/cpu.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#ifdef TARGET_SPARC64
|
||||
#define TYPE_SPARC_CPU "sparc64-cpu"
|
||||
|
@ -34,21 +33,4 @@ OBJECT_DECLARE_CPU_TYPE(SPARCCPU, SPARCCPUClass, SPARC_CPU)
|
|||
#define SPARC_CPU_TYPE_SUFFIX "-" TYPE_SPARC_CPU
|
||||
#define SPARC_CPU_TYPE_NAME(model) model SPARC_CPU_TYPE_SUFFIX
|
||||
|
||||
typedef struct sparc_def_t sparc_def_t;
|
||||
/**
|
||||
* SPARCCPUClass:
|
||||
* @parent_realize: The parent class' realize handler.
|
||||
* @parent_phases: The parent class' reset phase handlers.
|
||||
*
|
||||
* A SPARC CPU model.
|
||||
*/
|
||||
struct SPARCCPUClass {
|
||||
CPUClass parent_class;
|
||||
|
||||
DeviceRealize parent_realize;
|
||||
ResettablePhases parent_phases;
|
||||
sparc_def_t *cpu_def;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -249,7 +249,7 @@ typedef struct trap_state {
|
|||
#endif
|
||||
#define TARGET_INSN_START_EXTRA_WORDS 1
|
||||
|
||||
struct sparc_def_t {
|
||||
typedef struct sparc_def_t {
|
||||
const char *name;
|
||||
target_ulong iu_version;
|
||||
uint32_t fpu_version;
|
||||
|
@ -263,7 +263,7 @@ struct sparc_def_t {
|
|||
uint32_t features;
|
||||
uint32_t nwindows;
|
||||
uint32_t maxtl;
|
||||
};
|
||||
} sparc_def_t;
|
||||
|
||||
#define FEATURE(X) CPU_FEATURE_BIT_##X,
|
||||
enum {
|
||||
|
@ -567,6 +567,20 @@ struct ArchCPU {
|
|||
CPUSPARCState env;
|
||||
};
|
||||
|
||||
/**
|
||||
* SPARCCPUClass:
|
||||
* @parent_realize: The parent class' realize handler.
|
||||
* @parent_phases: The parent class' reset phase handlers.
|
||||
*
|
||||
* A SPARC CPU model.
|
||||
*/
|
||||
struct SPARCCPUClass {
|
||||
CPUClass parent_class;
|
||||
|
||||
DeviceRealize parent_realize;
|
||||
ResettablePhases parent_phases;
|
||||
sparc_def_t *cpu_def;
|
||||
};
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
extern const VMStateDescription vmstate_sparc_cpu;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue