From patchwork Thu Apr 30 18:09:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185978 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp2455627ilf; Thu, 30 Apr 2020 11:30:28 -0700 (PDT) X-Google-Smtp-Source: APiQypKf85qyle12SIkQgMki2R2GLP/07jZGAkcX6NOxQG/4J+gFzArQmAKfGVvcAlVl7WM4VZD3 X-Received: by 2002:a37:450:: with SMTP id 77mr4788336qke.316.1588271428417; Thu, 30 Apr 2020 11:30:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588271428; cv=none; d=google.com; s=arc-20160816; b=vZPitVGGYxX4hVuJIkd815oYKHpS9yS7X0PcUrDBUNvyj/vcrz4t/Ba0QapmCgXHhK GqN7/Rx7IyEHJAJG1y/VIRI4NZrMJf1zUTeP20T2fi8dQhrpEuknZ3VVYcZpUYYQl7Sn O4+A8eoxXHktCW0UVPANcQa2l4vpZ164495Wemw9QVq5WXsvlGcxEHe8316cBjP3p2C3 HeOwK8GtDXamBU2tj9Y85oUTLpNirtzsP0Vaa+dhKq72vDtxHOOFhgDX0r9VecWRrWHL 6AArjE/PNnphGtDQmIaN/sHfFNo8tRAVTQUFWIxEcEtKjsXzVlbtlNWd/pnIUxrE8shq 4aIA== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=gCVovwKxXypZUnAhID6Hfz/S5fE2/epvyEFf8xPlaPE=; b=jB8HOpF9t4AZNcHm1QGl9MVL/d/gtD2Zkm0Cco27VH2DMtRjlmeizK9xQwahYqzKJI rEBqeQKzUGZQdncz7+sZ4pRRi4i8Os1err9ZKZjlnClyO3caDMeq7wrFFhpcgoXfQBy+ Tk+mzY5csfAAYM3WWons4qwnsCgCnV3Q6P+r+yGl/a9/aTC83ViwK/zcyyyPrB/+cSoq RKXlRLN5f5sSYiNqbvEfKXJ9F9D8XZJyyGSHU2UOBwyhXz5t+HhUhORkdB9dxmO6tg8G XxJ+M88ZiatedX1/PRoK86KgPxgJbx6ssuHguLPcj3gflzvC2T3GGz8ZWt2MKivnP9mg 39uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AyNAyUz3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:470:142::17]) by mx.google.com with ESMTPS id g8si357574qvl.201.2020.04.30.11.30.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Apr 2020 11:30:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) client-ip=2001:470:142::17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AyNAyUz3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUDx5-0005ye-R4 for patch@linaro.org; Thu, 30 Apr 2020 14:30:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36340) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUDeI-0001no-0Z for qemu-devel@nongnu.org; Thu, 30 Apr 2020 14:11:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUDdn-0001CP-Kv for qemu-devel@nongnu.org; Thu, 30 Apr 2020 14:11:01 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:53852) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUDdn-0001BY-7e for qemu-devel@nongnu.org; Thu, 30 Apr 2020 14:10:31 -0400 Received: by mail-wm1-x343.google.com with SMTP id k12so2964936wmj.3 for ; Thu, 30 Apr 2020 11:10:30 -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 :mime-version:content-transfer-encoding; bh=gCVovwKxXypZUnAhID6Hfz/S5fE2/epvyEFf8xPlaPE=; b=AyNAyUz3IwmAVdTLv8WJ5f/oWKKJqbSIt6kBEbA57zG8eL9JvNOQpqYRpQ3yGlIx4+ foIyUkXJDakIm+V7gBaM3eLQPbQjflR4rmFSF8mIcKEV841mUR5B2IAUhcmQvpx/LhJx DJbMkw3jtfpFC+Ikmfx8K1IOv7Ar4bsXUMnTSODCBzAZS/4sHB9lYxZpwKNp6RFLwF8/ Ttglr6rXokYjSrlHH0GSAsKEkZkALQ0KAVs/nrmACzyuVAgGUuSp2LuMoByV7xLjBFG0 2QAAtAeaclcsFMpBLHQrJAGL5fiSbYXZQCfQ7MqBwvUeU6HCCQmTpTDSbNhyOd0KblSk uQDA== 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=gCVovwKxXypZUnAhID6Hfz/S5fE2/epvyEFf8xPlaPE=; b=FngLqpkzO4Uxri7h1S7qO/kriOjONqzaTSfPct7sV2T0ThVG09W72bZQQ86SzeG/+/ 763URVvYZAO9ik1eChcS0kFWBFt6LWhEkPolatzmcItU+VYbQp9VadVEoNmDJfIwn/OB PsPVsXzMXlZV01rWJgKjT4VVeel1dVbKLbopBft1RhBrVcCFjAfWg0uNLSmjO02BzDZ5 9GtE7zZd5pLRs3lKQv+cSQzDMhH/m2oz91VaDwEAga/Ro7FLWM+/s58pg3tk6c8zX5jn 4g3Lo6Y8kzj1cftO9+gUgOOONwfIGtJW6tHWHj5LnIKUoOMbjOvXIvoULSsAa7hXv/gE N35w== X-Gm-Message-State: AGi0Pub7xKI3pYUEoI2NUdMXKtCkneNBu2iMVbkKascKZtaaNiXer8wa OXgQt6eADsOtsOSRrQrt5qgyrw== X-Received: by 2002:a1c:7d4b:: with SMTP id y72mr4418635wmc.11.1588270229454; Thu, 30 Apr 2020 11:10:29 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id t8sm652421wrq.88.2020.04.30.11.10.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2020 11:10:28 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 18/36] target/arm: Convert Neon 3-reg-same VQADD/VQSUB to decodetree Date: Thu, 30 Apr 2020 19:09:45 +0100 Message-Id: <20200430181003.21682-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200430181003.21682-1-peter.maydell@linaro.org> References: <20200430181003.21682-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::343 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Convert the Neon VQADD/VQSUB insns in the 3-reg-same grouping to decodetree. Signed-off-by: Peter Maydell --- target/arm/translate-neon.inc.c | 15 +++++++++++++++ target/arm/translate.c | 14 ++------------ target/arm/neon-dp.decode | 6 ++++++ 3 files changed, 23 insertions(+), 12 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/target/arm/translate-neon.inc.c b/target/arm/translate-neon.inc.c index 952e4456f5e..854ab70cd79 100644 --- a/target/arm/translate-neon.inc.c +++ b/target/arm/translate-neon.inc.c @@ -653,3 +653,18 @@ static void gen_VTST_3s(unsigned vece, uint32_t rd_ofs, uint32_t rn_ofs, tcg_gen_gvec_3(rd_ofs, rn_ofs, rm_ofs, oprsz, maxsz, &cmtst_op[vece]); } DO_3SAME_NO_SZ_3(VTST, gen_VTST_3s) + +#define DO_3SAME_GVEC4(INSN, OPARRAY) \ + static void gen_##INSN##_3s(unsigned vece, uint32_t rd_ofs, \ + uint32_t rn_ofs, uint32_t rm_ofs, \ + uint32_t oprsz, uint32_t maxsz) \ + { \ + tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc), \ + rn_ofs, rm_ofs, oprsz, maxsz, &OPARRAY[vece]); \ + } \ + DO_3SAME(INSN, gen_##INSN##_3s) + +DO_3SAME_GVEC4(VQADD_S, sqadd_op) +DO_3SAME_GVEC4(VQADD_U, uqadd_op) +DO_3SAME_GVEC4(VQSUB_S, sqsub_op) +DO_3SAME_GVEC4(VQSUB_U, uqsub_op) diff --git a/target/arm/translate.c b/target/arm/translate.c index 7e4a57157c2..538e4be8f1b 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -4848,18 +4848,6 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) } return 1; - case NEON_3R_VQADD: - tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc), - rn_ofs, rm_ofs, vec_size, vec_size, - (u ? uqadd_op : sqadd_op) + size); - return 0; - - case NEON_3R_VQSUB: - tcg_gen_gvec_4(rd_ofs, offsetof(CPUARMState, vfp.qc), - rn_ofs, rm_ofs, vec_size, vec_size, - (u ? uqsub_op : sqsub_op) + size); - return 0; - case NEON_3R_VMUL: /* VMUL */ if (u) { /* Polynomial case allows only P8. */ @@ -4892,6 +4880,8 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) case NEON_3R_VTST_VCEQ: case NEON_3R_VCGT: case NEON_3R_VCGE: + case NEON_3R_VQADD: + case NEON_3R_VQSUB: /* Already handled by decodetree */ return 1; } diff --git a/target/arm/neon-dp.decode b/target/arm/neon-dp.decode index b89ea6819a9..ab59b349aaa 100644 --- a/target/arm/neon-dp.decode +++ b/target/arm/neon-dp.decode @@ -42,6 +42,9 @@ @3same .... ... . . . size:2 .... .... .... . q:1 . . .... \ &3same vm=%vm_dp vn=%vn_dp vd=%vd_dp +VQADD_S_3s 1111 001 0 0 . .. .... .... 0000 . . . 1 .... @3same +VQADD_U_3s 1111 001 1 0 . .. .... .... 0000 . . . 1 .... @3same + @3same_logic .... ... . . . .. .... .... .... . q:1 .. .... \ &3same vm=%vm_dp vn=%vn_dp vd=%vd_dp size=0 @@ -54,6 +57,9 @@ VBSL_3s 1111 001 1 0 . 01 .... .... 0001 ... 1 .... @3same_logic VBIT_3s 1111 001 1 0 . 10 .... .... 0001 ... 1 .... @3same_logic VBIF_3s 1111 001 1 0 . 11 .... .... 0001 ... 1 .... @3same_logic +VQSUB_S_3s 1111 001 0 0 . .. .... .... 0010 . . . 1 .... @3same +VQSUB_U_3s 1111 001 1 0 . .. .... .... 0010 . . . 1 .... @3same + VCGT_S_3s 1111 001 0 0 . .. .... .... 0011 . . . 0 .... @3same VCGT_U_3s 1111 001 1 0 . .. .... .... 0011 . . . 0 .... @3same VCGE_S_3s 1111 001 0 0 . .. .... .... 0011 . . . 1 .... @3same