From patchwork Wed Feb 28 19:31:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 130063 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp137447lja; Wed, 28 Feb 2018 11:43:12 -0800 (PST) X-Google-Smtp-Source: AG47ELukRLJJwduJxnlp4V9YJNprhyJcaWQ69+s9b+0yQejFuUUtjkOMk8vjZya0tDJgNMfd0WjQ X-Received: by 10.129.1.21 with SMTP id 21mr12820925ywb.286.1519846992693; Wed, 28 Feb 2018 11:43:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519846992; cv=none; d=google.com; s=arc-20160816; b=IB9P/FusVgkB2P1vMDX3CSToT2YqHEIanlxOOJcfpDGZ5/qMJvHnFuq62pN6S7Ui2K Byv/fU2AStGR4Q+ic/iLhGvvjfziLlthhD+YommgeIxgxB/1+8ktSfwt3Eb8X7eK4C10 1f/xyZmpGfq+DatKyKSHyeomDp37Hw+k2EP6XHFooMrKiyBzxU/EaIOPTyAJiF/q3r7e 3nrJyI7Tf91PoYY80WFyszt3OAZZ5yjYVQQrx65kFMB6hcsd8wWU+wUveni1+BK91pgd KbaqkX+zl/gmGD4HQgf9Ddl1R9i7b5NWjygDB08P1uH3uHFcQuXh37UULGFTebdpayZw lS1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=G8wDRM28kIfKn4QAnTQXP7Nr7iSo1v6usJSUJDiitjY=; b=y3jJQVryZSSnQw1EPyoMrcditTQDa93lkMum6jjX7yuptmaTfTye1chmaj5MfJumBk 20ch0T00rZFs/aL5PgThK68qnfK1d/uyiEsjOtIoRiCjQqlicwfc5kryOWEN8eZojerM SNRSTfvv52ojmbKd3NXwtTBiWFcqtVnr2hGmrwBWkJ1m2NqzZ0foss/db/1v0RItmoQS id3I6HyDl6BP3plgjmhIxepemBqvRzDMkiCG9b/gYEinTZS9/E1kve5867cf5Yp4+Pr9 g7HcSpciiuBHjmWoF3Umn+q5rd/Rk8VpzWfAE9VUrQa7lOw7EgatGkc1DeOstZnNcxZj AnLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ky/BiErS; 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 z13si369693ywl.272.2018.02.28.11.43.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 28 Feb 2018 11:43:12 -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; dkim=fail header.i=@linaro.org header.s=google header.b=Ky/BiErS; 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]:46489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er7dA-0004eT-3m for patch@linaro.org; Wed, 28 Feb 2018 14:43:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er7SB-0003Yf-Nn for qemu-devel@nongnu.org; Wed, 28 Feb 2018 14:31:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er7SA-0006VC-RT for qemu-devel@nongnu.org; Wed, 28 Feb 2018 14:31:51 -0500 Received: from mail-pl0-x244.google.com ([2607:f8b0:400e:c01::244]:36888) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1er7SA-0006Ug-Lj for qemu-devel@nongnu.org; Wed, 28 Feb 2018 14:31:50 -0500 Received: by mail-pl0-x244.google.com with SMTP id ay8-v6so2120098plb.4 for ; Wed, 28 Feb 2018 11:31:50 -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; bh=G8wDRM28kIfKn4QAnTQXP7Nr7iSo1v6usJSUJDiitjY=; b=Ky/BiErSijmkbBjXnVW0X2kDLLF2HkcYkRWayi1dKCWKcuRyeiwFBeiMlXTvgY9dLo hjeMv8CzsgdwKQwQK86xAiOaSc6npScr0gLupPKG664pGgr8/a4HQ7D4aP2pJbUowF8I SqOM1BaQ2lx4soeoI1zQ8XGEFA4i8wxi+L0/g= 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; bh=G8wDRM28kIfKn4QAnTQXP7Nr7iSo1v6usJSUJDiitjY=; b=Dcts0fhlS1R3i0vLi8hQXj33aHhtBLJiFbTCS06alqa+H4y7fLuohQgavQAT5lsSz3 9JxN1dgHxiTOedDRJPsHnjoupeK/lqgVes+MoCEJMvgduKLZBBPHnLDZmamHuiEbxmi0 DmPnmo5Ap8MvyUtiKYXcBVCZXc7XAqNxmK/YTkaLBHM1QdlEbcdS5n33z3YhvU6ToPgq jXXmZzD3pqQ8sNXxAvTBhQ0Y8vIxTPDcU73/60nqqoqu5uJC+YEnEXooYvj5CP0fevaT LTQ6zTq8i/S4AIwWXR6rxLmvkEzEvZ2OyrZfwm6BQGGVbBgKKxeTkgEOPu80NvHjuNn6 PDHA== X-Gm-Message-State: APf1xPBDRwUUqGHLAaoLYktmpdMMNBT51oqT6QvYpQc0efZC9V4FvN+v eCd04S0TL1fMMb8jrXcRsdfONJREawY= X-Received: by 2002:a17:902:a512:: with SMTP id s18-v6mr18972966plq.296.1519846309446; Wed, 28 Feb 2018 11:31:49 -0800 (PST) Received: from cloudburst.twiddle.net (97-113-169-147.tukw.qwest.net. [97.113.169.147]) by smtp.gmail.com with ESMTPSA id k185sm4200212pgk.94.2018.02.28.11.31.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2018 11:31:48 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 28 Feb 2018 11:31:24 -0800 Message-Id: <20180228193125.20577-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180228193125.20577-1-richard.henderson@linaro.org> References: <20180228193125.20577-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::244 Subject: [Qemu-devel] [PATCH v3 15/16] 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Happily, the bits are in the same places compared to a32. Signed-off-by: Richard Henderson --- target/arm/translate.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) -- 2.14.3 Reviewed-by: Peter Maydell 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)) {