From patchwork Thu Jun 18 04:25:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 190987 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp1063393ilo; Wed, 17 Jun 2020 21:34:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrovTSBFfn16r/SoKXndk0Pm5h3iWTaiMGS1QEoK0l4U/YgGZTrVf7Sx/cUNYxXLedFVH2 X-Received: by 2002:a25:d40b:: with SMTP id m11mr3552669ybf.66.1592454890504; Wed, 17 Jun 2020 21:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592454890; cv=none; d=google.com; s=arc-20160816; b=iCPowkHBni3HD/V8kjdIA1fyDGE1dyLZSSdJNPo0MX9qb9VVsZZqm25wwAd37J14i+ 6gJTPZQOynHx3yJiGbRrdkvfhGdvovuTmJdH5KCqRmeI+kTitId+7NPUUdIicJARP8R4 ycxK1miSofWorLKf2QtuS1Uo82qzPvTxgcbWmzvDvzu/DBVeuljO9AfCkGkhthqWVRzK 5BZ0I5Ck9qhvdgTpruyfuj3TOC3n8LZzRR2cZUkPJ0/wY72yFNjPiH71TLGctMQ+XQNO dnj+CIcz9nnSVNAzp3wO+MGDoxd19jT6tCBecIad45jPYRPD5aafHMqtKw+EDjFM096L 0k8w== 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=LZL+dDMhzUt93arvpWQQJPSTREHQqTYfTwzJjttMTfc=; b=ekmpHoyyMzNrqHxQxdN8oKrsPXEguMGXsIDj3gpTyhldFbLNQ8Htmw7TuxrSOGM7f5 8UL+Gw0WortZlOaorroNC4tsKWlNJ8BOyYg2G84/Ndt9hACFwo2sdGuHW26uv0ZIKtdS 95xFYm79jbtaYdwQNvkN9XL0lqWlqLkIDlLC1bjtFrieAgB1vlRbIjpYg9R9i4E0rMco cd5twyQxK1QaDh1SLQ5m6qLsbXFwx13rE6s/ice5rW2+EUD3j94ZH6VEK7myHLsmSN+f gmEa2JhFsxtjKm9j8GgwFhPTnIatKnqrf/8UC3xCN+Vl822X136f+vBNH3FeHocFRSQp AMgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iSNvsbF7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id l7si1631048ybj.78.2020.06.17.21.34.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 21:34:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iSNvsbF7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:54218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlmGH-0007X9-S5 for patch@linaro.org; Thu, 18 Jun 2020 00:34:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlm9N-0003Dd-6V for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:27:41 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:43158) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlm9G-0002R8-UL for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:27:40 -0400 Received: by mail-pl1-x641.google.com with SMTP id g12so1898900pll.10 for ; Wed, 17 Jun 2020 21:27:34 -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=LZL+dDMhzUt93arvpWQQJPSTREHQqTYfTwzJjttMTfc=; b=iSNvsbF77Gs3ZEB4ZL0L3TJ6R9mD8vfmYlDEA08drQ+UL+gf9XvNABdK8LhALR2HHa wymk4P2IMvX3Cr1IIWuy0usxOlh1pSqnUkulhhNCEWNQ3+BM1v2PViH+ahhDeO8pIh6i SB5qLRfYKNNp2iDiWV2moNOvBckB/vp5tstEqcdSQUAIhM3AkdXLgX62MX1O5vhzPfrs wygBVxZ1ods5RM1P2bo3rkV4vhOg1KAw4BDNWT6jQtUsyfXKXB2xoosvmOdXktOl/7t+ YwJ+LLhd9f6svrDZz2XKgS0MxgqgfWnCBAflsCQQQ4C43jsQE7tvNO5afRBFRVjbBoPM 4eyQ== 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=LZL+dDMhzUt93arvpWQQJPSTREHQqTYfTwzJjttMTfc=; b=j4VGLArVFdYw3FRfd/KUhU96Qm2AGE6FSP4d5Tg626ILNPDUB6erM3pbx7Zl6cl9Iu 5IMAFiMXaqk+jlNfkHzNT51Sj9KI+ob8Qrw58sJDzNicfhzbIYu1qPjB10HgR8wd8LZY 7ZSQsERHj7IH0OW1SbdmaWjVA7GkCtj0GiEDKjNulOQPZq6RXyYqX0H4wBUSCk7Yt1Ga gFFJ21z7GhCbPOQeF8Bs8tg/ByAyfN3j1HJPW5JsvUnx7WblY1tim27/QUDqN8rZ+wyU 324rPDwBM6Uzs/cdyubidGo4XxdadtnLiDg2+R/J8epy6xRXDOfXWPgjtoDt43UG5O9L kwnA== X-Gm-Message-State: AOAM533pMTGO7DPbXluRGLquyquDRARZ0pz+WjtxO7BCuOo/2bk9dXfh r3VCk4CKp9zCEx8v1Q71eJm5xA5CMUA= X-Received: by 2002:a17:902:744b:: with SMTP id e11mr2063612plt.71.1592454453256; Wed, 17 Jun 2020 21:27:33 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id u61sm964897pjb.7.2020.06.17.21.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 21:27:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 012/100] target/arm: Split out gen_gvec_ool_zzz Date: Wed, 17 Jun 2020 21:25:16 -0700 Message-Id: <20200618042644.1685561-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200618042644.1685561-1-richard.henderson@linaro.org> References: <20200618042644.1685561-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::641; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x641.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: qemu-arm@nongnu.org, steplong@quicinc.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 53 +++++++++++++------------------------- 1 file changed, 18 insertions(+), 35 deletions(-) -- 2.25.1 diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 3e9bbaca94..6bdd62d4f2 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -142,6 +142,17 @@ static int pred_gvec_reg_size(DisasContext *s) return size_for_gvec(pred_full_reg_size(s)); } +/* Invoke an out-of-line helper on 3 Zregs. */ +static void gen_gvec_ool_zzz(DisasContext *s, gen_helper_gvec_3 *fn, + int rd, int rn, int rm, int data) +{ + unsigned vsz = vec_full_reg_size(s); + tcg_gen_gvec_3_ool(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + vec_full_reg_offset(s, rm), + vsz, vsz, data, fn); +} + /* Invoke an out-of-line helper on 2 Zregs and a predicate. */ static void gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn, int rd, int rn, int pg, int data) @@ -769,11 +780,7 @@ static bool do_zzw_ool(DisasContext *s, arg_rrr_esz *a, gen_helper_gvec_3 *fn) return false; } if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vsz, vsz, 0, fn); + gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, 0); } return true; } @@ -947,11 +954,7 @@ static bool trans_RDVL(DisasContext *s, arg_RDVL *a) static bool do_adr(DisasContext *s, arg_rrri *a, gen_helper_gvec_3 *fn) { if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vsz, vsz, a->imm, fn); + gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, a->imm); } return true; } @@ -1012,11 +1015,7 @@ static bool trans_FTSSEL(DisasContext *s, arg_rrr_esz *a) return false; } if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vsz, vsz, 0, fns[a->esz]); + gen_gvec_ool_zzz(s, fns[a->esz], a->rd, a->rn, a->rm, 0); } return true; } @@ -2067,11 +2066,7 @@ static bool trans_TBL(DisasContext *s, arg_rrr_esz *a) }; if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vsz, vsz, 0, fns[a->esz]); + gen_gvec_ool_zzz(s, fns[a->esz], a->rd, a->rn, a->rm, 0); } return true; } @@ -2244,11 +2239,7 @@ static bool do_zzz_data_ool(DisasContext *s, arg_rrr_esz *a, int data, gen_helper_gvec_3 *fn) { if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vsz, vsz, data, fn); + gen_gvec_ool_zzz(s, fn, a->rd, a->rn, a->rm, data); } return true; } @@ -3373,11 +3364,7 @@ static bool trans_DOT_zzz(DisasContext *s, arg_DOT_zzz *a) }; if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vsz, vsz, 0, fns[a->u][a->sz]); + gen_gvec_ool_zzz(s, fns[a->u][a->sz], a->rd, a->rn, a->rm, 0); } return true; } @@ -3390,11 +3377,7 @@ static bool trans_DOT_zzx(DisasContext *s, arg_DOT_zzx *a) }; if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vsz, vsz, a->index, fns[a->u][a->sz]); + gen_gvec_ool_zzz(s, fns[a->u][a->sz], a->rd, a->rn, a->rm, a->index); } return true; }