Skip to content

Commit

Permalink
cpu: Define ArchCPU
Browse files Browse the repository at this point in the history
For all targets, do this just before including exec/cpu-all.h.

Reviewed-by: Peter Maydell <[email protected]>
Acked-by: Alistair Francis <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
  • Loading branch information
rth7680 committed Jun 10, 2019
1 parent 4f7c64b commit 2161a61
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions target/alpha/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ void alpha_cpu_do_unaligned_access(CPUState *cpu, vaddr addr,
#define cpu_signal_handler cpu_alpha_signal_handler

typedef CPUAlphaState CPUArchState;
typedef AlphaCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/arm/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -3126,6 +3126,7 @@ static inline bool arm_cpu_data_is_big_endian(CPUARMState *env)
}

typedef CPUARMState CPUArchState;
typedef ARMCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/cris/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ bool cris_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
#define SFR_RW_MM_TLB_HI env->pregs[PR_SRS]][6

typedef CPUCRISState CPUArchState;
typedef CRISCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/hppa/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ static inline HPPACPU *hppa_env_get_cpu(CPUHPPAState *env)
#define ENV_OFFSET offsetof(HPPACPU, env)

typedef CPUHPPAState CPUArchState;
typedef HPPACPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/i386/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,7 @@ static inline target_long lshift(target_long x, int n)
void tcg_x86_init(void);

typedef CPUX86State CPUArchState;
typedef X86CPU ArchCPU;

#include "exec/cpu-all.h"
#include "svm.h"
Expand Down
1 change: 1 addition & 0 deletions target/lm32/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ bool lm32_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
bool probe, uintptr_t retaddr);

typedef CPULM32State CPUArchState;
typedef LM32CPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/m68k/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ void m68k_cpu_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr,
MemTxResult response, uintptr_t retaddr);

typedef CPUM68KState CPUArchState;
typedef M68kCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/microblaze/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ bool mb_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
bool probe, uintptr_t retaddr);

typedef CPUMBState CPUArchState;
typedef MicroBlazeCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/mips/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,7 @@ static inline int cpu_mmu_index(CPUMIPSState *env, bool ifetch)
}

typedef CPUMIPSState CPUArchState;
typedef MIPSCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/moxie/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ static inline int cpu_mmu_index(CPUMoxieState *env, bool ifetch)
}

typedef CPUMoxieState CPUArchState;
typedef MoxieCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/nios2/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ static inline int cpu_interrupts_enabled(CPUNios2State *env)
}

typedef CPUNios2State CPUArchState;
typedef Nios2CPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/openrisc/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ void cpu_openrisc_count_stop(OpenRISCCPU *cpu);
#define CPU_RESOLVING_TYPE TYPE_OPENRISC_CPU

typedef CPUOpenRISCState CPUArchState;
typedef OpenRISCCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/ppc/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,7 @@ void ppc_compat_add_property(Object *obj, const char *name,
#endif /* defined(TARGET_PPC64) */

typedef CPUPPCState CPUArchState;
typedef PowerPCCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/riscv/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ void riscv_set_csr_ops(int csrno, riscv_csr_operations *ops);
void riscv_cpu_register_gdb_regs_for_features(CPUState *cs);

typedef CPURISCVState CPUArchState;
typedef RISCVCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/s390x/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@ void s390_init_sigp(void);
S390CPU *s390_cpu_addr2state(uint16_t cpu_addr);

typedef CPUS390XState CPUArchState;
typedef S390CPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/sh4/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ static inline int cpu_mmu_index (CPUSH4State *env, bool ifetch)
}

typedef CPUSH4State CPUArchState;
typedef SuperHCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/sparc/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ static inline int cpu_pil_allowed(CPUSPARCState *env1, int pil)
}

typedef CPUSPARCState CPUArchState;
typedef SPARCCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/tilegx/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ static inline TileGXCPU *tilegx_env_get_cpu(CPUTLGState *env)
#define MMU_USER_IDX 0 /* Current memory operation is in user mode */

typedef CPUTLGState CPUArchState;
typedef TileGXCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/tricore/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ static inline int cpu_mmu_index(CPUTriCoreState *env, bool ifetch)
}

typedef CPUTriCoreState CPUArchState;
typedef TriCoreCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/unicore32/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ static inline int cpu_mmu_index(CPUUniCore32State *env, bool ifetch)
}

typedef CPUUniCore32State CPUArchState;
typedef UniCore32CPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down
1 change: 1 addition & 0 deletions target/xtensa/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@ static inline void cpu_get_tb_cpu_state(CPUXtensaState *env, target_ulong *pc,
}

typedef CPUXtensaState CPUArchState;
typedef XtensaCPU ArchCPU;

#include "exec/cpu-all.h"

Expand Down

0 comments on commit 2161a61

Please sign in to comment.