diff options
Diffstat (limited to 'target/moxie/cpu.h')
| -rw-r--r-- | target/moxie/cpu.h | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/target/moxie/cpu.h b/target/moxie/cpu.h index a63a96bc05..2b596d5d45 100644 --- a/target/moxie/cpu.h +++ b/target/moxie/cpu.h @@ -21,10 +21,7 @@ #define MOXIE_CPU_H #include "qemu-common.h" - -#define TARGET_LONG_BITS 32 - -#define CPUArchState struct CPUMoxieState +#include "exec/cpu-defs.h" #define MOXIE_EX_DIV0 0 #define MOXIE_EX_BAD 1 @@ -33,15 +30,6 @@ #define MOXIE_EX_MMU_MISS 4 #define MOXIE_EX_BREAK 16 -#include "exec/cpu-defs.h" - -#define TARGET_PAGE_BITS 12 /* 4k */ - -#define TARGET_PHYS_ADDR_SPACE_BITS 32 -#define TARGET_VIRT_ADDR_SPACE_BITS 32 - -#define NB_MMU_MODES 1 - typedef struct CPUMoxieState { uint32_t flags; /* general execution flags */ @@ -57,9 +45,6 @@ typedef struct CPUMoxieState { /* Fields up to this point are cleared by a CPU reset */ struct {} end_reset_fields; - - CPU_COMMON - } CPUMoxieState; #include "qom/cpu.h" @@ -99,17 +84,10 @@ typedef struct MoxieCPU { CPUState parent_obj; /*< public >*/ + CPUNegativeOffsetState neg; CPUMoxieState env; } MoxieCPU; -static inline MoxieCPU *moxie_env_get_cpu(CPUMoxieState *env) -{ - return container_of(env, MoxieCPU, env); -} - -#define ENV_GET_CPU(e) CPU(moxie_env_get_cpu(e)) - -#define ENV_OFFSET offsetof(MoxieCPU, env) void moxie_cpu_do_interrupt(CPUState *cs); void moxie_cpu_dump_state(CPUState *cpu, FILE *f, int flags); @@ -129,6 +107,9 @@ static inline int cpu_mmu_index(CPUMoxieState *env, bool ifetch) return 0; } +typedef CPUMoxieState CPUArchState; +typedef MoxieCPU ArchCPU; + #include "exec/cpu-all.h" static inline void cpu_get_tb_cpu_state(CPUMoxieState *env, target_ulong *pc, |