From patchwork Thu Oct 11 20:51:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 148678 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2599486lji; Thu, 11 Oct 2018 13:58:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV63YGRdEIcI2Uktz3FLtpw4Ok9YpINLWyFELkJfOYznLlr4cWipLuriRhJ9vFIcafV3OY429 X-Received: by 2002:a37:d6c2:: with SMTP id p63-v6mr3192222qkl.190.1539291528506; Thu, 11 Oct 2018 13:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539291528; cv=none; d=google.com; s=arc-20160816; b=gbvYxQ5xXqRDpVADc09UpR5NKXUEvyK9OBpqOvPpABlac/zhJd42gt6ro2QKgmahYL 1MckLlb1t4bzjqcOeonF59chxRRQtRFdt4uYEAtR9tYFM2CrRnj1COVEcV9FTtm7fLZq TyNrQDjDVQnwZcs4WY/kZDOXYCbIs1iNdnJlRwiRofIzbUiJezFd2ieDEhe7Ge6vEhHp DV8itGeZk36TRsV8s8v+AJZi4XaFDKWJ15NHuzVLltI/huY3z96mv8J/yA7zwW0un59d O1mjHEUi8cmJOkLDgiZpTZfcXVLH7Trar9S0AOIk39amfN5Dbsugll0CVUfmu2mYd83+ G/vA== 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; bh=LNgl33bcGYxCeXHpbio/Rlmde9MWJEOYAK1mblGiRdQ=; b=WM0CeRmn/XHjEd3Ri3YwzisKMnt7AcPnfqOxjJsBQQ3FzDvYmybNxfFQFKHU8nS4eq f5zo/E16T4xBuAprzj0izacJa8Q75TMEprqDbsxKnrbFwH8Nm6bnYTWUa4h6G4xXbrQD +yLVxEixy6WZV9V9F0b9jALTjC/6E3aO+55mIRp/TA5yinDabc6oC61K3SDoG7TQyEgA 6LQUsMkRySm86u4BkPlWlcajfRrryeJfn7B1kFJYbwolWUW6x7OIMXWsTr0W7PwOeojJ CH5I3K+yL/Fafu/a6SgQofEqFTJjsEhiYdubQrRlatGvXMJIqeG1PdNgaEv6KDP7mN4w hVrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UAjOBOvO; 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 56si7587971qvg.212.2018.10.11.13.58.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 11 Oct 2018 13:58:48 -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=UAjOBOvO; 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]:37097 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAi2h-00035O-VJ for patch@linaro.org; Thu, 11 Oct 2018 16:58:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAhwn-0006pu-N1 for qemu-devel@nongnu.org; Thu, 11 Oct 2018 16:52:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAhwk-0005qW-HE for qemu-devel@nongnu.org; Thu, 11 Oct 2018 16:52:41 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:35122) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gAhwk-0004Vi-54 for qemu-devel@nongnu.org; Thu, 11 Oct 2018 16:52:38 -0400 Received: by mail-pl1-x62c.google.com with SMTP id f8-v6so4800477plb.2 for ; Thu, 11 Oct 2018 13:52:26 -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=LNgl33bcGYxCeXHpbio/Rlmde9MWJEOYAK1mblGiRdQ=; b=UAjOBOvOve0vBvxVslb6RUoxja2q+Mocn/qwOk4ptmsy2dhj7tPxM+mBDlnMTw2TNS J3F8/2zOMHDcM3NSXnuW/ZsXaqM5AQLcd8jlscPmlaNXh0xaX62YLOHJoJNh2OaQNbWR w/i5g7+NJQv4cCS8WorM15kLI7YKhYeLGjVYk= 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=LNgl33bcGYxCeXHpbio/Rlmde9MWJEOYAK1mblGiRdQ=; b=mA80G1lBbOZYnTwSesUenToHHMmJChh7wa3lIcRXTihTmiwvtMui6QtL0zRuzu6Yhk sRAZiJHAHek4CLKrOQoXunITPaPoLC3s9be0G3QGp160LBro4WKEfDXuAfH88pUNVIn+ 9/0DF/NeXZIW/WAQhXWgjYVcvCi08NXXI5sCb3z9fAdNmvPGkUa5aL89PqCOhGIH4CKg AJ4QX3XO69HoiK5qlui034AbewCcupBUcaKaoNK2tQGdrQejBagzxlmHCkVgnU+Dh9BH pJr4YonmqNGfZ9TvIYuXl8dxdecmvuVI2bK3EyPr2OjyAkBFA/hDJlXeOssNyggOuRq0 wolg== X-Gm-Message-State: ABuFfoiDQ0Hs8N9FAITk1sG6/DYav6nRe/2INtdsEN+FST8K8KzHoxda 1tta5f2nRKJe5tGmGVmYm0Ra26+eW7g= X-Received: by 2002:a17:902:8a93:: with SMTP id p19-v6mr2970180plo.41.1539291145090; Thu, 11 Oct 2018 13:52:25 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-8-179.tukw.qwest.net. [97.113.8.179]) by smtp.gmail.com with ESMTPSA id h87-v6sm34707866pfj.78.2018.10.11.13.52.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Oct 2018 13:52:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 11 Oct 2018 13:51:57 -0700 Message-Id: <20181011205206.3552-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181011205206.3552-1-richard.henderson@linaro.org> References: <20181011205206.3552-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::62c Subject: [Qemu-devel] [PATCH 11/20] target/arm: Use gvec for NEON_3R_VMUL 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/translate.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) -- 2.17.1 diff --git a/target/arm/translate.c b/target/arm/translate.c index fae132791a..e195efcc55 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -5959,6 +5959,19 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) vec_size, vec_size); } return 0; + + case NEON_3R_VMUL: /* VMUL */ + if (u) { + /* Polynomial case allows only P8 and is handled below. */ + if (size != 0) { + return 1; + } + } else { + tcg_gen_gvec_mul(size, rd_ofs, rn_ofs, rm_ofs, + vec_size, vec_size); + return 0; + } + break; } if (size == 3) { /* 64-bit element instructions. */ @@ -6065,12 +6078,6 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) return 1; } break; - case NEON_3R_VMUL: - if (u && (size != 0)) { - /* UNDEF on invalid size for polynomial subcase */ - return 1; - } - break; case NEON_3R_VFM_VQRDMLSH: if (!arm_dc_feature(s, ARM_FEATURE_VFP4)) { return 1; @@ -6183,16 +6190,8 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) } break; case NEON_3R_VMUL: - if (u) { /* polynomial */ - gen_helper_neon_mul_p8(tmp, tmp, tmp2); - } else { /* Integer */ - switch (size) { - case 0: gen_helper_neon_mul_u8(tmp, tmp, tmp2); break; - case 1: gen_helper_neon_mul_u16(tmp, tmp, tmp2); break; - case 2: tcg_gen_mul_i32(tmp, tmp, tmp2); break; - default: abort(); - } - } + /* VMUL.P8; other cases already eliminated. */ + gen_helper_neon_mul_p8(tmp, tmp, tmp2); break; case NEON_3R_VPMAX: GEN_NEON_INTEGER_OP(pmax);