From nobody Wed Nov 27 14:32:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1698280564; cv=none; d=zohomail.com; s=zohoarc; b=a2st5GnGqpzydR3yPUAQn1M7zBoT8z3UuNJh1OMc57w4sH6SJS1kEbE5ufGMvL78m0G0R8QlR5ljc++sebxJJCy/GLLiisaHZfF73NrXCxB9cyqm5GwFr3nrUdGMBONwW2Par4f1QBX1cDHqdhLfuncwcyjsiGbIHrcQabTyDlQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698280564; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Mf1oJrduPCBqL7ZJPmcmrJhpPRE8uXn/4De5kKhDPeY=; b=LbUfPL7Z76VCfh/9SfDTDWe6VhGxZeYuT/Y7ICBzY9QZcVpDa5Q9iIgYj3WQ294t5On3gJGuSzgQZc+qlDJx8WLs5hIXQw/fUIi1pbLmcuH57RXKIiEhEgiceBC4jjWRQdKb6w9y3S13quOmD2g/d1ekPFoCUBzqgGUcmZAFU90= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1698280564011766.3015153903093; Wed, 25 Oct 2023 17:36:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvo9u-0003Yc-5d; Wed, 25 Oct 2023 20:23:34 -0400 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 1qvo9W-0001o3-8J for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:23:10 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvo9R-0008Db-VE for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:23:09 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6b87c1edfd5so292849b3a.1 for ; Wed, 25 Oct 2023 17:23:05 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id 9-20020a17090a0cc900b0027463889e72sm499870pjt.55.2023.10.25.17.23.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 17:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698279784; x=1698884584; 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=Mf1oJrduPCBqL7ZJPmcmrJhpPRE8uXn/4De5kKhDPeY=; b=ZnGzBBODna+PKMReZ3IEqpU40rrUXy7CRbozznbBh4xgpTvl1ZOr8pc6itDBgy/gMg qQAvHECRUvfMK0cL+rGsfNWsvSZ23c7sUSvqE6nZp8RCpsRNmVFaPLbzJQFNuc4EVGl4 Opkz2/R1BnlVtWHVPvkrJrxNvIsc0WeWdYNG0nEm7D1YmK1SuCRtMdA/zrhyVhPW4GcE gDo716PSgWVEa59CgHpvT/hCElbb3UoCSmfNoulVpq5eHp2O0vhBXTjsDXEP/gY3WDQQ YC1csOUgtChMo7+YnWtLf+6BzRvqJJV8U1xs3ppFSSef/E5Vu28v9FFSXdGt4RVr/Bgc u42g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698279784; x=1698884584; 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=Mf1oJrduPCBqL7ZJPmcmrJhpPRE8uXn/4De5kKhDPeY=; b=cMKuT6KQqx0V8W48iZiVfMuwgtgA/6FGNAZmQ+7xkLrMQuftVzzKzQZna7ValuFfda iMAITtL3hDlPZ7xUBzcuhoR7IACNgSjKn3IM79LP/MoWm+Do3WTpLtAmbvtjxGWHfdUk ENWhy0rPzrRRniG9YCyjEQSv1SzyxGglHTLvSk0PCJZQl6Aeueu6JQAXW+z3QnIkztJK 88WbTkVoEn5pEw7aJ2OWVnux10TDMzdeKUOIq1ulc9yRm+YUrmzrLNEMuSg+NHQarvb2 zIfgGPkzTuCfK8RmrzFtKyB+H3AYQx1TOhOrjZltfU6yG8TBnuSouNFs+X7rbhH3R6yk XsQg== X-Gm-Message-State: AOJu0Ywemxk0mCllOLUM24Rw6/R7aQmvh4xSF84AgXISwRHh1Ij2Wu5D qHSvw0ng2CNXndNZG81ryb2KXzf9VO46JxFJ5xg= X-Google-Smtp-Source: AGHT+IErZlCcYAjQaXTfsUlxiW7cHzAMkXv7NTmiXzUgArFc+LPvfAYs84CK3RJFqxBRXrjnGvwlXQ== X-Received: by 2002:a05:6a20:7f86:b0:174:2d20:5414 with SMTP id d6-20020a056a207f8600b001742d205414mr9593997pzj.49.1698279784366; Wed, 25 Oct 2023 17:23:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland Subject: [PULL 69/94] target/sparc: Use tcg_gen_vec_{add,sub}* Date: Wed, 25 Oct 2023 17:15:17 -0700 Message-Id: <20231026001542.1141412-99-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231026001542.1141412-1-richard.henderson@linaro.org> References: <20231026001542.1141412-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1698280565917100001 Content-Type: text/plain; charset="utf-8" Replace the local helpers for the same integer operations. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/helper.h | 12 -------- target/sparc/translate.c | 15 +++++----- target/sparc/vis_helper.c | 59 --------------------------------------- 3 files changed, 7 insertions(+), 79 deletions(-) diff --git a/target/sparc/helper.h b/target/sparc/helper.h index 790752467f..dd1721a340 100644 --- a/target/sparc/helper.h +++ b/target/sparc/helper.h @@ -137,18 +137,6 @@ DEF_HELPER_FLAGS_2(fpack16, TCG_CALL_NO_RWG_SE, i32, i= 64, i64) DEF_HELPER_FLAGS_3(fpack32, TCG_CALL_NO_RWG_SE, i64, i64, i64, i64) DEF_HELPER_FLAGS_2(fpackfix, TCG_CALL_NO_RWG_SE, i32, i64, i64) DEF_HELPER_FLAGS_3(bshuffle, TCG_CALL_NO_RWG_SE, i64, i64, i64, i64) -#define VIS_HELPER(name) \ - DEF_HELPER_FLAGS_2(f ## name ## 16, TCG_CALL_NO_RWG_SE, \ - i64, i64, i64) \ - DEF_HELPER_FLAGS_2(f ## name ## 16s, TCG_CALL_NO_RWG_SE, \ - i32, i32, i32) \ - DEF_HELPER_FLAGS_2(f ## name ## 32, TCG_CALL_NO_RWG_SE, \ - i64, i64, i64) \ - DEF_HELPER_FLAGS_2(f ## name ## 32s, TCG_CALL_NO_RWG_SE, \ - i32, i32, i32) - -VIS_HELPER(padd) -VIS_HELPER(psub) #define VIS_CMPHELPER(name) \ DEF_HELPER_FLAGS_2(f##name##16, TCG_CALL_NO_RWG_SE, \ i64, i64, i64) \ diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 572de4ef14..09ca9c51bd 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -25,9 +25,8 @@ #include "exec/helper-proto.h" #include "exec/exec-all.h" #include "tcg/tcg-op.h" - +#include "tcg/tcg-op-gvec.h" #include "exec/helper-gen.h" - #include "exec/translator.h" #include "exec/log.h" #include "asi.h" @@ -5353,15 +5352,15 @@ static void disas_sparc_legacy(DisasContext *dc, un= signed int insn) break; case 0x050: /* VIS I fpadd16 */ CHECK_FPU_FEATURE(dc, VIS1); - gen_ne_fop_DDD(dc, rd, rs1, rs2, gen_helper_fpadd16); + gen_ne_fop_DDD(dc, rd, rs1, rs2, tcg_gen_vec_add16_i64= ); break; case 0x051: /* VIS I fpadd16s */ CHECK_FPU_FEATURE(dc, VIS1); - gen_ne_fop_FFF(dc, rd, rs1, rs2, gen_helper_fpadd16s); + gen_ne_fop_FFF(dc, rd, rs1, rs2, tcg_gen_vec_add16_i32= ); break; case 0x052: /* VIS I fpadd32 */ CHECK_FPU_FEATURE(dc, VIS1); - gen_ne_fop_DDD(dc, rd, rs1, rs2, gen_helper_fpadd32); + gen_ne_fop_DDD(dc, rd, rs1, rs2, tcg_gen_vec_add32_i64= ); break; case 0x053: /* VIS I fpadd32s */ CHECK_FPU_FEATURE(dc, VIS1); @@ -5369,15 +5368,15 @@ static void disas_sparc_legacy(DisasContext *dc, un= signed int insn) break; case 0x054: /* VIS I fpsub16 */ CHECK_FPU_FEATURE(dc, VIS1); - gen_ne_fop_DDD(dc, rd, rs1, rs2, gen_helper_fpsub16); + gen_ne_fop_DDD(dc, rd, rs1, rs2, tcg_gen_vec_sub16_i64= ); break; case 0x055: /* VIS I fpsub16s */ CHECK_FPU_FEATURE(dc, VIS1); - gen_ne_fop_FFF(dc, rd, rs1, rs2, gen_helper_fpsub16s); + gen_ne_fop_FFF(dc, rd, rs1, rs2, tcg_gen_vec_sub16_i32= ); break; case 0x056: /* VIS I fpsub32 */ CHECK_FPU_FEATURE(dc, VIS1); - gen_ne_fop_DDD(dc, rd, rs1, rs2, gen_helper_fpsub32); + gen_ne_fop_DDD(dc, rd, rs1, rs2, tcg_gen_vec_add32_i64= ); break; case 0x057: /* VIS I fpsub32s */ CHECK_FPU_FEATURE(dc, VIS1); diff --git a/target/sparc/vis_helper.c b/target/sparc/vis_helper.c index 3afdc6975c..7763b16c24 100644 --- a/target/sparc/vis_helper.c +++ b/target/sparc/vis_helper.c @@ -275,65 +275,6 @@ uint64_t helper_fexpand(uint64_t src1, uint64_t src2) return d.ll; } =20 -#define VIS_HELPER(name, F) \ - uint64_t name##16(uint64_t src1, uint64_t src2) \ - { \ - VIS64 s, d; \ - \ - s.ll =3D src1; \ - d.ll =3D src2; \ - \ - d.VIS_W64(0) =3D F(d.VIS_W64(0), s.VIS_W64(0)); \ - d.VIS_W64(1) =3D F(d.VIS_W64(1), s.VIS_W64(1)); \ - d.VIS_W64(2) =3D F(d.VIS_W64(2), s.VIS_W64(2)); \ - d.VIS_W64(3) =3D F(d.VIS_W64(3), s.VIS_W64(3)); \ - \ - return d.ll; \ - } \ - \ - uint32_t name##16s(uint32_t src1, uint32_t src2) \ - { \ - VIS32 s, d; \ - \ - s.l =3D src1; \ - d.l =3D src2; \ - \ - d.VIS_W32(0) =3D F(d.VIS_W32(0), s.VIS_W32(0)); \ - d.VIS_W32(1) =3D F(d.VIS_W32(1), s.VIS_W32(1)); \ - \ - return d.l; \ - } \ - \ - uint64_t name##32(uint64_t src1, uint64_t src2) \ - { \ - VIS64 s, d; \ - \ - s.ll =3D src1; \ - d.ll =3D src2; \ - \ - d.VIS_L64(0) =3D F(d.VIS_L64(0), s.VIS_L64(0)); \ - d.VIS_L64(1) =3D F(d.VIS_L64(1), s.VIS_L64(1)); \ - \ - return d.ll; \ - } \ - \ - uint32_t name##32s(uint32_t src1, uint32_t src2) \ - { \ - VIS32 s, d; \ - \ - s.l =3D src1; \ - d.l =3D src2; \ - \ - d.l =3D F(d.l, s.l); \ - \ - return d.l; \ - } - -#define FADD(a, b) ((a) + (b)) -#define FSUB(a, b) ((a) - (b)) -VIS_HELPER(helper_fpadd, FADD) -VIS_HELPER(helper_fpsub, FSUB) - #define VIS_CMPHELPER(name, F) \ uint64_t name##16(uint64_t src1, uint64_t src2) \ { \ --=20 2.34.1