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