From nobody Sat Apr 12 15:06:01 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 1549037850361447.75497748470707; Fri, 1 Feb 2019 08:17:30 -0800 (PST) Received: from localhost ([127.0.0.1]:57382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpbVM-00088y-7c for importer@patchew.org; Fri, 01 Feb 2019 11:17:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpbMB-0008EP-F6 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpbM9-0003h4-Mw for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:55 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:40197) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gpbM9-0003TW-DW for qemu-devel@nongnu.org; Fri, 01 Feb 2019 11:07:53 -0500 Received: by mail-wm1-x335.google.com with SMTP id f188so6726860wmf.5 for ; Fri, 01 Feb 2019 08:07:32 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id n6sm2847250wmk.9.2019.02.01.08.07.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Feb 2019 08:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=MrOJl/A+jCc6+PPo6g/3qkoO1vm+u0CvNIntoD8P2+8=; b=HtiAOu4sGRRf/Cq2w3GFHcnFDiCh6VwG6WKNGzc9ccmslNPt2h6U2ww+IvvYGrYavw hh40oowh4p8l6eBC6MEU0m6wLQyKK/fz16ftLNflkBzYc2LRD3bbvcEEGmuAakEeX1hz D4fVbOJjT6o0gGLI3/4lIFKxkbfpZWxuuHST0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MrOJl/A+jCc6+PPo6g/3qkoO1vm+u0CvNIntoD8P2+8=; b=OktV5Inr2A9JPu/ABkSX9HotbuLIBUtOJaZV8PfiOjUwZqpNNhOc+9GFUdv9eAbsB0 qnyr09WV6bCVNjiJgx6iyGwEclJDMocyaFjhpihAcghZ3ndDFjlO34tWxvFaYzQHuNQb GH+uXuN+Uox2E7oOaPu2qcJK9Im1Hr3M3uG7Jc7e+e35o83QI47lK/xEEfVQeXNEyrtg c8/b0rJsyQ2h9R6RDKWKpnA1nkL8EgiUtAnIdKxikcTgkEbqxMqsDge9QHMRzHdp6RVj 8Qflzd4eV+s5QEl9/FPCOZKWFwFFjhZevFElCnOU/LXY/e5SBcuprwRCtb9kQNR+6Pb+ cNgA== X-Gm-Message-State: AHQUAuaCjI1f32tlSGyeSHO3hDi0Exnk86kBwCwtDXRvqnpTVpbnTU19 iHi4D7OssRvTzgjWKtMiW9yBsikQ0HVHAQ== X-Google-Smtp-Source: AHgI3Ib+qh1DebdZzPZxsnEudz1z/wCXKyh7nmayAL3Bi8a0Gg4d+2lnrMXdmTsD/3lK3/4DYfSpdw== X-Received: by 2002:a1c:790c:: with SMTP id l12mr1639693wme.11.1549037250975; Fri, 01 Feb 2019 08:07:30 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 16:06:33 +0000 Message-Id: <20190201160653.13829-28-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190201160653.13829-1-peter.maydell@linaro.org> References: <20190201160653.13829-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::335 Subject: [Qemu-devel] [PULL 27/47] 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: , 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 Message-id: 20190125182626.9221-4-peter.maydell@linaro.org --- 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