From nobody Mon Feb 9 17:25:07 2026 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