aboutsummaryrefslogtreecommitdiff
path: root/target-m68k/cpu.h
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-18 14:03:58 +0100
committerAndreas Färber <afaerber@suse.de>2013-02-16 14:50:59 +0100
commitc7937d9f9a99d8cc2848e85f608d89c6f326daf0 (patch)
tree04d29e340e5d1cb27feae144639e07a255440090 /target-m68k/cpu.h
parentf3273ba643f2d0221492381b24bbc35fb6089a48 (diff)
target-m68k: Return M68kCPU from cpu_m68k_init()
Turn cpu_init() into a static inline function for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-m68k/cpu.h')
-rw-r--r--target-m68k/cpu.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/target-m68k/cpu.h b/target-m68k/cpu.h
index 94937c4fd7..ed9be802d4 100644
--- a/target-m68k/cpu.h
+++ b/target-m68k/cpu.h
@@ -117,7 +117,7 @@ typedef struct CPUM68KState {
void m68k_tcg_init(void);
void m68k_cpu_init_gdb(M68kCPU *cpu);
-CPUM68KState *cpu_m68k_init(const char *cpu_model);
+M68kCPU *cpu_m68k_init(const char *cpu_model);
int cpu_m68k_exec(CPUM68KState *s);
void do_interrupt(CPUM68KState *env1);
void do_interrupt_m68k_hardirq(CPUM68KState *env1);
@@ -215,7 +215,15 @@ void register_m68k_insns (CPUM68KState *env);
#define TARGET_PHYS_ADDR_SPACE_BITS 32
#define TARGET_VIRT_ADDR_SPACE_BITS 32
-#define cpu_init cpu_m68k_init
+static inline CPUM68KState *cpu_init(const char *cpu_model)
+{
+ M68kCPU *cpu = cpu_m68k_init(cpu_model);
+ if (cpu == NULL) {
+ return NULL;
+ }
+ return &cpu->env;
+}
+
#define cpu_exec cpu_m68k_exec
#define cpu_gen_code cpu_m68k_gen_code
#define cpu_signal_handler cpu_m68k_signal_handler