From nobody Fri Nov 7 14:33:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548441322088551.8037053177827; Fri, 25 Jan 2019 10:35:22 -0800 (PST) Received: from localhost ([127.0.0.1]:49069 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Jw-0001p5-4h for importer@patchew.org; Fri, 25 Jan 2019 13:35:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Bl-0004KP-9w for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn6Bi-0002f4-PB for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:49 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:51124) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn6Bi-0002Rz-GP for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:46 -0500 Received: by mail-wm1-x341.google.com with SMTP id n190so7708323wmd.0 for ; Fri, 25 Jan 2019 10:26:31 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id t5sm45014921wmg.43.2019.01.25.10.26.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 10:26:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ux8QnJxJ6UvqTD3RS+ri03Z+8tArGuUjGhPYKu3EKSc=; b=ZcD1mjQ92jJfQPQEXjiSqEB8/87BHecT2vKObPpUFLpbWa7UzHCLotizZzmmPmNyxZ MoqTwLWPNmZP74rpiJu8Pdu6i7P2Dd9bqGbrMRwTZPOG0V3jkg9RNsVLselezbnjbkiD 4M/ZsotwUhi6RBgqEEAwCckMrKAtWbO/Yq7Gk= 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:mime-version:content-transfer-encoding; bh=ux8QnJxJ6UvqTD3RS+ri03Z+8tArGuUjGhPYKu3EKSc=; b=KzzkMvQKwGMKWTExWuXTVT9v5Hvaefx9/+CYLqG6imc0F85dylXmN0//LjXk7vVbnv FuFXab0Euc29De8jUdno/GCrKOQd462nRrRaahywDVY+AKHTInefUE/1ABBFalyoJ3Rp DWMx+Qvrm4iQTMzfMaoxy7uxLJpqqJ8GgFmNDa5N+WWPH9B2Ki05zeg9E2OxuLgmVj4V 4Oaklw+Nqus5eQ1i9AAWnztpC88jffGLmg9NiTj8LnxDYf9sacPNlCQWMcIqITc/sFdQ h3zHk9+clHGN/cFKb20so/yUP28tpSigYu7IMbQesXFrQQN5jpiIYi8uJ5RDnih/2g0C PcGA== X-Gm-Message-State: AJcUukcllsWSm7JJQ6r0j/A5USDKBK+FHU1t4MdOARL4hhh6zJvQQOSi xgNakkU0qJWmRp4jX13NfFKVVI0qK39kAA== X-Google-Smtp-Source: ALg8bN7uyU5dN877piLo8RQ7fNiBVEU3YlmubKgjOprVzjbZ28fgrep99w7s5O2TF8EquflPP4Wkuw== X-Received: by 2002:a1c:b10a:: with SMTP id a10mr7669266wmf.148.1548440790092; Fri, 25 Jan 2019 10:26:30 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 18:26:20 +0000 Message-Id: <20190125182626.9221-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190125182626.9221-1-peter.maydell@linaro.org> References: <20190125182626.9221-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 Subject: [Qemu-devel] [PATCH 1/7] target/arm/translate-a64: Don't underdecode system instructions 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: Laurent Desnogues , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The "system instructions" and "system register move" subcategories of "branches, exception generating and system instructions" for A64 only apply if bits [23:22] are zero; other values are currently unallocated. Correctly UNDEF these unallocated encodings. Reported-by: Laurent Desnogues Signed-off-by: Peter Maydell Reviewed-by: Laurent Desnogues --- target/arm/translate-a64.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 4d28a27c3bd..e6df303e321 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -2144,7 +2144,11 @@ static void disas_b_exc_sys(DisasContext *s, uint32_= t insn) break; case 0x6a: /* Exception generation / System */ if (insn & (1 << 24)) { - disas_system(s, insn); + if (extract32(insn, 22, 2) =3D=3D 0) { + disas_system(s, insn); + } else { + unallocated_encoding(s); + } } else { disas_exc(s, insn); } --=20 2.20.1 From nobody Fri Nov 7 14:33:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548441307947399.20028273794594; Fri, 25 Jan 2019 10:35:07 -0800 (PST) Received: from localhost ([127.0.0.1]:49067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Jh-0001iU-W4 for importer@patchew.org; Fri, 25 Jan 2019 13:35:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Bo-0004Ni-DZ for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn6Bi-0002dP-A9 for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:52 -0500 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:46366) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn6Bh-0002SR-V2 for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:46 -0500 Received: by mail-wr1-x442.google.com with SMTP id l9so11272828wrt.13 for ; Fri, 25 Jan 2019 10:26:32 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id t5sm45014921wmg.43.2019.01.25.10.26.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 10:26:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O1du06yHQQZbH4UvjLrkhnO8CuAthMbLXRKig3LlNvA=; b=IQkIjy15DBzO8ZGYaVEJowdX6E59xUuiB7s9AJ2liqLNumT1oJ7izk+yabCGW0SOpR VimWqwIbYNC9l/xpWMdpHFMJiUKgJejD17eRsD4yDbsbAO60DA2JCv1Fjh+QbfSRaZSf TlhFo0Q7zvcJmdTTBeyuOfZ3AVGWguBYFM5S0= 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:mime-version:content-transfer-encoding; bh=O1du06yHQQZbH4UvjLrkhnO8CuAthMbLXRKig3LlNvA=; b=N/Yhn+po4XZBK45b5nu6Y9axWV6LiigmY0PQf15GX7d/QrL+5/XxOdDvec1t224fxT UYeL6CQW1wuoJnJjMI57y6XZsRfqJuIH1ZMEal3z6hdjxju3CtvUFx+EktYd4OImZ5Uc Zr+uPW0txz4gp9RxgGsIy8DfxNyAJPqoBuAjxawu2+N1bsEYcOMpaPPigPazrVecNiOY jgyRM3eTO7v51u6lska/uSlR0RyVkDAz9HehmKX9OpvKpro8TxZPJ0pC3IJ4LCgQd3Xu BZZVECRBA/Io52EHa94FI2dh4t2EIAcMB6r0vsTRQkzwTVOGNpi/95nngr2DQf2wKaPo yanQ== X-Gm-Message-State: AJcUukcPkQvczVW1Awxcxj3UBu0ECwI5NnHxN0m0v0tIWjhDvWtQ8ZDq FL+3msSIMo0Yzjke3XO5ic2NkQ== X-Google-Smtp-Source: ALg8bN617ovzS5uS+OyR7ZFZkXoC1ZOMyLb2gmeAqhvImJ06HZqqSzMbuuGzbJPmX7/fPGVpad2q+g== X-Received: by 2002:a5d:45d0:: with SMTP id b16mr11994858wrs.86.1548440791392; Fri, 25 Jan 2019 10:26:31 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 18:26:21 +0000 Message-Id: <20190125182626.9221-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190125182626.9221-1-peter.maydell@linaro.org> References: <20190125182626.9221-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH 2/7] target/arm/translate-a64: Don't underdecode PRFM 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: Laurent Desnogues , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The PRFM prefetch insn in the load/store with imm9 encodings requires idx field 0b00; we were underdecoding this by only checking !is_unpriv (which is equivalent to idx !=3D 2). Correctly UNDEF the unallocated encodings where idx =3D=3D 0b01 and 0b11 as well as 0b10. Reported-by: Laurent Desnogues Signed-off-by: Peter Maydell Reviewed-by: Laurent Desnogues --- target/arm/translate-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index e6df303e321..8e081758e03 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -2803,7 +2803,7 @@ static void disas_ldst_reg_imm9(DisasContext *s, uint= 32_t insn, } else { if (size =3D=3D 3 && opc =3D=3D 2) { /* PRFM - prefetch */ - if (is_unpriv) { + if (idx !=3D 0) { unallocated_encoding(s); return; } --=20 2.20.1 From nobody Fri Nov 7 14:33:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548440938413771.0208962213806; Fri, 25 Jan 2019 10:28:58 -0800 (PST) Received: from localhost ([127.0.0.1]:48967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Do-0005Zd-L5 for importer@patchew.org; Fri, 25 Jan 2019 13:28:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Bj-0004Jq-1w for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn6Bh-0002c7-PA for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:47 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:45417) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn6Bh-0002Ta-Iu for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:45 -0500 Received: by mail-wr1-x443.google.com with SMTP id t6so11280784wrr.12 for ; Fri, 25 Jan 2019 10:26:33 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id t5sm45014921wmg.43.2019.01.25.10.26.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 10:26:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IBmjdnmbPu3JQz7KF3v9VAM5iOi+UcJ6hEdpbE5TjUg=; b=BvfkZbL4zV5TYTORCJS9WvuejkESIRcxQg3syBI6+F875zYIXTn8JlZKEYD7AceuXP 1gtBTpjMLLjbQ/xLbYCdOGcgnIFThTqJmm1m1DTpMqLG21itNfNsqLsEV1cD2PjXiZZR rXWZ2SkQUG5mPxZ3V5AWa02bx8Ow2MByFSWY0= 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:mime-version:content-transfer-encoding; bh=IBmjdnmbPu3JQz7KF3v9VAM5iOi+UcJ6hEdpbE5TjUg=; b=hKx0+z53fHMEWUCsKuIOSyIx/7nfJpcpump2XfsYhi/QTHivvx68ts7lhIGZFeS1ZR g88Y66zM7lb6Nv3Vx/stUUKc0/BphzKcplCd8CE8DZ07JThZVqtdSBVwog5vyo4hAeQt 7M3wQlOrkMtYiNufrwuOfW8wKg+znoUZqB+W3IUm6hggh+HF8Jfaph64yUXaUrzMnqpN n3+mfTPaS61Y77AJWAvF4AnRYdr9LgMpBBBCBzAl4XMr4YkRePIomaCBiBhmMcgglcBy 37JYbQAv5jZDMzFabo8wnIgnW1MIcFp2OYtuZ3ztHTOhpGKbjy75xJWBRTa9fKCv484o Q/bw== X-Gm-Message-State: AJcUukfD+YP4Gd7WeH7vAfUKAMcppjWIb93lfG4uOQ+xX8Wh0TwNq0yr QyNY2340qHqh8ofRcJw5zXhbiQ== X-Google-Smtp-Source: ALg8bN70PzcxymdkCnDCRh9Mbf0MZcNj5utYeGVf15yhyyM7+SLeLwML1HOb5QiZc3tP69pmE7on/w== X-Received: by 2002:a5d:6850:: with SMTP id o16mr12837359wrw.123.1548440792575; Fri, 25 Jan 2019 10:26:32 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 18:26:22 +0000 Message-Id: <20190125182626.9221-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190125182626.9221-1-peter.maydell@linaro.org> References: <20190125182626.9221-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH 3/7] target/arm/translate-a64: Don't underdecode SIMD ld/st multiple 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: Laurent Desnogues , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" In the AdvSIMD load/store multiple structures encodings, the non-post-indexed case should have zeroes in [20:16] (which is the Rm field for the post-indexed case). Correctly UNDEF the currently unallocated encodings which have non-zeroes in those bits. Reported-by: Laurent Desnogues Signed-off-by: Peter Maydell Reviewed-by: Laurent Desnogues --- target/arm/translate-a64.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 8e081758e03..c1f0cad7691 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -3249,6 +3249,7 @@ static void disas_ldst_multiple_struct(DisasContext *= s, uint32_t insn) { int rt =3D extract32(insn, 0, 5); int rn =3D extract32(insn, 5, 5); + int rm =3D extract32(insn, 16, 5); int size =3D extract32(insn, 10, 2); int opcode =3D extract32(insn, 12, 4); bool is_store =3D !extract32(insn, 22, 1); @@ -3268,6 +3269,11 @@ static void disas_ldst_multiple_struct(DisasContext = *s, uint32_t insn) return; } =20 + if (!is_postidx && rm !=3D 0) { + unallocated_encoding(s); + return; + } + /* From the shared decode logic */ switch (opcode) { case 0x0: @@ -3367,7 +3373,6 @@ static void disas_ldst_multiple_struct(DisasContext *= s, uint32_t insn) } =20 if (is_postidx) { - int rm =3D extract32(insn, 16, 5); if (rm =3D=3D 31) { tcg_gen_mov_i64(tcg_rn, tcg_addr); } else { --=20 2.20.1 From nobody Fri Nov 7 14:33:34 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 15484411585571001.2731101852062; Fri, 25 Jan 2019 10:32:38 -0800 (PST) Received: from localhost ([127.0.0.1]:49046 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6HD-0008L7-7K for importer@patchew.org; Fri, 25 Jan 2019 13:32:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Bk-0004K7-Rs for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn6Bi-0002e4-Id for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:48 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:32938) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn6Bi-0002U7-9E for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:46 -0500 Received: by mail-wm1-x342.google.com with SMTP id r24so5392397wmh.0 for ; Fri, 25 Jan 2019 10:26:34 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id t5sm45014921wmg.43.2019.01.25.10.26.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 10:26:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PwtFG9KQOA83ZfBz3XfHQVTXICJqvH33KYmnir8zB3c=; b=gGsHr2kJKGOoh/lMGPZzv1hoV5muy3wo0TF4kpqQR3S61W0ctUFQddol3N4OVF7Q0M SUgdDSZntqSCl0XzBU4YdFoffVzfYFbxQ7uhuX1vyApwlWEPBp1bRyg77QT5m4678I9I DXmmOOlRKBsFMFp78DA8xaCKVVBIE9MCYrkZ4= 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:mime-version:content-transfer-encoding; bh=PwtFG9KQOA83ZfBz3XfHQVTXICJqvH33KYmnir8zB3c=; b=StbAOydlrXmuJT5Mfpk7BMB06cohaLfa55XOGMmdZw56u+Ybe6jsHxtGNilgRowGjY RzR8r9cEB2CdgJHKbnKB/yZS4spRii2pR5YJV06qUOUQyEQql/ZQXM7ckVcXeUc9z9pE QO2yMxxm91pB4wvHQl/aoh3OrKnNj8VHwYWYKhy/azlMZEECVyRcqunGkHG3CvXJEXoG zsiHfvqmpMjfm9WCBpXsUj+bRiqQU32GGvqeMDr3Mlxy9PoE01KPfysxsvJTAfLoRDrt uNkp82pIIAQ1FePm7R1ixSmGXRyHeyF+9plUN671BbhVGptXYnISJpxIDp7kQ+RsbglQ nIVQ== X-Gm-Message-State: AJcUukeXRNe+YultO6DuWov5/Sw7r6/K9JqP4Tj+sUuOBzjMjxZhruv4 aqtOOeKiIU1Nvje0NAtqK0SOpQ== X-Google-Smtp-Source: ALg8bN6tCxUNBmbMhPuQdok0qcLml20V+mjon+t/n/F7PoRsSwbG0QyETZyJsrzXVu+YtH//5Uh5Ew== X-Received: by 2002:a1c:ae15:: with SMTP id x21mr7758927wme.146.1548440793723; Fri, 25 Jan 2019 10:26:33 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 18:26:23 +0000 Message-Id: <20190125182626.9221-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190125182626.9221-1-peter.maydell@linaro.org> References: <20190125182626.9221-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PATCH 4/7] target/arm/translate-a64: Don't underdecode SIMD ld/st single 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: Laurent Desnogues , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" In the AdvSIMD load/store single structure encodings, the non-post-indexed case should have zeroes in [20:16] (which is the Rm field for the post-indexed case). Bit 31 must also be zero (a check we got right in ldst_multiple but not here). Correctly UNDEF these unallocated encodings. Reported-by: Laurent Desnogues Signed-off-by: Peter Maydell Reviewed-by: Laurent Desnogues --- target/arm/translate-a64.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index c1f0cad7691..2cade64ed25 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -3409,6 +3409,7 @@ static void disas_ldst_single_struct(DisasContext *s,= uint32_t insn) { int rt =3D extract32(insn, 0, 5); int rn =3D extract32(insn, 5, 5); + int rm =3D extract32(insn, 16, 5); int size =3D extract32(insn, 10, 2); int S =3D extract32(insn, 12, 1); int opc =3D extract32(insn, 13, 3); @@ -3424,6 +3425,15 @@ static void disas_ldst_single_struct(DisasContext *s= , uint32_t insn) int ebytes, xs; TCGv_i64 tcg_addr, tcg_rn, tcg_ebytes; =20 + if (extract32(insn, 31, 1)) { + unallocated_encoding(s); + return; + } + if (!is_postidx && rm !=3D 0) { + unallocated_encoding(s); + return; + } + switch (scale) { case 3: if (!is_load || S) { @@ -3501,7 +3511,6 @@ static void disas_ldst_single_struct(DisasContext *s,= uint32_t insn) } =20 if (is_postidx) { - int rm =3D extract32(insn, 16, 5); if (rm =3D=3D 31) { tcg_gen_mov_i64(tcg_rn, tcg_addr); } else { --=20 2.20.1 From nobody Fri Nov 7 14:33:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548441006130667.1159138635161; Fri, 25 Jan 2019 10:30:06 -0800 (PST) Received: from localhost ([127.0.0.1]:48973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Eu-0006Yl-UP for importer@patchew.org; Fri, 25 Jan 2019 13:30:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Bk-0004K6-Rj for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn6Bi-0002eJ-JY for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:48 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:36178) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn6Bi-0002VV-9M for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:46 -0500 Received: by mail-wr1-x444.google.com with SMTP id u4so11341430wrp.3 for ; Fri, 25 Jan 2019 10:26:35 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id t5sm45014921wmg.43.2019.01.25.10.26.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 10:26:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VtBfY8s91zSjllF9HGncjhus2NgfJ96usyZ2QcFWFLs=; b=WyBcMlmcjb01Y8TvDT2h4nLIBxY1YQAHIp6xXtKE9PAbtljnVaZWL56Z4Nt4VR7t9L Z5T+daXj8EYTNiJD4JXMAU4zV3hvCacE2c8PM7SBJxNjAM5pi4EriULvxu3kVzd6Zmzu kSdfV/6Za7Uud/WASqvuOtzZNwXp3sYWjEjak= 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:mime-version:content-transfer-encoding; bh=VtBfY8s91zSjllF9HGncjhus2NgfJ96usyZ2QcFWFLs=; b=Dp5qnboO9Kk/IvkIMN000v0wzMLambqeKlEVPSUwtAjahcIY/w0l7l4zlS9qXtlgMc 8Aei1Ln3ocAy3+ih/rYsuzY4Gf9yShimMe++A/iiLEGlIVU3Oto68Ik+nid8HE8YKofy XZsyePwvL8Cx0i8W3ohS066B9uo7st6oACBfLboq+bSHzG0ePnsxv9zLimoqgH2GcY39 9ZlwSB6YNwcmozFP7k6OksleZLtYbPB6+dAEB4343OzugUSPhCmeNILEfQ2qqL+6mGRZ l4Vy4XNyP6InxAnZYooaHA9zBhWopyygKKY/YN7gtOR9os3eFIQxY7h/gDp6S3JCJCNh UxvA== X-Gm-Message-State: AJcUukd7C+TBooM46Kg3POifXE+eUjOOcUlXk7lltCDE5qBKfiOFOu8s jobGyrXOFqV9s1xDdMWpw31Acg== X-Google-Smtp-Source: ALg8bN5eOhODwLd3WXmcU74ecJQorK7s3n444993u+tp3VhprbUr3+tpijQh2oZj/dQ7TAo+u5fkjw== X-Received: by 2002:a5d:4e0b:: with SMTP id p11mr13588112wrt.227.1548440794846; Fri, 25 Jan 2019 10:26:34 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 18:26:24 +0000 Message-Id: <20190125182626.9221-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190125182626.9221-1-peter.maydell@linaro.org> References: <20190125182626.9221-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH 5/7] target/arm/translate-a64: Don't underdecode add/sub extended register 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: Laurent Desnogues , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" In the "add/subtract (extended register)" encoding group, the "opt" field in bits [23:22] must be zero. Correctly UNDEF the unallocated encodings where this field is not zero. Reported-by: Laurent Desnogues Signed-off-by: Peter Maydell Reviewed-by: Laurent Desnogues --- target/arm/translate-a64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 2cade64ed25..efd2f6490b5 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -4204,12 +4204,13 @@ static void disas_add_sub_ext_reg(DisasContext *s, = uint32_t insn) bool setflags =3D extract32(insn, 29, 1); bool sub_op =3D extract32(insn, 30, 1); bool sf =3D extract32(insn, 31, 1); + bool opt =3D extract32(insn, 22, 2); =20 TCGv_i64 tcg_rm, tcg_rn; /* temps */ TCGv_i64 tcg_rd; TCGv_i64 tcg_result; =20 - if (imm3 > 4) { + if (imm3 > 4 || opt !=3D 0) { unallocated_encoding(s); return; } --=20 2.20.1 From nobody Fri Nov 7 14:33:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548440939442925.9527814176702; Fri, 25 Jan 2019 10:28:59 -0800 (PST) Received: from localhost ([127.0.0.1]:48969 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Dq-0005au-Cx for importer@patchew.org; Fri, 25 Jan 2019 13:28:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Bj-0004Jp-1A for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn6Bh-0002cE-SA for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:46 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:45418) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn6Bh-0002WC-LX for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:45 -0500 Received: by mail-wr1-x444.google.com with SMTP id t6so11280931wrr.12 for ; Fri, 25 Jan 2019 10:26:36 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id t5sm45014921wmg.43.2019.01.25.10.26.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 10:26:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VAdJTXCL7K1e+WuNeCE2OxhDcHh7qYlDwJMPwNMUGu8=; b=cDf7zm1z7gDL7QXYAHtZAd0iP7NbLYvxE5P3iiqlFs+S1HajR2apxlfIu1UAgl7q66 UrAMlrRyo6A7jNZfBN2KWWax6+JwEDJEvGMCKqbIZTasPCn5qa6/BUv177o8kTOpwW0s 2Pbmyk3Wuq1HR3w3cBwoC3ncaAn1bDk+cI5T4= 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:mime-version:content-transfer-encoding; bh=VAdJTXCL7K1e+WuNeCE2OxhDcHh7qYlDwJMPwNMUGu8=; b=OYuRz0z09GdZ2ebkMWFCnwTSYuV+KojGLXw7fVOZb1NXfIXuNfA1+3r66T2BMtcPFq 94DWXP7BDnxIffTLrtMhzs/Z1lY0dvX6Nhb/srWQ9lpkrGQR2w5aIkrvM/CneMpncpkR RuzC1q/ftfhw+3SldEBjSkIL55Cqnp4Ic9zeQ8bBdFMVznrCJWPj5kz/iT0/5h2Jwhyv KxhoAHMlE3gJFCBZlLakVTGfbe2K4hE/7sFCT8XMdMcKhsYvXAwkReG6H6cyJXt4LQbm dzSpeJziDm4IYIdhZZdk8ckE2T+nApSXgcU8dZ0U4wlf9HlGW4B/ND6aAFtgP9+rYBVZ XBGg== X-Gm-Message-State: AJcUukeI6wcLW1ajk9NOlc2uEqcc35JzlVbCMJMLnCtVxzfkBkHiux8m OSZO560jqWG3Da2dZwYLyJITvQ== X-Google-Smtp-Source: ALg8bN6qfCy3xeF6FX2KffuBn67w2pIZCcKWm1sXuO3HftMwF3Pe+KBS7FWGu+/GSkQJG1VLpWiGuA== X-Received: by 2002:adf:a357:: with SMTP id d23mr13170781wrb.195.1548440796084; Fri, 25 Jan 2019 10:26:36 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 18:26:25 +0000 Message-Id: <20190125182626.9221-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190125182626.9221-1-peter.maydell@linaro.org> References: <20190125182626.9221-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH 6/7] target/arm/translate-a64: Don't underdecode FP insns 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: Laurent Desnogues , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" In the encoding groups * floating-point data-processing (1 source) * floating-point data-processing (2 source) * floating-point data-processing (3 source) * floating-point immediate * floating-point compare * floating-ponit conditional compare * floating-point conditional select bit 31 is M and bit 29 is S (and bit 30 is 0, already checked at this point in the decode). None of these groups allocate any encoding for M=3D1 or S=3D1. We checked this in disas_fp_compare(), disas_fp_ccomp() and disas_fp_csel(), but missed it in disas_fp_1src(), disas_fp_2src(), disas_fp_3src() and disas_fp_imm(). We also missed that in the fp immediate encoding the imm5 field must be all zeroes. Correctly UNDEF the unallocated encodings here. Reported-by: Laurent Desnogues Signed-off-by: Peter Maydell Reviewed-by: Laurent Desnogues --- target/arm/translate-a64.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index efd2f6490b5..474d9bfb5f0 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -5636,11 +5636,17 @@ static void handle_fp_fcvt(DisasContext *s, int opc= ode, */ static void disas_fp_1src(DisasContext *s, uint32_t insn) { + int mos =3D extract32(insn, 29, 3); int type =3D extract32(insn, 22, 2); int opcode =3D extract32(insn, 15, 6); int rn =3D extract32(insn, 5, 5); int rd =3D extract32(insn, 0, 5); =20 + if (mos) { + unallocated_encoding(s); + return; + } + switch (opcode) { case 0x4: case 0x5: case 0x7: { @@ -5867,13 +5873,14 @@ static void handle_fp_2src_half(DisasContext *s, in= t opcode, */ static void disas_fp_2src(DisasContext *s, uint32_t insn) { + int mos =3D extract32(insn, 29, 3); int type =3D extract32(insn, 22, 2); int rd =3D extract32(insn, 0, 5); int rn =3D extract32(insn, 5, 5); int rm =3D extract32(insn, 16, 5); int opcode =3D extract32(insn, 12, 4); =20 - if (opcode > 8) { + if (opcode > 8 || mos) { unallocated_encoding(s); return; } @@ -6028,6 +6035,7 @@ static void handle_fp_3src_half(DisasContext *s, bool= o0, bool o1, */ static void disas_fp_3src(DisasContext *s, uint32_t insn) { + int mos =3D extract32(insn, 29, 3); int type =3D extract32(insn, 22, 2); int rd =3D extract32(insn, 0, 5); int rn =3D extract32(insn, 5, 5); @@ -6036,6 +6044,11 @@ static void disas_fp_3src(DisasContext *s, uint32_t = insn) bool o0 =3D extract32(insn, 15, 1); bool o1 =3D extract32(insn, 21, 1); =20 + if (mos) { + unallocated_encoding(s); + return; + } + switch (type) { case 0: if (!fp_access_check(s)) { @@ -6105,12 +6118,19 @@ uint64_t vfp_expand_imm(int size, uint8_t imm8) static void disas_fp_imm(DisasContext *s, uint32_t insn) { int rd =3D extract32(insn, 0, 5); + int imm5 =3D extract32(insn, 5, 5); int imm8 =3D extract32(insn, 13, 8); int type =3D extract32(insn, 22, 2); + int mos =3D extract32(insn, 29, 3); uint64_t imm; TCGv_i64 tcg_res; TCGMemOp sz; =20 + if (mos || imm5) { + unallocated_encoding(s); + return; + } + switch (type) { case 0: sz =3D MO_32; --=20 2.20.1 From nobody Fri Nov 7 14:33:34 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15484409926205.891905708676745; Fri, 25 Jan 2019 10:29:52 -0800 (PST) Received: from localhost ([127.0.0.1]:48971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Eh-0006MF-GO for importer@patchew.org; Fri, 25 Jan 2019 13:29:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn6Bk-0004K0-Eg for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn6Bi-0002dZ-EI for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:48 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:35289) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gn6Bi-0002Xu-1Y for qemu-devel@nongnu.org; Fri, 25 Jan 2019 13:26:46 -0500 Received: by mail-wr1-x444.google.com with SMTP id 96so11363648wrb.2 for ; Fri, 25 Jan 2019 10:26:37 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id t5sm45014921wmg.43.2019.01.25.10.26.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 10:26:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mPazcmGG1PcX/ZPAULBWKJ42pMvpB+sfJKcCkrgpfpM=; b=hbeztnB6zuDp7b1IxHGnf/D5cNn38PsRVQYS+PMAM5CrHYEXqEldPzTai2OEcDD9Lv dwa6+eEZtwhW/IyPKGvodqICSLbnNB5pfoavAYrrkejPUcn8k8Jzum3+PuLr3nfj1gp4 owotCIM1j9SEx5ZqoStnPpx6kfV5n3MS/HhuI= 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:mime-version:content-transfer-encoding; bh=mPazcmGG1PcX/ZPAULBWKJ42pMvpB+sfJKcCkrgpfpM=; b=DPEISuw2Szw87nslKua9l0JuMr2pEjl03ZFHjS72j2dBWT16hNFv+6eAV4lX8loeUX I+uUwJufW1zsxaaZAnbBC4+jMN5coFeDxLAMEUTxYTYKvB+xHVGrZDKF+WlMAIGJ77oe JYDRAKIcAuF+fTKUd5xg7PrOD7gUexMhrUk4VbB1lxyJ/ORBmZtUZcgOqVjAoVW4maa3 7SK/ijbxiQj0Mqp1KxZNfRWlFEHmlwf7KyDO4UGzF35JNE9/xQm6xTZGgamXUhj4/kxc 3Yci0eYrwMRd+tg5np3TSLPfU31wgwz72mKgSJ2e/GiQBQKOceCVkEFu/DiAQlsHuLf6 5YmQ== X-Gm-Message-State: AJcUukc8KWb+fwGTvGvdaZZ45n5Sl5kJ83n+d5JThEKp95FzeL1YdvH/ sdxcb2rmOUPMTn89P3FG9S7SYw== X-Google-Smtp-Source: ALg8bN6/8F32FamEl2hAFhwUPBuiiM+1LzSbUGBJaB8xv2iepsfFK0EHq/QnXIQ56fT0wo192MiFkw== X-Received: by 2002:adf:b595:: with SMTP id c21mr11967853wre.125.1548440797167; Fri, 25 Jan 2019 10:26:37 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 18:26:26 +0000 Message-Id: <20190125182626.9221-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190125182626.9221-1-peter.maydell@linaro.org> References: <20190125182626.9221-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH 7/7] target/arm/translate-a64: Don't underdecode SDOT and UDOT 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: Laurent Desnogues , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" In the AdvSIMD scalar x indexed element and vector x indexed element encoding group, the SDOT and UDOT instructions are vector only, and their opcode is unallocated in the scalar group. Correctly UNDEF this unallocated encoding. Reported-by: Laurent Desnogues Signed-off-by: Peter Maydell --- target/arm/translate-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 474d9bfb5f0..30bc2412fc0 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -12641,7 +12641,7 @@ static void disas_simd_indexed(DisasContext *s, uin= t32_t insn) break; case 0x0e: /* SDOT */ case 0x1e: /* UDOT */ - if (size !=3D MO_32 || !dc_isar_feature(aa64_dp, s)) { + if (is_scalar || size !=3D MO_32 || !dc_isar_feature(aa64_dp, s)) { unallocated_encoding(s); return; } --=20 2.20.1