diff options
Diffstat (limited to 'target-unicore32')
| -rw-r--r-- | target-unicore32/cpu-qom.h | 30 | ||||
| -rw-r--r-- | target-unicore32/cpu.c | 1 | ||||
| -rw-r--r-- | target-unicore32/cpu.h | 32 | ||||
| -rw-r--r-- | target-unicore32/helper.c | 1 | ||||
| -rw-r--r-- | target-unicore32/op_helper.c | 1 | ||||
| -rw-r--r-- | target-unicore32/softmmu.c | 1 | ||||
| -rw-r--r-- | target-unicore32/translate.c | 1 |
7 files changed, 36 insertions, 31 deletions
diff --git a/target-unicore32/cpu-qom.h b/target-unicore32/cpu-qom.h index ea65b83318..bc68e78045 100644 --- a/target-unicore32/cpu-qom.h +++ b/target-unicore32/cpu-qom.h @@ -12,7 +12,6 @@ #define QEMU_UC32_CPU_QOM_H #include "qom/cpu.h" -#include "cpu.h" #define TYPE_UNICORE32_CPU "unicore32-cpu" @@ -37,33 +36,6 @@ typedef struct UniCore32CPUClass { DeviceRealize parent_realize; } UniCore32CPUClass; -/** - * UniCore32CPU: - * @env: #CPUUniCore32State - * - * A UniCore32 CPU. - */ -typedef struct UniCore32CPU { - /*< private >*/ - CPUState parent_obj; - /*< public >*/ - - CPUUniCore32State env; -} UniCore32CPU; - -static inline UniCore32CPU *uc32_env_get_cpu(CPUUniCore32State *env) -{ - return container_of(env, UniCore32CPU, env); -} - -#define ENV_GET_CPU(e) CPU(uc32_env_get_cpu(e)) - -#define ENV_OFFSET offsetof(UniCore32CPU, env) - -void uc32_cpu_do_interrupt(CPUState *cpu); -bool uc32_cpu_exec_interrupt(CPUState *cpu, int int_req); -void uc32_cpu_dump_state(CPUState *cpu, FILE *f, - fprintf_function cpu_fprintf, int flags); -hwaddr uc32_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); +typedef struct UniCore32CPU UniCore32CPU; #endif diff --git a/target-unicore32/cpu.c b/target-unicore32/cpu.c index 66f43acfff..3990433eb8 100644 --- a/target-unicore32/cpu.c +++ b/target-unicore32/cpu.c @@ -17,6 +17,7 @@ #include "cpu.h" #include "qemu-common.h" #include "migration/vmstate.h" +#include "exec/exec-all.h" static void uc32_cpu_set_pc(CPUState *cs, vaddr value) { diff --git a/target-unicore32/cpu.h b/target-unicore32/cpu.h index e64cb7ecdd..f3e877bbc0 100644 --- a/target-unicore32/cpu.h +++ b/target-unicore32/cpu.h @@ -20,6 +20,7 @@ #define CPUArchState struct CPUUniCore32State #include "qemu-common.h" +#include "cpu-qom.h" #include "exec/cpu-defs.h" #include "fpu/softfloat.h" @@ -71,6 +72,35 @@ typedef struct CPUUniCore32State { } CPUUniCore32State; +/** + * UniCore32CPU: + * @env: #CPUUniCore32State + * + * A UniCore32 CPU. + */ +struct UniCore32CPU { + /*< private >*/ + CPUState parent_obj; + /*< public >*/ + + CPUUniCore32State env; +}; + +static inline UniCore32CPU *uc32_env_get_cpu(CPUUniCore32State *env) +{ + return container_of(env, UniCore32CPU, env); +} + +#define ENV_GET_CPU(e) CPU(uc32_env_get_cpu(e)) + +#define ENV_OFFSET offsetof(UniCore32CPU, env) + +void uc32_cpu_do_interrupt(CPUState *cpu); +bool uc32_cpu_exec_interrupt(CPUState *cpu, int int_req); +void uc32_cpu_dump_state(CPUState *cpu, FILE *f, + fprintf_function cpu_fprintf, int flags); +hwaddr uc32_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr); + #define ASR_M (0x1f) #define ASR_MODE_USER (0x10) #define ASR_MODE_INTR (0x12) @@ -134,8 +164,6 @@ static inline int cpu_mmu_index(CPUUniCore32State *env, bool ifetch) } #include "exec/cpu-all.h" -#include "cpu-qom.h" -#include "exec/exec-all.h" int uc32_cpu_exec(CPUState *s); diff --git a/target-unicore32/helper.c b/target-unicore32/helper.c index 21f5f35744..d603bde237 100644 --- a/target-unicore32/helper.c +++ b/target-unicore32/helper.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/exec-all.h" #include "exec/gdbstub.h" #include "exec/helper-proto.h" #include "qemu/host-utils.h" diff --git a/target-unicore32/op_helper.c b/target-unicore32/op_helper.c index f5847307a3..a782d33843 100644 --- a/target-unicore32/op_helper.c +++ b/target-unicore32/op_helper.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/helper-proto.h" +#include "exec/exec-all.h" #include "exec/cpu_ldst.h" #define SIGNBIT (uint32_t)0x80000000 diff --git a/target-unicore32/softmmu.c b/target-unicore32/softmmu.c index d267fed875..a34026a524 100644 --- a/target-unicore32/softmmu.c +++ b/target-unicore32/softmmu.c @@ -14,6 +14,7 @@ #include "qemu/osdep.h" #include <cpu.h> +#include "exec/exec-all.h" #undef DEBUG_UC32 diff --git a/target-unicore32/translate.c b/target-unicore32/translate.c index 307f7b2059..b04d22c9fb 100644 --- a/target-unicore32/translate.c +++ b/target-unicore32/translate.c @@ -12,6 +12,7 @@ #include "cpu.h" #include "disas/disas.h" +#include "exec/exec-all.h" #include "tcg-op.h" #include "qemu/log.h" #include "exec/cpu_ldst.h" |