]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
cpu: Move ENV_OFFSET to exec/gen-icount.h
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 23 Mar 2019 00:00:56 +0000 (17:00 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 10 Jun 2019 14:03:42 +0000 (07:03 -0700)
Now that we have ArchCPU, we can define this generically,
in the one place that needs it.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 files changed:
include/exec/gen-icount.h
target/alpha/cpu.h
target/arm/cpu.h
target/cris/cpu.h
target/hppa/cpu.h
target/i386/cpu.h
target/lm32/cpu.h
target/m68k/cpu.h
target/microblaze/cpu.h
target/mips/cpu.h
target/moxie/cpu.h
target/nios2/cpu.h
target/openrisc/cpu.h
target/ppc/cpu.h
target/riscv/cpu.h
target/s390x/cpu.h
target/sh4/cpu.h
target/sparc/cpu.h
target/tilegx/cpu.h
target/tricore/cpu.h
target/unicore32/cpu.h
target/xtensa/cpu.h

index 24f7991781361bfa04c2defedf0d402a463995e8..9cfa6ccce56a88745af24076a825117e39ba1c13 100644 (file)
@@ -5,6 +5,8 @@
 
 /* Helpers for instruction counting code generation.  */
 
+#define ENV_OFFSET   offsetof(ArchCPU, env)
+
 static TCGOp *icount_start_insn;
 
 static inline void gen_tb_start(TranslationBlock *tb)
index 86d3e953b95604f4469e0c4815461aa6e522c048..361f85c9762462fdaa7fb6de59cb19df0e72e841 100644 (file)
@@ -278,7 +278,6 @@ struct AlphaCPU {
     QEMUTimer *alarm_timer;
 };
 
-#define ENV_OFFSET offsetof(AlphaCPU, env)
 
 #ifndef CONFIG_USER_ONLY
 extern const struct VMStateDescription vmstate_alpha_cpu;
index c7df3816b5625fb8f33c72af4284c4e0d39d8c99..abe6fce7ab9feeeb3b39be6dd15fdaa0933277d1 100644 (file)
@@ -917,8 +917,6 @@ void arm_cpu_post_init(Object *obj);
 
 uint64_t arm_cpu_mp_affinity(int idx, uint8_t clustersz);
 
-#define ENV_OFFSET offsetof(ARMCPU, env)
-
 #ifndef CONFIG_USER_ONLY
 extern const struct VMStateDescription vmstate_arm_cpu;
 #endif
index e9e4e39a40eb27c865e6e7146bdd00ff3c308d71..83c350377ac350ce747577605697615f4fa9aae7 100644 (file)
@@ -183,7 +183,6 @@ struct CRISCPU {
     CPUCRISState env;
 };
 
-#define ENV_OFFSET offsetof(CRISCPU, env)
 
 #ifndef CONFIG_USER_ONLY
 extern const struct VMStateDescription vmstate_cris_cpu;
index 75e6a91a5e4feebadc2b90d2cd3ae4c722a18235..7f9f54731b39db89ac44b23d53cb095d87e0b289 100644 (file)
@@ -222,7 +222,6 @@ struct HPPACPU {
     QEMUTimer *alarm_timer;
 };
 
-#define ENV_OFFSET      offsetof(HPPACPU, env)
 
 typedef CPUHPPAState CPUArchState;
 typedef HPPACPU ArchCPU;
index 709d88cfcfbab927da5c7d9013715ca13d0db1ba..3a155c12d3a50a3dfb3d1cdfde4bd05cd92c32c9 100644 (file)
@@ -1480,7 +1480,6 @@ struct X86CPU {
     int32_t hv_max_vps;
 };
 
-#define ENV_OFFSET offsetof(X86CPU, env)
 
 #ifndef CONFIG_USER_ONLY
 extern struct VMStateDescription vmstate_x86_cpu;
index 7fb65fb4b6bf2ae29cdf39a2cdf8592f80f461fc..2c934472d6ad41adb382fc1929762919767aadac 100644 (file)
@@ -195,7 +195,6 @@ struct LM32CPU {
     uint32_t features;
 };
 
-#define ENV_OFFSET offsetof(LM32CPU, env)
 
 #ifndef CONFIG_USER_ONLY
 extern const struct VMStateDescription vmstate_lm32_cpu;
index 7f3fa8d141efca1eb19609e8008ad9341dae43b3..4006663494513f288ba7863e2783149c20e468c8 100644 (file)
@@ -163,7 +163,6 @@ struct M68kCPU {
     CPUM68KState env;
 };
 
-#define ENV_OFFSET offsetof(M68kCPU, env)
 
 void m68k_cpu_do_interrupt(CPUState *cpu);
 bool m68k_cpu_exec_interrupt(CPUState *cpu, int int_req);
index 8402cc81f6a684aed985ba506bb09b112a541ce2..a17c12ca2f3f1fcd9a55558cb277e776962ced5b 100644 (file)
@@ -310,7 +310,6 @@ struct MicroBlazeCPU {
     CPUMBState env;
 };
 
-#define ENV_OFFSET offsetof(MicroBlazeCPU, env)
 
 void mb_cpu_do_interrupt(CPUState *cs);
 bool mb_cpu_exec_interrupt(CPUState *cs, int int_req);
index cb0942547676c1f35fc0dae3ddf7723335e9941f..24fe25f61c5df16e021b1e6c607765a5dd785f8b 100644 (file)
@@ -1071,7 +1071,6 @@ struct MIPSCPU {
     CPUMIPSState env;
 };
 
-#define ENV_OFFSET offsetof(MIPSCPU, env)
 
 void mips_cpu_list(void);
 
index b9f5635e50df9c79baaed68d2b1eac1a7e5dddc1..3d418c8f1dc1e8d85ca91f478f33e2366c4d7869 100644 (file)
@@ -90,7 +90,6 @@ typedef struct MoxieCPU {
     CPUMoxieState env;
 } MoxieCPU;
 
-#define ENV_OFFSET offsetof(MoxieCPU, env)
 
 void moxie_cpu_do_interrupt(CPUState *cs);
 void moxie_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
index 9490ba83e4f2a46c2bda968e83ddf578f8740834..c96d797ddac1baaa2ce7a37fb0e6f36d6f3bc720 100644 (file)
@@ -194,7 +194,6 @@ typedef struct Nios2CPU {
     uint32_t fast_tlb_miss_addr;
 } Nios2CPU;
 
-#define ENV_OFFSET offsetof(Nios2CPU, env)
 
 void nios2_tcg_init(void);
 void nios2_cpu_do_interrupt(CPUState *cs);
index 9e46ac526617449344000293775cb8ffbb4955a1..39e2765aa28cb7b1d33153bca02cb23f0ed0fb24 100644 (file)
@@ -317,7 +317,6 @@ typedef struct OpenRISCCPU {
 
 } OpenRISCCPU;
 
-#define ENV_OFFSET offsetof(OpenRISCCPU, env)
 
 void cpu_openrisc_list(void);
 void openrisc_cpu_do_interrupt(CPUState *cpu);
index 73ef868a7bedc56177235f949ff5249070dba0ea..73b92c189c2eccd6366afb4c6e8716aec8cf0329 100644 (file)
@@ -1203,7 +1203,6 @@ struct PowerPCCPU {
     int32_t mig_slb_nr;
 };
 
-#define ENV_OFFSET offsetof(PowerPCCPU, env)
 
 PowerPCCPUClass *ppc_cpu_class_by_pvr(uint32_t pvr);
 PowerPCCPUClass *ppc_cpu_class_by_pvr_mask(uint32_t pvr);
index 29a1e08f03e7cf8b84405fce02b099bd0e0ad748..d9611eaceda39716476cc14547de5c401e068189 100644 (file)
@@ -239,8 +239,6 @@ extern const char * const riscv_fpr_regnames[];
 extern const char * const riscv_excp_names[];
 extern const char * const riscv_intr_names[];
 
-#define ENV_OFFSET offsetof(RISCVCPU, env)
-
 void riscv_cpu_do_interrupt(CPUState *cpu);
 int riscv_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
 int riscv_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
index d18b279d87d22d0d9bf8d52a6aea02ac42e095dd..dbf13c922184c15519698f08dc92889225fbf4ed 100644 (file)
@@ -163,7 +163,6 @@ struct S390CPU {
     uint32_t irqstate_saved_size;
 };
 
-#define ENV_OFFSET offsetof(S390CPU, env)
 
 #ifndef CONFIG_USER_ONLY
 extern const struct VMStateDescription vmstate_s390_cpu;
index 089eea261c63f1c085420e6c29aa120553ebff9b..610a8db6de93775639fd2a599e8eb7e52ee1dde9 100644 (file)
@@ -207,7 +207,6 @@ struct SuperHCPU {
     CPUSH4State env;
 };
 
-#define ENV_OFFSET offsetof(SuperHCPU, env)
 
 void superh_cpu_do_interrupt(CPUState *cpu);
 bool superh_cpu_exec_interrupt(CPUState *cpu, int int_req);
index adcd9e3000acf2f58b5498fd53c00194a60e1ea7..0cc36873cec23ef180ce696b0163690f540346fe 100644 (file)
@@ -532,7 +532,6 @@ struct SPARCCPU {
     CPUSPARCState env;
 };
 
-#define ENV_OFFSET offsetof(SPARCCPU, env)
 
 #ifndef CONFIG_USER_ONLY
 extern const struct VMStateDescription vmstate_sparc_cpu;
index 7f8fe7c51387c651fe1267c199da4c67ddbc676e..643b7dbd17f67b590f93a3653d68d96875e30e94 100644 (file)
@@ -138,7 +138,6 @@ typedef struct TileGXCPU {
     CPUTLGState env;
 } TileGXCPU;
 
-#define ENV_OFFSET offsetof(TileGXCPU, env)
 
 /* TILE-Gx memory attributes */
 #define MMU_USER_IDX    0  /* Current memory operation is in user mode */
index 6a40d373622e4392891c7ec4283bd98209b20f87..9f45bb5c24d92490a5d509a1c21d2fea62bd8be7 100644 (file)
@@ -208,7 +208,6 @@ struct TriCoreCPU {
     CPUTriCoreState env;
 };
 
-#define ENV_OFFSET offsetof(TriCoreCPU, env)
 
 hwaddr tricore_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
 void tricore_cpu_dump_state(CPUState *cpu, FILE *f, int flags);
index 595dc43c9970e5fadd36dcfef4a9b6906e094b53..c1130e9548c11a7ce0029d38a6dc1f6d71c44204 100644 (file)
@@ -76,7 +76,6 @@ struct UniCore32CPU {
     CPUUniCore32State env;
 };
 
-#define ENV_OFFSET offsetof(UniCore32CPU, env)
 
 void uc32_cpu_do_interrupt(CPUState *cpu);
 bool uc32_cpu_exec_interrupt(CPUState *cpu, int int_req);
index 97b7bae0fe252a816b6a8e841465b20e89299fba..e89605747acfa225b21a59d845c9c5222f17ee35 100644 (file)
@@ -559,8 +559,6 @@ struct XtensaCPU {
     CPUXtensaState env;
 };
 
-#define ENV_OFFSET offsetof(XtensaCPU, env)
-
 
 bool xtensa_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
                          MMUAccessType access_type, int mmu_idx,