From patchwork Sat Sep 15 20:24:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 184100 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 871EB2C0084 for ; Sun, 16 Sep 2012 06:24:42 +1000 (EST) Received: from localhost ([::1]:41256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCyuu-0007FD-6C for incoming@patchwork.ozlabs.org; Sat, 15 Sep 2012 16:24:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCyub-00076w-C6 for qemu-devel@nongnu.org; Sat, 15 Sep 2012 16:24:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCyua-0004hI-EW for qemu-devel@nongnu.org; Sat, 15 Sep 2012 16:24:21 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:38629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCyua-0004g0-8a for qemu-devel@nongnu.org; Sat, 15 Sep 2012 16:24:20 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp12so7600296pbb.4 for ; Sat, 15 Sep 2012 13:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=Fbe87zmo0TfpvFoFKRovqhNZZ6f5KHKsnJrgWuzCNqQ=; b=ZShNby84zxJn9QtwNlNvUi9T2kVh89onyzX0FnQvSobdny9/BtkjaqNVMptEFFz5Aj GF9CorrMIBQDC1KC4jdTDMhi6ChykRiJDIP8uADqyipAc7BZsnF47SqBoD5XyHV7+fZF TLmrws5srGbzPnIszFigXP71Sux1ZiHzXWmsgIKzMgE/NyY6bcQS5/fxc8aUI4TbBAtT H57djlAY7Rdux8HBZ4x/+X2Gs6UPYU8ulIWXnoIjMlb2okSGuwphOuA8KzmfZCenXK8R jktK9Ac/pLJEmm/Uq+Zxnm6AasLprVR1iuqvQmUMKlrItZntMmGwEJGX5dhGa2n9TgtE HMoA== Received: by 10.68.191.226 with SMTP id hb2mr11844724pbc.129.1347740659792; Sat, 15 Sep 2012 13:24:19 -0700 (PDT) Received: from anchor.twiddle.home ([173.160.232.49]) by mx.google.com with ESMTPS id lb1sm3553987pbc.47.2012.09.15.13.24.18 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 15 Sep 2012 13:24:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 15 Sep 2012 13:24:08 -0700 Message-Id: <1347740649-28646-6-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1347740649-28646-1-git-send-email-rth@twiddle.net> References: <1347740649-28646-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: Riku Voipio Subject: [Qemu-devel] [PATCH 5/6] target-alpha: Fix cpu_alpha_init 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 Signed-off-by: Richard Henderson Signed-off-by: Richard Henderson --- target-alpha/translate.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 12de6a3..f998f75 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -3525,6 +3525,7 @@ static const struct cpu_def_t cpu_defs[] = { CPUAlphaState * cpu_alpha_init (const char *cpu_model) { + static bool inited; AlphaCPU *cpu; CPUAlphaState *env; int implver, amask, i, max; @@ -3532,7 +3533,10 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model) cpu = ALPHA_CPU(object_new(TYPE_ALPHA_CPU)); env = &cpu->env; - alpha_translate_init(); + if (!inited) { + inited = true; + alpha_translate_init(); + } /* Default to ev67; no reason not to emulate insns by default. */ implver = IMPLVER_21264; @@ -3549,6 +3553,7 @@ CPUAlphaState * cpu_alpha_init (const char *cpu_model) } env->implver = implver; env->amask = amask; + env->cpu_model_str = cpu_model; qemu_init_vcpu(env); return env;