target-s390x: Let cpu_s390x_init() return S390CPU

Let cpu_init() return CPUS390XState for backwards compatibility.

Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
Andreas Färber 2012-05-03 04:13:04 +02:00
parent a0595d9eb8
commit 564b863d8e
3 changed files with 7 additions and 7 deletions

View File

@ -20,7 +20,7 @@
* <http://www.gnu.org/licenses/lgpl-2.1.html> * <http://www.gnu.org/licenses/lgpl-2.1.html>
*/ */
#include "cpu-qom.h" #include "cpu.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "qemu-timer.h" #include "qemu-timer.h"

View File

@ -105,6 +105,8 @@ typedef struct CPUS390XState {
QEMUTimer *cpu_timer; QEMUTimer *cpu_timer;
} CPUS390XState; } CPUS390XState;
#include "cpu-qom.h"
#if defined(CONFIG_USER_ONLY) #if defined(CONFIG_USER_ONLY)
static inline void cpu_clone_regs(CPUS390XState *env, target_ulong newsp) static inline void cpu_clone_regs(CPUS390XState *env, target_ulong newsp)
{ {
@ -271,7 +273,7 @@ static inline int get_ilc(uint8_t opc)
#define ILC_LATER_INC_2 0x22 #define ILC_LATER_INC_2 0x22
CPUS390XState *cpu_s390x_init(const char *cpu_model); S390CPU *cpu_s390x_init(const char *cpu_model);
void s390x_translate_init(void); void s390x_translate_init(void);
int cpu_s390x_exec(CPUS390XState *s); int cpu_s390x_exec(CPUS390XState *s);
void cpu_s390x_close(CPUS390XState *s); void cpu_s390x_close(CPUS390XState *s);
@ -340,7 +342,7 @@ static inline void cpu_set_tls(CPUS390XState *env, target_ulong newtls)
env->aregs[1] = newtls & 0xffffffffULL; env->aregs[1] = newtls & 0xffffffffULL;
} }
#define cpu_init cpu_s390x_init #define cpu_init(model) (&cpu_s390x_init(model)->env)
#define cpu_exec cpu_s390x_exec #define cpu_exec cpu_s390x_exec
#define cpu_gen_code cpu_s390x_gen_code #define cpu_gen_code cpu_s390x_gen_code
#define cpu_signal_handler cpu_s390x_signal_handler #define cpu_signal_handler cpu_s390x_signal_handler
@ -994,6 +996,4 @@ static inline void cpu_pc_from_tb(CPUS390XState *env, TranslationBlock* tb)
env->psw.addr = tb->pc; env->psw.addr = tb->pc;
} }
#include "cpu-qom.h"
#endif #endif

View File

@ -70,7 +70,7 @@ void s390x_cpu_timer(void *opaque)
} }
#endif #endif
CPUS390XState *cpu_s390x_init(const char *cpu_model) S390CPU *cpu_s390x_init(const char *cpu_model)
{ {
S390CPU *cpu; S390CPU *cpu;
CPUS390XState *env; CPUS390XState *env;
@ -86,7 +86,7 @@ CPUS390XState *cpu_s390x_init(const char *cpu_model)
env->cpu_model_str = cpu_model; env->cpu_model_str = cpu_model;
qemu_init_vcpu(env); qemu_init_vcpu(env);
return env; return cpu;
} }
#if defined(CONFIG_USER_ONLY) #if defined(CONFIG_USER_ONLY)