From patchwork Sat Mar 2 05:15:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 777497 Delivered-To: patch@linaro.org Received: by 2002:adf:e94d:0:b0:33d:f458:43ce with SMTP id m13csp1695053wrn; Fri, 1 Mar 2024 21:20:43 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXHQsr0cmMxnedZfKHxx6URMPahxl8dR0HtMDqROkbfzOcBNGJ5o1Ol43dRCwtwV6z/uwn24r5veUE5NxMTJnhg X-Google-Smtp-Source: AGHT+IE4IFv8XH+IHemdmPwLVTaKjUz6Z2JstMeKhU8Yy/b55KJAo9HxNTSItvHYActrRJioXEco X-Received: by 2002:a05:620a:5e02:b0:788:193b:1283 with SMTP id xz2-20020a05620a5e0200b00788193b1283mr1008581qkn.19.1709356843155; Fri, 01 Mar 2024 21:20:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709356843; cv=none; d=google.com; s=arc-20160816; b=xF6QR1sBqjrZucLKCWaihrqJfxn2vqtc8FnPRxHHo8DP74b7f7Xn5G+Ymm8E4Hcrh1 JGOR4axV5WE2ulZtuD3EnIi7PxKNnnGZ/h0LNWxKZAG7e5HMsQr5rr4v5C7YHkrubZMR 1V+Pew/xe6V8eGAIIgOWBAUz/MxuAlMkQ5sslEu9TGpwSvHTXWPK7zNMK6YkB1+BdLdj MUWN8r3CreJFLin9zno3LvpVE7Bkouy8WD09kHR7a9U0UK8hh4aBQ1egl4nHjW0Voij4 recf4vuGHjOvGqhlQKeb5uIq0gbXOUKYSSj/5M14OmkpDWrWX30gSIOsXT8jUGQtn/UT tW1g== 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=TFEdg7NNQgrayWD3SI3BgIOCHtplkk9gYK46g8nra+g=; fh=OY/jf0qYEhT53LcIJp8d/e39mN3vEzshkseI36O8N8s=; b=y2btxCaoFfZ+E/xMF7e5NujooZ1hrCT9yAubO8pS2j5+8tONL/4+5EdV/wFNbuzO8E z9s2Ym3tcgGmJY7azEa8seT5pRvB8j16/hn09MiIACrUsNWc9yXySO85hzm5qvY6jJMk 9IF/T49q+hqFa91bE8q+xahhx8Ib5dLlpUKezea753EhXyBzaTTeHU7/sG28m8ssVLtf lQNj0lWnUEHsIsPvvncT6PO10IkBC5Y+pAVc9DRf5bJ/BVmAnB0nnLOLS1ya5lEwaXFi sBK0MGBBHMzHLKLrR4f02cHMlvgG8/Ovt6thc+2K3MGAcnOAeOn6UEeLYzkKsM5XKtwZ ZvAw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G0PRaYXx; 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 11-20020ad45b8b000000b00690047c614esi5042670qvp.593.2024.03.01.21.20.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Mar 2024 21:20:43 -0800 (PST) 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=G0PRaYXx; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgHjm-0002V5-L5; Sat, 02 Mar 2024 00:16:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgHjj-0002UU-Qb for qemu-devel@nongnu.org; Sat, 02 Mar 2024 00:16:39 -0500 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rgHjV-0007Vd-Vx for qemu-devel@nongnu.org; Sat, 02 Mar 2024 00:16:39 -0500 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-5d8b519e438so2577351a12.1 for ; Fri, 01 Mar 2024 21:16:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709356584; x=1709961384; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TFEdg7NNQgrayWD3SI3BgIOCHtplkk9gYK46g8nra+g=; b=G0PRaYXxD58R7+6KMBxs53LCV4yY4ZAu9FN0Zy3cIzRjIOsH0KIfkF6ju+IStmwz1u 4ZFVZwoS+t4TdtkP5B/8yuRTDNHnB4wG65IFONprNFAhXTjOjq7Ozhza/4FxwfCtO6jE q4eWWPXuVq94BsSpU+QCKAMdC0t3OZTTY6pikOtmP/5P438BlG+UrP/zLp3zx4yomxWJ E6cCIo75j6rxWhpfIBfRohn8cJIEWKP3FrohKCZZiWyloCuO/XoUIufWp0g9nGjYET7f 7VzZceIllGzChOMe5vIoYrQFm5fuMT2R7Ts6pyuB8LgxXPkwZLfujelfrKm7PnCQFEaf VFwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709356584; x=1709961384; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TFEdg7NNQgrayWD3SI3BgIOCHtplkk9gYK46g8nra+g=; b=Hlm4Nxnu0VXy5NAM5JpwqsoHVuslPwlHT2SYURfe7fGFV/cHMOBX+xUG+8i6VG+Smj UXVUrBu3SWdcUs0JMTexy4FWvwMKlLXLo3QwZ9nwnwo8OUx/TrkxcHbeO7Px6B5BsHW9 tkkZGsgMr1eW7EUGnRzXJy0sXSpWhE3IQPwQpPMQWfqHIpDHRjSe7e7LMANYoVtOZul4 Hgb3dCiUu6R7BbGMkRxYEp+Deuuu34CbN4mh4CxHig1odwF+0ePk7gvJL/PG0lM5dMBq dDuDcCmLUMbOFeL5TCVFuiduyk693bteAW6T1hYem+qGlL3S6KW0K66Zcpv3hOHCJwAe 3o5w== X-Gm-Message-State: AOJu0Yy5EME1FMynwt6QIVnvRCE3YWM2BKkZANx9UQVgnzwydK72YCdX MtHK47vkMddKxEVMewiGxcpox+WxD2ZT0V6udpmRWufHU1JrJPsgNtv1JEPdAK2kpfkG9fciTHA Q X-Received: by 2002:a05:6a20:244d:b0:1a1:461a:331b with SMTP id t13-20020a056a20244d00b001a1461a331bmr1031194pzc.18.1709356584664; Fri, 01 Mar 2024 21:16:24 -0800 (PST) Received: from stoup.. (098-147-055-211.res.spectrum.com. [98.147.55.211]) by smtp.gmail.com with ESMTPSA id v8-20020a17090a458800b0029af67d4fd0sm4034901pjg.44.2024.03.01.21.16.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 21:16:24 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com Subject: [PATCH 11/41] target/sparc: Use gvec for VIS1 parallel add/sub Date: Fri, 1 Mar 2024 19:15:31 -1000 Message-Id: <20240302051601.53649-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240302051601.53649-1-richard.henderson@linaro.org> References: <20240302051601.53649-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x536.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=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=no 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-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/sparc/translate.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 981d9d9101..ee3da73551 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -4645,6 +4645,20 @@ static bool do_dfd(DisasContext *dc, arg_r_r_r *a, TRANS(FMUL8x16, VIS1, do_dfd, a, gen_helper_fmul8x16) +static bool do_gvec_ddd(DisasContext *dc, arg_r_r_r *a, MemOp vece, + void (*func)(unsigned, uint32_t, uint32_t, + uint32_t, uint32_t, uint32_t)) +{ + func(vece, gen_offset_fpr_D(a->rd), gen_offset_fpr_D(a->rs1), + gen_offset_fpr_D(a->rs2), 8, 8); + return advance_pc(dc); +} + +TRANS(FPADD16, VIS1, do_gvec_ddd, a, MO_16, tcg_gen_gvec_add) +TRANS(FPADD32, VIS1, do_gvec_ddd, a, MO_32, tcg_gen_gvec_add) +TRANS(FPSUB16, VIS1, do_gvec_ddd, a, MO_16, tcg_gen_gvec_sub) +TRANS(FPSUB32, VIS1, do_gvec_ddd, a, MO_32, tcg_gen_gvec_sub) + static bool do_ddd(DisasContext *dc, arg_r_r_r *a, void (*func)(TCGv_i64, TCGv_i64, TCGv_i64)) { @@ -4665,10 +4679,6 @@ static bool do_ddd(DisasContext *dc, arg_r_r_r *a, TRANS(FMUL8SUx16, VIS1, do_ddd, a, gen_helper_fmul8sux16) TRANS(FMUL8ULx16, VIS1, do_ddd, a, gen_helper_fmul8ulx16) -TRANS(FPADD16, VIS1, do_ddd, a, tcg_gen_vec_add16_i64) -TRANS(FPADD32, VIS1, do_ddd, a, tcg_gen_vec_add32_i64) -TRANS(FPSUB16, VIS1, do_ddd, a, tcg_gen_vec_sub16_i64) -TRANS(FPSUB32, VIS1, do_ddd, a, tcg_gen_vec_sub32_i64) TRANS(FNORd, VIS1, do_ddd, a, tcg_gen_nor_i64) TRANS(FANDNOTd, VIS1, do_ddd, a, tcg_gen_andc_i64) TRANS(FXORd, VIS1, do_ddd, a, tcg_gen_xor_i64)