From patchwork Fri Nov 4 20:50:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9413339 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 CA14A6022E for ; Fri, 4 Nov 2016 21:18:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBCDD2AC90 for ; Fri, 4 Nov 2016 21:18:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0C3A2B0FF; Fri, 4 Nov 2016 21:18:09 +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 6D6102AC90 for ; Fri, 4 Nov 2016 21:18:09 +0000 (UTC) Received: from localhost ([::1]:40840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2lsG-0006Z0-K2 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 04 Nov 2016 17:18:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2lSw-0001Po-PB for qemu-devel@nongnu.org; Fri, 04 Nov 2016 16:51:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2lSw-0004b7-1u for qemu-devel@nongnu.org; Fri, 04 Nov 2016 16:51:58 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:33582) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c2lSv-0004a4-S5 for qemu-devel@nongnu.org; Fri, 04 Nov 2016 16:51:57 -0400 Received: by mail-wm0-x242.google.com with SMTP id u144so5629936wmu.0 for ; Fri, 04 Nov 2016 13:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=SBSpCGDgV+3F4gAC1kxffE9tP/3koQo72oW4+k0qzOY=; b=qfL3yVvQIxSTBw7BXmmRdvhoS1tk45y97Cq8Bbm8lqT8nC8nQ4NPCwctekQBr90VZQ UQDtY9wpLPhmiocw1vb4NL71I/w96kqfDhE03v15BGrtFhYnUyTLd1NBRCttUg6R7nyi 9YRrWrrY0FR22wD4Bj3jIECIRQXLvNfFwl3zVtU+1bTSzzbtuWZUoeKHNDnXyWeHi9eU CSgnl7jk2f4juMYfRvPZLoXyaLqrJM0+HEN01P4IkPd+h4mY4WwqEsInLUs/TlYnF4Z9 gfORqu+3VmjSS8DNn/h7BDEASzKwjoduK2yWNjbsewAzfqqyHNzhJlDG6oCJ+K5TR7Zh TeWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=SBSpCGDgV+3F4gAC1kxffE9tP/3koQo72oW4+k0qzOY=; b=E9hE6fqKb8/+1T7RnwEKVNjGWnqmpwg77cfvzGS61fQjagvalWjjdGDKEBjbmDdEM8 sI2cmQBs3orgnyFgpiB/rdGXdBH1f1W/z+lz9m6hsuNx+m69RPkjWqJKG35gA8OVUi9w xOr1GgsvQybYGn3YXtXXGpr78kmfty8PtsAwx34KjXoF7JIgOBm3iqmKvZoavaXKXOTN GJflt7L7saVJ9yyuFrKe1R/OmqA/rGpyjQeYQIClQueu5SxglsfWJ5zp1OBgDdVTT4jt XIMPJQi5JDbevkzGMfZh3YtTBWe0sQO/wx72YGH9z6qvxr2uNor33Edrfq8oQQ5vA7Mj ExqA== X-Gm-Message-State: ABUngvfdWL7vXmXbePkcocb++YcKiUIth5S9U+slZjTAvsxJYtHLUGW3o+C+salXU+GZWA== X-Received: by 10.194.241.165 with SMTP id wj5mr12572451wjc.181.1478292716812; Fri, 04 Nov 2016 13:51:56 -0700 (PDT) Received: from localhost (x55b4b5cf.dyn.telefonica.de. [85.180.181.207]) by smtp.gmail.com with ESMTPSA id g17sm16139555wjs.38.2016.11.04.13.51.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Nov 2016 13:51:55 -0700 (PDT) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Fri, 4 Nov 2016 21:50:28 +0100 Message-Id: <2a2d02ba23fab8af86050d4cfd00fd8f93f3b992.1478291230.git.atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH v1 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 , Artyom Tarasenko , Richard Henderson 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 53c327d..e929169 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);