From patchwork Fri May 27 18:18:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 576641 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:8607:0:0:0:0 with SMTP id bb7csp949713mab; Fri, 27 May 2022 13:13:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzW7xQ5uqfr2tf2YeBaWdoQU27JFpewlGsGStizwsP6Xx4Ia3ptV+E+ZqiTQUsMbMdUpnAX X-Received: by 2002:ac8:7e93:0:b0:2f9:34d2:ec0f with SMTP id w19-20020ac87e93000000b002f934d2ec0fmr22566096qtj.670.1653682385069; Fri, 27 May 2022 13:13:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653682385; cv=none; d=google.com; s=arc-20160816; b=FQ8Cx3AAHvuTcxWsv2rUqhNeAEkoEpa/HWNkFPC9t36dyd60kgI53SQFNM3iSCEC0o hKFYxXJnd7KwH/X22/9XJLiEgps9z/NEZwWDkKLeFa9HhwO4tfDbQsIoyV5KmqoRhRjy vcFd2BTXdGFCOrN3Bzetwzo/tlG4c+4UUS858t1DkJ9CFj8NrFaWhSkatQAtfErI+IgW z1buanHUNIZOnb3gqLDADdGqN0xR0xU/Kbwsw4Q+Eme+0kSBqyyXkLKFwziI8fnHZ0Os J29hVl5iO89R5Hnz6wdxH1XERr5LX9FK3Ex5c32zdM7kgdjWHL1NqWbPnHJr1daIixHb YUPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=UQINzpTkLLA9ZKpu/siuyfQPd8Itx/UPUXCrJ15GNLc=; b=z+S/IkL9zhgc6Xj4qx9+dhxVP8p1k33VVZwc+jeENR8dJH9NwyE1ZcENoAdOgO+GPI SphaZ8ZfAsE5j9/uk72SMInVCx2KISXMouzxJRiiZ3TCQuSfJ9ceV959T7YCddx8oAbP E/wDf4bYg1kZizyk3z0vr0lRIujz9TfnwugWvBern+gV348qIH10jP48iLF4vxxhikuc DKgay4H7cgb3m41XotqG2g4z4DCus9Q434QpmY+j9NR0W0YSIHeK/lprnX3VIVpZKxQU Pyx48lT1VqULOWyVLdKQIBm3yuKITmAUG+GvaKzuvCxuciLp1Cq3BiW/dyYd6jq68ckl KtDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YP1KLr4q; 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=pass (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 3-20020a05621420a300b004625fa62133si2614541qvd.344.2022.05.27.13.13.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 May 2022 13:13:05 -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=pass header.i=@linaro.org header.s=google header.b=YP1KLr4q; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nugKW-00064g-Kc for patch@linaro.org; Fri, 27 May 2022 16:13:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuefj-0001zl-IK for qemu-devel@nongnu.org; Fri, 27 May 2022 14:26:53 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:43567) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuefd-0005OC-JI for qemu-devel@nongnu.org; Fri, 27 May 2022 14:26:50 -0400 Received: by mail-pl1-x632.google.com with SMTP id b5so4800913plx.10 for ; Fri, 27 May 2022 11:26:44 -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=UQINzpTkLLA9ZKpu/siuyfQPd8Itx/UPUXCrJ15GNLc=; b=YP1KLr4q131cTI9ltXvhV9uF7FPK5Y4q9sKEmZ+7uigx81eipW9mYgi+jgxukp5TTJ L/RQOnPtHEaLhUG1DIzDXzKHQiTOfO+93Ht9+H0jQp24dhAAK65In5OCAA5E1Rj/gk/a 7TaievATNgXZYEjTqL9fvO917AeJGWYU9MaNmQ9bnorNq2posWlQg1iEq+2u6CT/dA2A nKMysJtmEoIKlJKukozAHm+gaef6CjRgUefstIXlbbPaeBrBSlOxVfikFwMJLg+nBuNS KtQfpNENfnX/YmlHtLW1K905o1OGOXdWA6YFLcyHs2Vxg6Zx0AfTBYHmiKD48usoCtC0 pZeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UQINzpTkLLA9ZKpu/siuyfQPd8Itx/UPUXCrJ15GNLc=; b=LvcY8KOK8sBZnuPWwf6oVjJoPVzzZbiZ1Ygu612Esgtnh7h7Bew8U3N8fbcSLEmyiy dJJh2iurgOJmLDrIYhG5J7agf1lQOIqqXNdcz+wcaO9UraWMTVOVwRGn4HO6dDHv1FyW J9iBWOmKJjKqxGtgPfEa9ZL+zD3lTV0W4yF+jWlfLIKODePiFY4GqRkPTYOHooh97rm0 XqoZgVIWc7YZ6sxxA+M2kr0Dvx6MKx4MqwUKpDyOZl1/fR0RlvgOGmdGHiZUN5KmeCnV 7snbe23+XecCW8RZgz9yBmD2alBze1cyWaP1/H8Z/e7i9CXiQvjsqTpilqd6BEGPDnxt Tnxw== X-Gm-Message-State: AOAM532u/RemK1WP3PU24l4Ed18VFvrHQBNQIRKAmilPo3djEIogIXT1 jHK1yv2Pk4FATUDT48yFBMvVhEgtZLmQbQ== X-Received: by 2002:a17:902:d582:b0:161:c681:c326 with SMTP id k2-20020a170902d58200b00161c681c326mr43278653plh.84.1653676003410; Fri, 27 May 2022 11:26:43 -0700 (PDT) Received: from stoup.. (174-21-71-225.tukw.qwest.net. [174.21.71.225]) by smtp.gmail.com with ESMTPSA id g13-20020aa7874d000000b0050dc762816fsm3781539pfo.73.2022.05.27.11.26.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 11:26:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 101/114] target/arm: Introduce gen_gvec_fpst_zzzzp Date: Fri, 27 May 2022 11:18:54 -0700 Message-Id: <20220527181907.189259-102-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220527181907.189259-1-richard.henderson@linaro.org> References: <20220527181907.189259-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.google.com 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 59 +++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index e323b2d6d5..8f50956d3b 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -289,6 +289,30 @@ static bool gen_gvec_fpst_zzzz(DisasContext *s, gen_helper_gvec_4_ptr *fn, return ret; } +/* Invoke an out-of-line helper on 4 Zregs, 1 Preg, plus fpst. */ +static bool gen_gvec_fpst_zzzzp(DisasContext *s, gen_helper_gvec_5_ptr *fn, + int rd, int rn, int rm, int ra, int pg, + int data, ARMFPStatusFlavour flavour) +{ + if (fn == NULL) { + return false; + } + if (sve_access_check(s)) { + unsigned vsz = vec_full_reg_size(s); + TCGv_ptr status = fpstatus_ptr(flavour); + + tcg_gen_gvec_5_ptr(vec_full_reg_offset(s, rd), + vec_full_reg_offset(s, rn), + vec_full_reg_offset(s, rm), + vec_full_reg_offset(s, ra), + pred_full_reg_offset(s, pg), + status, vsz, vsz, data, fn); + + tcg_temp_free_ptr(status); + } + return true; +} + /* Invoke an out-of-line helper on 2 Zregs and a predicate. */ static bool gen_gvec_ool_zzp(DisasContext *s, gen_helper_gvec_3 *fn, int rd, int rn, int pg, int data) @@ -3977,21 +4001,8 @@ TRANS_FEAT(FCADD, aa64_sve, gen_gvec_fpst_zzzp, fcadd_fns[a->esz], static bool do_fmla(DisasContext *s, arg_rprrr_esz *a, gen_helper_gvec_5_ptr *fn) { - if (a->esz == 0) { - return false; - } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - TCGv_ptr status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); - tcg_gen_gvec_5_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vec_full_reg_offset(s, a->ra), - pred_full_reg_offset(s, a->pg), - status, vsz, vsz, 0, fn); - tcg_temp_free_ptr(status); - } - return true; + return gen_gvec_fpst_zzzzp(s, fn, a->rd, a->rn, a->rm, a->ra, a->pg, 0, + a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); } #define DO_FMLA(NAME, name) \ @@ -4020,21 +4031,9 @@ static bool trans_FCMLA_zpzzz(DisasContext *s, arg_FCMLA_zpzzz *a) gen_helper_sve_fcmla_zpzzz_d, }; - if (a->esz == 0) { - return false; - } - if (sve_access_check(s)) { - unsigned vsz = vec_full_reg_size(s); - TCGv_ptr status = fpstatus_ptr(a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); - tcg_gen_gvec_5_ptr(vec_full_reg_offset(s, a->rd), - vec_full_reg_offset(s, a->rn), - vec_full_reg_offset(s, a->rm), - vec_full_reg_offset(s, a->ra), - pred_full_reg_offset(s, a->pg), - status, vsz, vsz, a->rot, fns[a->esz]); - tcg_temp_free_ptr(status); - } - return true; + return gen_gvec_fpst_zzzzp(s, fns[a->esz], a->rd, a->rn, a->rm, + a->ra, a->pg, a->rot, + a->esz == MO_16 ? FPST_FPCR_F16 : FPST_FPCR); } static bool trans_FCMLA_zzxz(DisasContext *s, arg_FCMLA_zzxz *a)