From nobody Mon Nov 25 08:04:44 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1717413672; cv=none; d=zohomail.com; s=zohoarc; b=WkMVIpZ4JRmxEzeo62d+4lyEmfuZEgFXOJg2SFQ4er343OxCVyrMazzDWwxzJOBbxD2YQcwLzT+YEcl15HnagBuXS4WT34x0706biref/vLUGhHCy06mTULSdn9gTl05xyYlZ4bqCaL8UxM0dhuP/sddn9YCe6lLi9PKZR9kwhI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717413672; 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=BljNjeMaZO3XaNf0tppv2lCKaXtzum6yJ/eCc7gYwjE=; b=TOFLeLqMhD03uGOKYNVU6qIRqsvZ+JyC2ljFLZR3eK62X4VgLXaQeVfVynZ1KEYUHReskwDESWOLfudrkjzBbKUfx2VAat1JdSPnE/7Idvyq0l2SVC8dla6UJPKP3mfDVxTlvVSXaReoxN02v1zgv26EkbMzyP8v0Jlj2bum0HQ= 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 1717413672341237.39856248749822; Mon, 3 Jun 2024 04:21:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sE5hZ-0006uf-PL; Mon, 03 Jun 2024 07:18:09 -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 1sE5hT-0006P7-Hv; Mon, 03 Jun 2024 07:18:03 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sE5hR-0006QK-9U; Mon, 03 Jun 2024 07:18:03 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1f48b825d8cso33177785ad.2; Mon, 03 Jun 2024 04:18:00 -0700 (PDT) Received: from toolbox.alistair23.me (2403-580b-97e8-0-82ce-f179-8a79-69f4.ip6.aussiebb.net. [2403:580b:97e8:0:82ce:f179:8a79:69f4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6323e18c7sm62375435ad.177.2024.06.03.04.17.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 04:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717413478; x=1718018278; 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=BljNjeMaZO3XaNf0tppv2lCKaXtzum6yJ/eCc7gYwjE=; b=IHgQriC3YesMs8BG1T9Gznt+2pHCmIQWsGdfAuf0HHt0iIyaoGQsyqI8CM+tvV3Xl+ zqprqL/fmO5iEplci8aAYJguwtvpqxySURaKk/zjJndUmhGdrV/FF146k/1Dz6z2HE5R 49xOIthwibboFGSGwn9jkaUB/2LTDLzqpWtF2lK5gcXRBTq1oi6pxU0Bk1+/BiYZchtO ytZkM2+8RaQ+vriIMmAIdV1X/X0sXYxgj1gniEfJpRtxpzUnltxRM5E9a0vlzt94Fs7B 4sfm6IOlmEW1s2r5ek7/T2sLrDicU/OY6hBzJzsnXe814YZZ9RqLxAOnamhsFn0gGVHr H9vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717413478; x=1718018278; 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=BljNjeMaZO3XaNf0tppv2lCKaXtzum6yJ/eCc7gYwjE=; b=iCbhCTVxQnONsMKBv0OWXQvwKmV7DiDA1vqU2ugfu8+tsvibexwzB7fsrg1FO7tsUU bF8kNFfW937jaSuUAyMxGUfzaQl7vKxzMZVtGr+X57qQ2UR8rjB5Ryu5Ae1uL62Mcqh1 LBdzBEsNyvZJtceEuNV8IW5z4Yp0itVaCyRWc0dnLetrw4Sq8WPy0vwK5Tb9vQ2w/gYR pwEyvwCzQca+D/Vcl8zODIaZ3s8lFzAyYuea2pdKXJ5R1WKog3iCCsestg8Ja0les1tx QjsEqsX7mT0eOBGRu6qv8c/IhQyXf1002EI8JCamvB4doaJu0rGJF1dlv44oqC5vgjy3 buOw== X-Forwarded-Encrypted: i=1; AJvYcCXphpcc4uJrrvIKSG3Ak9J6ajFneMmsXVwt+TpY/0QElXtuxj8lBS4YjfyydySJoQVjtWPdS+DelRe52WtpBEzvERUZhbS+ X-Gm-Message-State: AOJu0YzFzJW/jCM3HRl+2mWmjvhshOyTFps1PtT6W1YZUd+TEz3KdK9B WkJUbSRoZIaFCBF80FLt41G2pwFO2sdLdVromR88cx77kcPwaboY3B2tkw== X-Google-Smtp-Source: AGHT+IFF4xEGDyXtBJbEd8R7X8AdE1PeIR8GMTtrg0/h2E4LkC+TBo9Ex8rsn8fT29O5f8CtxNjuIA== X-Received: by 2002:a17:902:f68f:b0:1f6:7c7a:a7a0 with SMTP id d9443c01a7336-1f67c7abc24mr28398675ad.59.1717413478165; Mon, 03 Jun 2024 04:17:58 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Max Chou , Daniel Henrique Barboza , qemu-stable , Alistair Francis Subject: [PULL v2 20/27] target/riscv: rvv: Remove redudant SEW checking for vector fp narrow/widen instructions Date: Mon, 3 Jun 2024 21:16:36 +1000 Message-ID: <20240603111643.258712-21-alistair.francis@wdc.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240603111643.258712-1-alistair.francis@wdc.com> References: <20240603111643.258712-1-alistair.francis@wdc.com> 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::62d; envelope-from=alistair23@gmail.com; helo=mail-pl1-x62d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1717413672854100004 Content-Type: text/plain; charset="utf-8" From: Max Chou If the checking functions check both the single and double width operators at the same time, then the single width operator checking functions (require_rvf[min]) will check whether the SEW is 8. Signed-off-by: Max Chou Reviewed-by: Daniel Henrique Barboza Cc: qemu-stable Message-ID: <20240322092600.1198921-5-max.chou@sifive.com> Signed-off-by: Alistair Francis --- target/riscv/insn_trans/trans_rvv.c.inc | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_tr= ans/trans_rvv.c.inc index c3af38af80..3a3896ba06 100644 --- a/target/riscv/insn_trans/trans_rvv.c.inc +++ b/target/riscv/insn_trans/trans_rvv.c.inc @@ -2333,7 +2333,6 @@ static bool opfvv_widen_check(DisasContext *s, arg_rm= rr *a) return require_rvv(s) && require_rvf(s) && require_scale_rvf(s) && - (s->sew !=3D MO_8) && vext_check_isa_ill(s) && vext_check_dss(s, a->rd, a->rs1, a->rs2, a->vm); } @@ -2373,7 +2372,6 @@ static bool opfvf_widen_check(DisasContext *s, arg_rm= rr *a) return require_rvv(s) && require_rvf(s) && require_scale_rvf(s) && - (s->sew !=3D MO_8) && vext_check_isa_ill(s) && vext_check_ds(s, a->rd, a->rs2, a->vm); } @@ -2406,7 +2404,6 @@ static bool opfwv_widen_check(DisasContext *s, arg_rm= rr *a) return require_rvv(s) && require_rvf(s) && require_scale_rvf(s) && - (s->sew !=3D MO_8) && vext_check_isa_ill(s) && vext_check_dds(s, a->rd, a->rs1, a->rs2, a->vm); } @@ -2446,7 +2443,6 @@ static bool opfwf_widen_check(DisasContext *s, arg_rm= rr *a) return require_rvv(s) && require_rvf(s) && require_scale_rvf(s) && - (s->sew !=3D MO_8) && vext_check_isa_ill(s) && vext_check_dd(s, a->rd, a->rs2, a->vm); } @@ -2704,8 +2700,7 @@ static bool opffv_widen_check(DisasContext *s, arg_rm= r *a) { return opfv_widen_check(s, a) && require_rvfmin(s) && - require_scale_rvfmin(s) && - (s->sew !=3D MO_8); + require_scale_rvfmin(s); } =20 #define GEN_OPFV_WIDEN_TRANS(NAME, CHECK, HELPER, FRM) \ @@ -2810,16 +2805,14 @@ static bool opffv_narrow_check(DisasContext *s, arg= _rmr *a) { return opfv_narrow_check(s, a) && require_rvfmin(s) && - require_scale_rvfmin(s) && - (s->sew !=3D MO_8); + require_scale_rvfmin(s); } =20 static bool opffv_rod_narrow_check(DisasContext *s, arg_rmr *a) { return opfv_narrow_check(s, a) && require_rvf(s) && - require_scale_rvf(s) && - (s->sew !=3D MO_8); + require_scale_rvf(s); } =20 #define GEN_OPFV_NARROW_TRANS(NAME, CHECK, HELPER, FRM) \ @@ -2947,8 +2940,7 @@ static bool freduction_widen_check(DisasContext *s, a= rg_rmrr *a) { return reduction_widen_check(s, a) && require_rvf(s) && - require_scale_rvf(s) && - (s->sew !=3D MO_8); + require_scale_rvf(s); } =20 GEN_OPFVV_WIDEN_TRANS(vfwredusum_vs, freduction_widen_check) --=20 2.45.1