From patchwork Sun May 6 15:34:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 157173 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4C127B6FAC for ; Mon, 7 May 2012 04:30:20 +1000 (EST) Received: from localhost ([::1]:33176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3X4-0003Rv-Gg for incoming@patchwork.ozlabs.org; Sun, 06 May 2012 11:37:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VI-0000lc-3k for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SR3VG-0000la-55 for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:07 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55341 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3VF-0000kv-U0 for qemu-devel@nongnu.org; Sun, 06 May 2012 11:36:06 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id C5C32A3DDC; Sun, 6 May 2012 17:36:04 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Sun, 6 May 2012 17:34:38 +0200 Message-Id: <1336318514-30906-39-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1336318514-30906-1-git-send-email-afaerber@suse.de> References: <1336318514-30906-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Paolo Bonzini , Aurelien Jarno , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori Subject: [Qemu-devel] [PATCH for-next 38/74] target-sh4: Let cpu_sh4_init() return SuperHCPU X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Let cpu_init() return CPUSH4State for backwards compatibility. Signed-off-by: Andreas Färber --- target-sh4/cpu.h | 4 ++-- target-sh4/translate.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target-sh4/cpu.h b/target-sh4/cpu.h index b6768f1..1bee13c 100644 --- a/target-sh4/cpu.h +++ b/target-sh4/cpu.h @@ -191,7 +191,7 @@ typedef struct CPUSH4State { #include "cpu-qom.h" -CPUSH4State *cpu_sh4_init(const char *cpu_model); +SuperHCPU *cpu_sh4_init(const char *cpu_model); int cpu_sh4_exec(CPUSH4State * s); int cpu_sh4_signal_handler(int host_signum, void *pinfo, void *puc); @@ -232,7 +232,7 @@ void cpu_load_tlb(CPUSH4State * env); #include "softfloat.h" -#define cpu_init cpu_sh4_init +#define cpu_init(model) (&cpu_sh4_init(model)->env) #define cpu_exec cpu_sh4_exec #define cpu_gen_code cpu_sh4_gen_code #define cpu_signal_handler cpu_sh4_signal_handler diff --git a/target-sh4/translate.c b/target-sh4/translate.c index d25f0c5..7d35b84 100644 --- a/target-sh4/translate.c +++ b/target-sh4/translate.c @@ -247,7 +247,7 @@ static void cpu_register(CPUSH4State *env, const sh4_def_t *def) env->id = def->id; } -CPUSH4State *cpu_sh4_init(const char *cpu_model) +SuperHCPU *cpu_sh4_init(const char *cpu_model) { SuperHCPU *cpu; CPUSH4State *env; @@ -264,7 +264,7 @@ CPUSH4State *cpu_sh4_init(const char *cpu_model) cpu_reset(CPU(cpu)); cpu_register(env, def); qemu_init_vcpu(env); - return env; + return cpu; } static void gen_goto_tb(DisasContext * ctx, int n, target_ulong dest)