From patchwork Thu Jun 18 04:25:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 190984 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp1062298ilo; Wed, 17 Jun 2020 21:32:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyX4Nd3KQWWS0yoZievOKAmLCSOmZHP8OAylYCK+jSLlVQ30vdEYLY3n82LnafjmavK3nX X-Received: by 2002:a25:e401:: with SMTP id b1mr3605497ybh.414.1592454763454; Wed, 17 Jun 2020 21:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592454763; cv=none; d=google.com; s=arc-20160816; b=Jym8xTsaTCDt4s7vJO1FYPkoxuG2dOyhMXXQP1WFwGNmLXJIRXsruZ74Fx5JykCT4w wQIvth2/rOdD1zP8JCxyf6rO0cAog3V9t/QCmNyH40uorfaQhY7998PFW5AXwxyUss5H Lvb+NpkhORlejR2EXGxJ1/soFGbbOfs5NqdX+gM24MqANCDo5vhrLTfOtyqc28hf8OSC 2oJ4TWZp5dfK4/bKXEBXwpamoiw5myiV3OXFHKLYbRBvgBQ4rSbv/htLpQIPpqZ1Mvdd /cOOXbt6Z2YfiHnzX+e2noAdH+39QsjdhBDj8m9VIWcRGEJdxShUy26/hJbzQ0Ehx12S dNTQ== 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=CK2elIXOTHImMlsaoqCYUcyN3xToI2uVAuloYRoKKNU=; b=dgDUhbF520yb6mpM31G8gZN/W5wq1urAzcm2s3SUBbU2IWxx9DohpixkZXe++/AuIV TEUSEHMumTNvJLznVTZUDIpmcLPCJDGcWx6bp+goRvUCnvgyu+3bOFnQ5QTfpx9cfnXm iHwb/Yoo+8YTh47Kp5yh9wGnKaTTO+41o6LdDZ9DXWCdPPScwZpPkpdMCLC2b3DFLn2A sAXQvMrAK07GgS1IOCYqbYLNp10GI9MnFSl2SXskz+5YwvJgq2hixbnpLbMC0zqe8lSa 7DGKoFvoidB6JK6+Q8RGod9I8S5WCBaPM1Ij/rz+xbaXGaCwUtOVeCASf4HV2xa433PJ LI6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=xD939vyX; 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 y7si1516651ybk.128.2020.06.17.21.32.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 21:32:43 -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=xD939vyX; 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]:49430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlmEE-0005VA-Sh for patch@linaro.org; Thu, 18 Jun 2020 00:32:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlm9M-0003CS-OC for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:27:40 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:45432) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlm9F-0002Qr-TA for qemu-devel@nongnu.org; Thu, 18 Jun 2020 00:27:40 -0400 Received: by mail-pg1-x543.google.com with SMTP id l63so2314306pge.12 for ; Wed, 17 Jun 2020 21:27:33 -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=CK2elIXOTHImMlsaoqCYUcyN3xToI2uVAuloYRoKKNU=; b=xD939vyXfZYH4ys3CkLFzVHUvh2tO662tbDdcZ1P4ZfLHGg+NwA1GXvP2gC/XN0B5m VeOTF+t98N7pEl41xhtfOOxuvX4kZFocX5iWsLAh0WfN3r7hC65uUolMocOv+qQLaD3c y4/8yXfqiUxD3JW0XARvcr9axxXvPt60mX9komdgg7g8jRRvfJLys1YXg9wKcCWEZj/C yBS9rXSv7i4TgvyqDxFWGGg4d8mZJ3f1VLPXVQlmU7+J98CeTEYKLCsny7h8e0gfdAdS 2v1Fgwrb0qiQNVhCQUzTLzodNunUUP/g7rIhqyR0WQnZW4yWPn9G37JVps1OPqh/+aWX 7Muw== 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=CK2elIXOTHImMlsaoqCYUcyN3xToI2uVAuloYRoKKNU=; b=Zn9OvirLXTB1pXTY19RRvmPVioF1CP+BqHWKDz9eV3TcbE9geJds+7voFbHl9B9yI6 yp8ksPN+IN2WL8s+86pVxEQi4UjK8SGeb6V4g20U4aPxUuz5SW0j8FfVDbw9T8iZjQO+ XBNacCaKV15dpZiAfiHiWzj8mkN0vwU/uJmiE/qzhHShGogr5njsu2OfraYSiRGdFpUo dt1LvEWOYGALShtK3JLBkfn4edXXTvMpZSIJCRFL3lgG7YcKDVispFpdbCjyoI4HqSmQ Y194giRFodv3jZpy48RvOD8z5CAWee+8JldFVrHpJxPoX9B9BLvh4zb/BC36uxJYJEIo P8Og== X-Gm-Message-State: AOAM531tSshXzflmA4GqHm0fpE0XvsvIuoxmb9YPDuQBiGoKqD0KeHiM tXlvt3y+CmIkPysxJvspdW6TZqtZUyw= X-Received: by 2002:a63:7c56:: with SMTP id l22mr1765420pgn.127.1592454452054; Wed, 17 Jun 2020 21:27:32 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 21:27:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 011/100] target/arm: Split out gen_gvec_ool_zzp Date: Wed, 17 Jun 2020 21:25:15 -0700 Message-Id: <20200618042644.1685561-12-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::543; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x543.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" Model after gen_gvec_fn_zzz et al. Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) -- 2.25.1 diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 9687606a93..3e9bbaca94 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 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) +{ + unsigned vsz = vec_full_reg_size(s); + tcg_gen_gvec_3_ool(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + pred_full_reg_offset(s, pg), + vsz, vsz, data, fn); +} + /* Invoke an out-of-line helper on 3 Zregs and a predicate. */ static void gen_gvec_ool_zzzp(DisasContext *s, gen_helper_gvec_4 *fn, int rd, int rn, int rm, int pg, int data) @@ -415,11 +426,7 @@ static bool do_zpz_ool(DisasContext *s, arg_rpr_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), - pred_full_reg_offset(s, a->pg), - vsz, vsz, 0, fn); + gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, 0); } return true; } @@ -603,11 +610,7 @@ static bool do_movz_zpz(DisasContext *s, int rd, int rn, int pg, }; if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - tcg_gen_gvec_3_ool(vec_full_reg_offset(s, rd), - vec_full_reg_offset(s, rn), - pred_full_reg_offset(s, pg), - vsz, vsz, invert, fns[esz]); + gen_gvec_ool_zzp(s, fns[esz], rd, rn, pg, invert); } return true; } @@ -616,11 +619,7 @@ static bool do_zpzi_ool(DisasContext *s, arg_rpri_esz *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), - pred_full_reg_offset(s, a->pg), - vsz, vsz, a->imm, fn); + gen_gvec_ool_zzp(s, fn, a->rd, a->rn, a->pg, a->imm); } return true; }