From patchwork Wed Oct 4 18:43:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 114809 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp6263724edb; Wed, 4 Oct 2017 11:58:05 -0700 (PDT) X-Received: by 10.55.157.133 with SMTP id g127mr14161404qke.296.1507143008660; Wed, 04 Oct 2017 11:50:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507143008; cv=none; d=google.com; s=arc-20160816; b=U7CHWyT3K0CcW9QfSFeqcJuJhcIvoLhfbkLCUULRIAm6YvZWJd3ifra57F/EcUmFYa jz17I5tU5mODShMArOCjSAdVipd59CNtHBYWbCa/hP+wxUNmocF9wf7x0NjyrpT7qsS9 +Qg5rsHEScda+GTvign2gzyE7mpnGddJ2KJPsn+6QvFc4txr7u78KzEwL20gv4xMDOUk 91/45SzANsvUZiqlctkhxlQW/+sJETTofcj5wsSPh+4dgMKddSCVK5M0xbi84WZuhZDD YlKqjaDqBYS93Kd/5sG8jpqf1dy1vm8gsF5rrkCxJNDqT5JzSYjw99BMrzE+9BKER3jk vROA== 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=uisqqIVUgFIrHPus0ecknWYXNomHu+IslQvv6H/fmw8=; b=n++NxvUJ8iP2JCvwA2DWZsWkZL8zQw/G1QqiJ9iOmOb+P4oSjzynNVtlrj3WtbpaKM Zmo+xQes31nCvFFA7s7FiKPA8CkAV/KwE1rVbzyXn+vItCTg/dfJHQ7akQeQut7oR+3K J08vbYxVKtG125TS3r3wMXwwYgMZ+OmG113RYBPaEj4lHhEMnMXyHIkl01YVwm4qR5lx DPPWXu1lIeKjvXAAtRhKmdpCDhftxabmlLf/iTEok77CduxKZ4RG4bpTqxQgN8jdKCd6 sUj9OCiiBE4zWT3rYVWFOcbiyPEhEUwU89AnazYqrTRoBokCr931Z8IVUDCcKhJyDH6S NISQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OX11Atcb; 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 y2si4345124qkc.14.2017.10.04.11.50.08 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 04 Oct 2017 11:50:08 -0700 (PDT) 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=OX11Atcb; 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]:36459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzokC-00053A-5F for patch@linaro.org; Wed, 04 Oct 2017 14:50:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzodu-0008DY-EU for qemu-devel@nongnu.org; Wed, 04 Oct 2017 14:43:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzodt-0002gV-MR for qemu-devel@nongnu.org; Wed, 04 Oct 2017 14:43:38 -0400 Received: from mail-qt0-x232.google.com ([2607:f8b0:400d:c0d::232]:53435) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dzodt-0002g5-Im for qemu-devel@nongnu.org; Wed, 04 Oct 2017 14:43:37 -0400 Received: by mail-qt0-x232.google.com with SMTP id 47so21026765qts.10 for ; Wed, 04 Oct 2017 11:43:37 -0700 (PDT) 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=uisqqIVUgFIrHPus0ecknWYXNomHu+IslQvv6H/fmw8=; b=OX11AtcbS23GaT9AN45kbl4z/hyqs8j+YXJruF71f6TJl+bOPofh9WhXVWAdq/8/ZV XTUw05l9jYfr9iniWwjVkCia6N9N2LSqm3U0S2mLFNNmp84Sqec2RGAg3mJx3eGmO2uR aO9nA6eUtDlUAcLLO0jdI1TWuTSwYsCKtYmzI= 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=uisqqIVUgFIrHPus0ecknWYXNomHu+IslQvv6H/fmw8=; b=p7W/9QXl2y1hemVevTsFJNa/3x/zQBQLzMi09k6PkQmZCXY60gP9YAcAWrT4RX6Y2y zY8hTFSiae8suiDFh46Yqqz9bQW3Qakyq/WYHXVTS6NmNDsDSXDxUltn7bjiWB3VU+y+ 6pTUUkRO+zHKxKX3JBUhhtffah6GT/qxCsLjvtXlkInkwMfWdbQ5V0hCojZ8wux/snw1 8lOxi+QYbOkkeE4KyZ8nMKiftTprphCRrXgSYFQ+YMYwHSdPlDROtlBgEfmUvZeTjO+l B8HAFhLUf3QyYzrr73osz/aE1V5gMflAade1VljG33AwkRb8qOVX/rPQpF7JIDQqZoFt H3Cg== X-Gm-Message-State: AMCzsaU5SMiqidXVEmGEzanMcS/LgK5PqcFA7AmDIFuS+sbbgwQLjdGg 5mvtLwcm5hlepAOcyf/L0L6s0vVgtRI= X-Google-Smtp-Source: AOwi7QADJbeOYSktv7pK1O8qrIGm4sWM8iFEqJ8yEZJ3LTXr7Elyik3S5uUhiiT9oO8ZRMYAmPvLiA== X-Received: by 10.37.189.136 with SMTP id f8mr4683256ybh.437.1507142616678; Wed, 04 Oct 2017 11:43:36 -0700 (PDT) Received: from bigtime.twiddle.net.com ([2606:a000:7a4a:b100::1b]) by smtp.gmail.com with ESMTPSA id o64sm3020464ywe.12.2017.10.04.11.43.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Oct 2017 11:43:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 4 Oct 2017 14:43:18 -0400 Message-Id: <20171004184325.24157-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171004184325.24157-1-richard.henderson@linaro.org> References: <20171004184325.24157-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::232 Subject: [Qemu-devel] [PATCH v1 05/12] target/arm: Decode aa64 armv8.1 scalar/vector x indexed element 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" Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) -- 2.13.6 Reviewed-by: Alex Bennée diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 0ea47a9dff..b02aad8cd7 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -10749,12 +10749,23 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn) is_long = true; /* fall through */ case 0xc: /* SQDMULH */ - case 0xd: /* SQRDMULH */ if (u) { unallocated_encoding(s); return; } break; + case 0xd: /* SQRDMULH / SQRDMLAH */ + if (u && !arm_dc_feature(s, ARM_FEATURE_V8_1_SIMD)) { + unallocated_encoding(s); + return; + } + break; + case 0xf: /* SQRDMLSH */ + if (!u || !arm_dc_feature(s, ARM_FEATURE_V8_1_SIMD)) { + unallocated_encoding(s); + return; + } + break; case 0x8: /* MUL */ if (u || is_scalar) { unallocated_encoding(s); @@ -10941,13 +10952,36 @@ static void disas_simd_indexed(DisasContext *s, uint32_t insn) tcg_op, tcg_idx); } break; - case 0xd: /* SQRDMULH */ + case 0xd: /* SQRDMULH / SQRDMLAH */ + if (u) { /* SQRDMLAH */ + read_vec_element_i32(s, tcg_res, rd, pass, + is_scalar ? size : MO_32); + if (size == 1) { + gen_helper_neon_qrdmlah_s16(tcg_res, cpu_env, + tcg_op, tcg_idx, tcg_res); + } else { + gen_helper_neon_qrdmlah_s32(tcg_res, cpu_env, + tcg_op, tcg_idx, tcg_res); + } + } else { /* SQRDMULH */ + if (size == 1) { + gen_helper_neon_qrdmulh_s16(tcg_res, cpu_env, + tcg_op, tcg_idx); + } else { + gen_helper_neon_qrdmulh_s32(tcg_res, cpu_env, + tcg_op, tcg_idx); + } + } + break; + case 0xf: /* SQRDMLSH */ + read_vec_element_i32(s, tcg_res, rd, pass, + is_scalar ? size : MO_32); if (size == 1) { - gen_helper_neon_qrdmulh_s16(tcg_res, cpu_env, - tcg_op, tcg_idx); + gen_helper_neon_qrdmlsh_s16(tcg_res, cpu_env, + tcg_op, tcg_idx, tcg_res); } else { - gen_helper_neon_qrdmulh_s32(tcg_res, cpu_env, - tcg_op, tcg_idx); + gen_helper_neon_qrdmlsh_s32(tcg_res, cpu_env, + tcg_op, tcg_idx, tcg_res); } break; default: