Received: from eggs.gnu.org ([208.118.235.92]:34060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tl3NI-0005H3-KA for qemu-devel@nongnu.org; Tue, 18 Dec 2012 15:02:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tl3NG-0000bm-5l for qemu-devel@nongnu.org; Tue, 18 Dec 2012 15:02:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tl3NF-0000b5-Tz for qemu-devel@nongnu.org; Tue, 18 Dec 2012 15:02:46 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBIK2jqG019514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 Dec 2012 15:02:45 -0500 Received: from blackpad.lan.raisama.net (vpn1-6-125.gru2.redhat.com [10.97.6.125]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qBIK2ixV023997 for ; Tue, 18 Dec 2012 15:02:45 -0500 From: Eduardo Habkost Date: Tue, 18 Dec 2012 18:03:58 -0200 Message-Id: <1355861053-11460-6-git-send-email-ehabkost@redhat.com> In-Reply-To: <1355861053-11460-1-git-send-email-ehabkost@redhat.com> References: <1355861053-11460-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC 05/20] alpha: convert cpu_init to QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Eduardo Habkost --- target-alpha/cpu.h | 5 ++--- target-alpha/translate.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h index c04d436..a34cf0e 100644 --- a/target-alpha/cpu.h +++ b/target-alpha/cpu.h @@ -290,8 +290,7 @@ struct CPUAlphaState { int implver; }; -#define cpu_init(m) ENV_GET_CPU(old_cpu_init(m)) -#define old_cpu_init cpu_alpha_init +#define cpu_init cpu_alpha_init #define cpu_exec cpu_alpha_exec #define cpu_gen_code cpu_alpha_gen_code #define cpu_signal_handler cpu_alpha_signal_handler @@ -428,7 +427,7 @@ enum { IR_ZERO = 31, }; -CPUAlphaState * cpu_alpha_init (const char *cpu_model); +CPUState *cpu_alpha_init(const char *cpu_model); int cpu_alpha_exec(CPUAlphaState *s); /* you can call this signal handler from your SIGBUS and SIGSEGV signal handlers to inform the virtual CPU of exceptions. non zero diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 71fe1a1..ef51296 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -3517,7 +3517,7 @@ static const struct cpu_def_t cpu_defs[] = { | AMASK_MVI | AMASK_TRAP | AMASK_PREFETCH), } }; -CPUAlphaState * cpu_alpha_init (const char *cpu_model) +CPUState *cpu_alpha_init(const char *cpu_model) { AlphaCPU *cpu; CPUAlphaState *env; @@ -3546,7 +3546,7 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model) env->cpu_model_str = cpu_model; qemu_init_vcpu(env); - return env; + return CPU(cpu); } void restore_state_to_opc(CPUAlphaState *env, TranslationBlock *tb, int pc_pos) -- 1.7.11.7