From nobody Fri Nov 7 18:54:09 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