From patchwork Wed Jan 18 22:38:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9524933 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 401046043A for ; Wed, 18 Jan 2017 23:11:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3400420572 for ; Wed, 18 Jan 2017 23:11:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28A1B2862D; Wed, 18 Jan 2017 23:11:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AD4DF2862E for ; Wed, 18 Jan 2017 23:11:10 +0000 (UTC) Received: from localhost ([::1]:44964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTzNl-0007Sq-AQ for patchwork-qemu-devel@patchwork.kernel.org; Wed, 18 Jan 2017 18:11:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTytZ-0006yU-KJ for qemu-devel@nongnu.org; Wed, 18 Jan 2017 17:39:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTytZ-00033k-0P for qemu-devel@nongnu.org; Wed, 18 Jan 2017 17:39:57 -0500 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33255) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cTytY-00033B-Q9 for qemu-devel@nongnu.org; Wed, 18 Jan 2017 17:39:56 -0500 Received: by mail-wm0-x241.google.com with SMTP id r144so7569830wme.0 for ; Wed, 18 Jan 2017 14:39:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BI9rkwHFQj/bA0v+T0BVPUOuhoOCHzhabU2jWzmzmoU=; b=ZgaYR975xNwBLzefzDH5tjLsYfuvjioUrBfTqo+jgBzIDg1X0fqgXRKUG8krLE1QNv +QzE6f4DUGpkael3yqWtQmf4KZITbmzISPsd5k2sUEVdgXAHOVoZsIbHz9ez8KgSyJj3 CviAgzkg0P0THB6gVDWrhFLhtxcUM5w+F+PvQ4k51dMUc63VAruq7n5ES1a5IHeTqMtg Kzgmbjvl6qsRowPX75iQqFM4ZdWSaNFmqjWT5p82oTqz40qeD+087sXlmC9H7xVmHfSy iR0BaiIVMHHbQrSVKZxAjgLjO/lCsVlf7lxOGVKuNZ1V0wJ2wniu+fUFA3BHlMC2ehdD OosA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BI9rkwHFQj/bA0v+T0BVPUOuhoOCHzhabU2jWzmzmoU=; b=PKtaX7N2AylkJPab3ZmFGo1us3pvnErz3KKwX0mw1HDdEqCInjRoc0bUu3jM6fSP45 PmoA+aD5Sh+Dqbp+Oc3AR0SjD6rlIlXNaYLBeUjGW5g2eiWCbcQZZr4fpwesv7XFGTWB PyUW+bCP5OfD88fBGDoj5ojERdv8OLL4Cpe8/zuBgPqeY/3FSfHPBhGTeBoHJvqojdSX lSW+n6aLf80ZLslSHYJlq1ANGq193dxjUW42pDvrFGXF4A181Bhwi+criBp8+RGPb81a gO/4sIBmLVSLNw82Lgp1O+1TmhiM4WmbOvUGVVuVogbsuN2AfQv06/jsJo/d2IpKL8ZN j+2A== X-Gm-Message-State: AIkVDXIOdbWKjB0Nu61gtTw3EgcF2hx0eFzoMzt+NAGeJ4AQ+8xvXGY8Yky6miadISabyg== X-Received: by 10.28.157.200 with SMTP id g191mr23166096wme.63.1484779195789; Wed, 18 Jan 2017 14:39:55 -0800 (PST) Received: from localhost (x4e33e2b8.dyn.telefonica.de. [78.51.226.184]) by smtp.gmail.com with ESMTPSA id g75sm7996722wme.5.2017.01.18.14.39.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jan 2017 14:39:55 -0800 (PST) From: Artyom Tarasenko To: peter.maydell@linaro.org Date: Wed, 18 Jan 2017 23:38:40 +0100 Message-Id: <1484779123-18968-28-git-send-email-atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1484779123-18968-1-git-send-email-atar4qemu@gmail.com> References: <1484779123-18968-1-git-send-email-atar4qemu@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PULL 27/30] target-sparc: add ST_BLKINIT_ ASIs for UA2005+ CPUs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org, Artyom Tarasenko , rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP In OpenSPARC T1+ TWINX ASIs in store instructions are aliased with Block Initializing Store ASIs. "UltraSPARC T1 Supplement Draft D2.1, 14 May 2007" describes them in the chapter "5.9 Block Initializing Store ASIs" Integer stores of all sizes are allowed with these ASIs. Signed-off-by: Artyom Tarasenko --- target/sparc/translate.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 0f20ed0..655060c 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -2321,8 +2321,19 @@ static void gen_st_asi(DisasContext *dc, TCGv src, TCGv addr, case GET_ASI_EXCP: break; case GET_ASI_DTWINX: /* Reserved for stda. */ +#ifndef TARGET_SPARC64 gen_exception(dc, TT_ILL_INSN); break; +#else + if (!(dc->def->features & CPU_FEATURE_HYPV)) { + /* Pre OpenSPARC CPUs don't have these */ + gen_exception(dc, TT_ILL_INSN); + return; + } + /* in OpenSPARC T1+ CPUs TWINX ASIs in store instructions + * are ST_BLKINIT_ ASIs */ + /* fall through */ +#endif case GET_ASI_DIRECT: gen_address_mask(dc, addr); tcg_gen_qemu_st_tl(src, addr, da.mem_idx, da.memop);