1 #ifndef QEMU_MIPS_CPU_QOM_H 2 #define QEMU_MIPS_CPU_QOM_H 3 4 #include "qemu/osdep.h" 5 #include "qom/cpu.h" 6 7 typedef struct MIPSCPU { 8 CPUState parent_obj; 9 10 CPUMIPSState env; 11 } MIPSCPU; 12 13 mips_env_get_cpu(CPUMIPSState * env)14static inline MIPSCPU *mips_env_get_cpu(CPUMIPSState *env) 15 { 16 return container_of(env, MIPSCPU, env); 17 } 18 19 #define ENV_GET_CPU(e) CPU(mips_env_get_cpu(e)) 20 #define ENV_OFFSET offsetof(MIPSCPU, env) 21 22 #endif // QEMU_MIPS_CPU_QOM_H 23