From patchwork Thu Oct 11 20:51:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 148674 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2597166lji; Thu, 11 Oct 2018 13:55:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV600JlxFrc5f60SFBo9I51BK69GAas47Su9VR+CWcwgkTWFZ0M1d78TLljpRtzu5meCywM+8 X-Received: by 2002:a0c:e004:: with SMTP id j4mr3304404qvk.90.1539291357954; Thu, 11 Oct 2018 13:55:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539291357; cv=none; d=google.com; s=arc-20160816; b=Ba86ThOS9Dd4aCDOfifhQ22ASWTyUf+HLuQ4y5ggnP9hhzYStyVDchocy7mT+sR8Bw LpwB4W9mCsR7I2XOodUyuRCp/8Ab25hPS8NMA+8Zwh/5nQYXH1CU3CUbolWfUh5Yj2QT 8fhw+wIzWv2ueILnD1wws40cUSRFvYHxZKODi2J94aHvUO7M6S5U+B+4e7E48Py8O6To Dymq++BN1bYY2VCT9srDgH+eB22d+fZSRRcOtL+03lG78MPw8P7JuibtO8OnbYQeVFzX YtxX97p737kzMv2f0D908NbQ54isokTQK4ysnGUhAfRaJNHuVfoLsSlMs/R5gCBVBWun BOJA== 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=qV4tGEFouItBhOrrDqEGuw7eXva/C6of65d/ak0Trck=; b=Eesaiu64tLSDBQT9FmG1Vo1kVnCrqTCnXiNk22kNyB+vFeiWDEILcHXdIrdGddzW+W 2kuuxnBHKCf11cVkVk5vaRdtNMGqH4R+pFvDLSx97Hp4jFObUtArGUaQCEEfC5OzFh7u 13YN6QL+fUbTfiTE9BrHAFnQ+PwlcU0viOw2mpr3EEaIF2yN3YU14MqKFxXkGtzdHM8/ XfDoVSCRdlNfEQkfFeJ65wP4lc2v8M8r5QWLjmcRZFDgU/0rzA8E1qza9TCojr4TkL4U KjsDc853ItnOOC7t6CtIrWG5BevJ7h5XucLk568qD0QEg69cBXVAQXlCWc0s81ofapNX KhhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DJjY8tFf; 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 d2-v6si2583665qtp.196.2018.10.11.13.55.57 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 11 Oct 2018 13:55:57 -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=DJjY8tFf; 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]:37083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAhzx-0000ij-At for patch@linaro.org; Thu, 11 Oct 2018 16:55:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAhwj-0006lw-EN for qemu-devel@nongnu.org; Thu, 11 Oct 2018 16:52:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAhwh-0005Xf-5j for qemu-devel@nongnu.org; Thu, 11 Oct 2018 16:52:37 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:43486) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gAhwf-0004EA-5W for qemu-devel@nongnu.org; Thu, 11 Oct 2018 16:52:33 -0400 Received: by mail-pg1-x532.google.com with SMTP id 80-v6so4721210pgh.10 for ; Thu, 11 Oct 2018 13:52:23 -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=qV4tGEFouItBhOrrDqEGuw7eXva/C6of65d/ak0Trck=; b=DJjY8tFfN9HTUkuKnHkYGFf1k8ytK3sWB76b1VrA/1L+aWjwVa23FXj/DOtv+bq1aZ ESQS3w2eLBbUHwvnk3nSDY0fOp0HEhTSJHzs+0rYAxsPhuqUFHyTZlivLcDNDxizZA8t M9wkp5B6ITVX41BocblVWMm9J2gM0gAzXYDNE= 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=qV4tGEFouItBhOrrDqEGuw7eXva/C6of65d/ak0Trck=; b=J+ynGsMbmZEWlRevQ7XaBjiNn1eDlcA94oD68KUsSrUbhdBjvmeIfPIkA3fI2NUBaN of+0bSjFlV7iOjPU+2kxK0mD4APM/yLtJbSCFdu1XVMVgSdNqlBr6BAVy9xitFnN7njH cqN2dqjCDxghZ9X67RbtDsYOo7SY+T6ILu0Uhbw7rb4itjUTgMW27EZ/t63sHcBLXDWr iqxtpY2fGf7YyEy/KmNArw77zUo7QNfGBvyvM3O3a3X5FZBKoXvDxU/RPFE521FxFLQX QbAME9mYzijleffKruikpjShANmempLqu2teJmWVaPT7ZTDs/f/HeXuQwJNXFL4T51qO 6nQg== X-Gm-Message-State: ABuFfojCXW48FF9TdjgNc37bighhccyGKotv4Cy5OVZPYoeKPGl1gd6p NKTVKA+jjQX9Mi1/pA5gNI+0MP/el5g= X-Received: by 2002:a63:b25e:: with SMTP id t30-v6mr2784652pgo.401.1539291142188; Thu, 11 Oct 2018 13:52:22 -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.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Oct 2018 13:52:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 11 Oct 2018 13:51:55 -0700 Message-Id: <20181011205206.3552-10-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::532 Subject: [Qemu-devel] [PATCH 09/20] target/arm: Use gvec for NEON_3R_VADD_VSUB insns 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 | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) -- 2.17.1 diff --git a/target/arm/translate.c b/target/arm/translate.c index 4ab9f69b01..4dcd7123e9 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -5949,6 +5949,16 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) break; } return 0; + + case NEON_3R_VADD_VSUB: + if (u) { + tcg_gen_gvec_sub(size, rd_ofs, rn_ofs, rm_ofs, + vec_size, vec_size); + } else { + tcg_gen_gvec_add(size, rd_ofs, rn_ofs, rm_ofs, + vec_size, vec_size); + } + return 0; } if (size == 3) { /* 64-bit element instructions. */ @@ -6006,13 +6016,6 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) cpu_V1, cpu_V0); } break; - case NEON_3R_VADD_VSUB: - if (u) { - tcg_gen_sub_i64(CPU_V001); - } else { - tcg_gen_add_i64(CPU_V001); - } - break; default: abort(); } @@ -6147,18 +6150,6 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) tmp2 = neon_load_reg(rd, pass); gen_neon_add(size, tmp, tmp2); break; - case NEON_3R_VADD_VSUB: - if (!u) { /* VADD */ - gen_neon_add(size, tmp, tmp2); - } else { /* VSUB */ - switch (size) { - case 0: gen_helper_neon_sub_u8(tmp, tmp, tmp2); break; - case 1: gen_helper_neon_sub_u16(tmp, tmp, tmp2); break; - case 2: tcg_gen_sub_i32(tmp, tmp, tmp2); break; - default: abort(); - } - } - break; case NEON_3R_VTST_VCEQ: if (!u) { /* VTST */ switch (size) {