mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -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_SUPERH_CPU_QOM_H
|
||||
|
||||
#include "hw/core/cpu.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
#define TYPE_SUPERH_CPU "superh-cpu"
|
||||
|
||||
|
@ -34,26 +33,4 @@ OBJECT_DECLARE_CPU_TYPE(SuperHCPU, SuperHCPUClass, SUPERH_CPU)
|
|||
#define SUPERH_CPU_TYPE_SUFFIX "-" TYPE_SUPERH_CPU
|
||||
#define SUPERH_CPU_TYPE_NAME(model) model SUPERH_CPU_TYPE_SUFFIX
|
||||
|
||||
/**
|
||||
* SuperHCPUClass:
|
||||
* @parent_realize: The parent class' realize handler.
|
||||
* @parent_phases: The parent class' reset phase handlers.
|
||||
* @pvr: Processor Version Register
|
||||
* @prr: Processor Revision Register
|
||||
* @cvr: Cache Version Register
|
||||
*
|
||||
* A SuperH CPU model.
|
||||
*/
|
||||
struct SuperHCPUClass {
|
||||
CPUClass parent_class;
|
||||
|
||||
DeviceRealize parent_realize;
|
||||
ResettablePhases parent_phases;
|
||||
|
||||
uint32_t pvr;
|
||||
uint32_t prr;
|
||||
uint32_t cvr;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -209,6 +209,26 @@ struct ArchCPU {
|
|||
CPUSH4State env;
|
||||
};
|
||||
|
||||
/**
|
||||
* SuperHCPUClass:
|
||||
* @parent_realize: The parent class' realize handler.
|
||||
* @parent_phases: The parent class' reset phase handlers.
|
||||
* @pvr: Processor Version Register
|
||||
* @prr: Processor Revision Register
|
||||
* @cvr: Cache Version Register
|
||||
*
|
||||
* A SuperH CPU model.
|
||||
*/
|
||||
struct SuperHCPUClass {
|
||||
CPUClass parent_class;
|
||||
|
||||
DeviceRealize parent_realize;
|
||||
ResettablePhases parent_phases;
|
||||
|
||||
uint32_t pvr;
|
||||
uint32_t prr;
|
||||
uint32_t cvr;
|
||||
};
|
||||
|
||||
void superh_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
|
||||
int superh_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue