From patchwork Fri Mar 2 11:06:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 130534 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp1169478lja; Fri, 2 Mar 2018 03:38:43 -0800 (PST) X-Google-Smtp-Source: AG47ELtDAPjWYghYmDMhzBMhylQioHDv0ovxkUjWRd5dd3oq6saGxHdwg9zktYpO/ZViLxck32In X-Received: by 2002:a25:6043:: with SMTP id u64-v6mr3226317ybb.202.1519990723882; Fri, 02 Mar 2018 03:38:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519990723; cv=none; d=google.com; s=arc-20160816; b=0MhikcVbMMaUjQC0ha3b4QLCsKYvXCCnQy8AiFB2+7CJaxLwqGC9yfB6ucHBlKlVZy 149fyyGTj8cpkcV4oe8cfNibRMwqzBNAZDpLo+ysDcuy4txJUImFT1rCroEjwk2iu9K+ yZzoc4CazgwSTvi/xK4IQa/W0ewY3DofsyH2m6PtGw9/N5DVih58Cb7JRx4TfRSpWgdE Adi2LK8RgIkj6eUcB1FxiAuqm+mtUqXoj/vlxFuio21pW3rjtlzQ+omYL/f3U8ypcGjd dwE6V8z2roXy+OMVI3+kcILFUj0YV221+U+B1RC8D/Hv1yRXso84b2TV11mkXGtfNf90 sUUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=TZqz8z8cOSmJ6rDZHKpJzOHAHFDsERVr0x7+q2Dd6Qo=; b=wZBXIlHzmkyM2ce7M/LXdTt3z7VTV+Xb9RzV8OId3/sFLQ6A2sKzq+noP3DQzI3gq4 Pu8FpSjW66+3ygreHtYvFuDf75/mWreBCMvuOnHN1r2wOlVo0TWorwRV35atfhOk9Xou ZE6qp+9THBFEEz5DKp4aVXm7LHcWbCse/DsIGFDrziLBjZ7A8UnJo+8CQjJdLvT3uaMi RGpSM5kN3v2xoc0/gZVNXPd+SiDbVJRVfkITbOjuYd+wIddr0szb45xMptbQ3WRW8Ovs L4CSwMzjab5CwgqUAZsIxbMkF6OB0Xgcx5pCdksE7KAgqoIUHgvabuLhvt4MVLjScMgZ lwFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id c189-v6si898256ybb.229.2018.03.02.03.38.43 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 02 Mar 2018 03:38:43 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erj1P-0005HT-7D for patch@linaro.org; Fri, 02 Mar 2018 06:38:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43681) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eriWs-0003BG-7O for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:07:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eriWr-000568-Dh for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:07:10 -0500 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:46782) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eriWr-00055M-6e for qemu-devel@nongnu.org; Fri, 02 Mar 2018 06:07:09 -0500 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1eriWq-0001Ro-2y for qemu-devel@nongnu.org; Fri, 02 Mar 2018 11:07:08 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 2 Mar 2018 11:06:39 +0000 Message-Id: <20180302110640.28004-39-peter.maydell@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180302110640.28004-1-peter.maydell@linaro.org> References: <20180302110640.28004-1-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 38/39] target/arm: Decode t32 simd 3reg and 2reg_scalar extension 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Happily, the bits are in the same places compared to a32. Signed-off-by: Richard Henderson Message-id: 20180228193125.20577-16-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) -- 2.16.2 diff --git a/target/arm/translate.c b/target/arm/translate.c index 3ad8b4031c..ba6ab7d287 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -10774,7 +10774,19 @@ static void disas_thumb2_insn(DisasContext *s, uint32_t insn) default_exception_el(s)); break; } - if (((insn >> 24) & 3) == 3) { + if ((insn & 0xfe000a00) == 0xfc000800 + && arm_dc_feature(s, ARM_FEATURE_V8)) { + /* The Thumb2 and ARM encodings are identical. */ + if (disas_neon_insn_3same_ext(s, insn)) { + goto illegal_op; + } + } else if ((insn & 0xff000a00) == 0xfe000800 + && arm_dc_feature(s, ARM_FEATURE_V8)) { + /* The Thumb2 and ARM encodings are identical. */ + if (disas_neon_insn_2reg_scalar_ext(s, insn)) { + goto illegal_op; + } + } else if (((insn >> 24) & 3) == 3) { /* Translate into the equivalent ARM encoding. */ insn = (insn & 0xe2ffffff) | ((insn & (1 << 28)) >> 4) | (1 << 28); if (disas_neon_data_insn(s, insn)) {