target-i386: Let cpu_x86_init() return X86CPU

Turn cpu_init macro into a static inline function returning CPUX86State
for backwards compatibility.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
This commit is contained in:
Andreas Färber 2012-05-02 18:42:46 +02:00
parent 232fc23bed
commit b47ed9969f
2 changed files with 12 additions and 4 deletions

View file

@ -1157,7 +1157,7 @@ int cpu_x86_get_descr_debug(CPUX86State *env, unsigned int selector,
return 1;
}
CPUX86State *cpu_x86_init(const char *cpu_model)
X86CPU *cpu_x86_init(const char *cpu_model)
{
X86CPU *cpu;
CPUX86State *env;
@ -1183,7 +1183,7 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
x86_cpu_realize(OBJECT(cpu), NULL);
return env;
return cpu;
}
#if !defined(CONFIG_USER_ONLY)