[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/52] target-m68k: make cpu-qom.h not target specifi
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 11/52] target-m68k: make cpu-qom.h not target specific |
Date: |
Thu, 19 May 2016 13:18:05 +0200 |
Make M68KCPU an opaque type within cpu-qom.h, and move all definitions of
private methods, as well as all type definitions that require knowledge
of the layout to cpu.h. This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
target-m68k/cpu-qom.h | 34 +---------------------------------
target-m68k/cpu.h | 36 ++++++++++++++++++++++++++++++++++--
2 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/target-m68k/cpu-qom.h b/target-m68k/cpu-qom.h
index c28e55d..9885bba 100644
--- a/target-m68k/cpu-qom.h
+++ b/target-m68k/cpu-qom.h
@@ -47,38 +47,6 @@ typedef struct M68kCPUClass {
void (*parent_reset)(CPUState *cpu);
} M68kCPUClass;
-/**
- * M68kCPU:
- * @env: #CPUM68KState
- *
- * A Motorola 68k CPU.
- */
-typedef struct M68kCPU {
- /*< private >*/
- CPUState parent_obj;
- /*< public >*/
-
- CPUM68KState env;
-} M68kCPU;
-
-static inline M68kCPU *m68k_env_get_cpu(CPUM68KState *env)
-{
- return container_of(env, M68kCPU, env);
-}
-
-#define ENV_GET_CPU(e) CPU(m68k_env_get_cpu(e))
-
-#define ENV_OFFSET offsetof(M68kCPU, env)
-
-void m68k_cpu_do_interrupt(CPUState *cpu);
-bool m68k_cpu_exec_interrupt(CPUState *cpu, int int_req);
-void m68k_cpu_dump_state(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf,
- int flags);
-hwaddr m68k_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
-int m68k_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
-int m68k_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
-
-void m68k_cpu_exec_enter(CPUState *cs);
-void m68k_cpu_exec_exit(CPUState *cs);
+typedef struct M68kCPU M68kCPU;
#endif
diff --git a/target-m68k/cpu.h b/target-m68k/cpu.h
index d2f467c..86a1ff0 100644
--- a/target-m68k/cpu.h
+++ b/target-m68k/cpu.h
@@ -26,7 +26,7 @@
#include "qemu-common.h"
#include "exec/cpu-defs.h"
-
+#include "cpu-qom.h"
#include "fpu/softfloat.h"
#define MAX_QREGS 32
@@ -109,7 +109,39 @@ typedef struct CPUM68KState {
uint32_t features;
} CPUM68KState;
-#include "cpu-qom.h"
+/**
+ * M68kCPU:
+ * @env: #CPUM68KState
+ *
+ * A Motorola 68k CPU.
+ */
+struct M68kCPU {
+ /*< private >*/
+ CPUState parent_obj;
+ /*< public >*/
+
+ CPUM68KState env;
+};
+
+static inline M68kCPU *m68k_env_get_cpu(CPUM68KState *env)
+{
+ return container_of(env, M68kCPU, env);
+}
+
+#define ENV_GET_CPU(e) CPU(m68k_env_get_cpu(e))
+
+#define ENV_OFFSET offsetof(M68kCPU, env)
+
+void m68k_cpu_do_interrupt(CPUState *cpu);
+bool m68k_cpu_exec_interrupt(CPUState *cpu, int int_req);
+void m68k_cpu_dump_state(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf,
+ int flags);
+hwaddr m68k_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
+int m68k_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
+int m68k_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
+
+void m68k_cpu_exec_enter(CPUState *cs);
+void m68k_cpu_exec_exit(CPUState *cs);
void m68k_tcg_init(void);
void m68k_cpu_init_gdb(M68kCPU *cpu);
--
1.8.3.1
- [Qemu-devel] [PULL 14/52] target-ppc: do not use target_ulong in cpu-qom.h, (continued)
- [Qemu-devel] [PULL 14/52] target-ppc: do not use target_ulong in cpu-qom.h, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 18/52] target-sh4: make cpu-qom.h not target specific, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 10/52] target-lm32: make cpu-qom.h not target specific, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 12/52] target-microblaze: make cpu-qom.h not target specific, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 15/52] target-ppc: do not make PowerPCCPUClass depend on target-specific symbols, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 17/52] target-s390x: make cpu-qom.h not target specific, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 25/52] sh4: include cpu-qom.h in files that require SuperHCPU, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 24/52] m68k: include cpu-qom.h in files that require M68KCPU, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 23/52] arm: include cpu-qom.h in files that require ARMCPU, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 16/52] target-ppc: make cpu-qom.h not target specific, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 11/52] target-m68k: make cpu-qom.h not target specific,
Paolo Bonzini <=
- [Qemu-devel] [PULL 26/52] alpha: include cpu-qom.h in files that require AlphaCPU, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 34/52] include: poison symbols in osdep.h, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 32/52] explicitly include linux/kvm.h, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 35/52] hw: do not use VMSTATE_*TL, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 28/52] ppc: use PowerPCCPU instead of CPUPPCState, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 22/52] target-xtensa: make cpu-qom.h not target specific, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 21/52] target-unicore32: make cpu-qom.h not target specific, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 19/52] target-sparc: make cpu-qom.h not target specific, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 37/52] hw: cannot include hw/hw.h from user emulation, Paolo Bonzini, 2016/05/19
- [Qemu-devel] [PULL 20/52] target-tricore: make cpu-qom.h not target specific, Paolo Bonzini, 2016/05/19