From nobody Thu May 16 07:50:14 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=reject dis=none) header.from=sifive.com ARC-Seal: i=1; a=rsa-sha256; t=1710919681; cv=none; d=zohomail.com; s=zohoarc; b=B1sqvxVir1krgFevakl2A/uNQ+eIzrhJRADCb08TlwBCosB7MWD0Qr6QHZcS0IHo8Ho4Pd8J39PxvwZ1Cayu5Qo69u4t7RbsUvlvQKgO3a5VdADQ1Nrw4nU9xxAnNDBFm+OipbdYOEuBJdZ6aNof52niTeh/5McXXVUSRu1n+go= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1710919681; h=Content-Type: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=iOaigCZs+BnuWhUv4wDibuU2PGEb2drtLYE0whFxmy4=; b=lxv3YJgEmqHoQnS3NxLqBGK5cxV/b6o8+mdK45cVo8RptJkIvAD6fHSp/Q4UHSdVqGkEL0OSLgm/PkQ9IrI/QFzPDSSPUZIngGi710QOcJty5f7TzxijR32/mV16k7tAhphF6C+qywEwCWjPyOexBvWPb++lQCM3ExE22z65/3o= 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=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1710919681146427.6529360864978; Wed, 20 Mar 2024 00:28:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmqMC-0006Bu-UI; Wed, 20 Mar 2024 03:27:28 -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 1rmqMB-00069d-87 for qemu-devel@nongnu.org; Wed, 20 Mar 2024 03:27:27 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmqM9-0003gK-QE for qemu-devel@nongnu.org; Wed, 20 Mar 2024 03:27:26 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6e704078860so3400849b3a.0 for ; Wed, 20 Mar 2024 00:27:25 -0700 (PDT) Received: from duncan.localdomain (114-35-142-126.hinet-ip.hinet.net. [114.35.142.126]) by smtp.gmail.com with ESMTPSA id p10-20020a056a000a0a00b006e6b45debe8sm10811376pfh.78.2024.03.20.00.27.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 00:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1710919644; x=1711524444; 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=iOaigCZs+BnuWhUv4wDibuU2PGEb2drtLYE0whFxmy4=; b=QejeSH5xKWtLJAhqwxSd9Q+8TjVfdfDmBjs1S2OKJwj+9FIoSskJ/UuqGai5Ue0W9B KR3XDpnUbcjKGJbRUzWtU0WSXIkAV8LW4MN1h/TyluEPsLuOwgx+HIjl9JEQ4O02zST2 PqkkQ9Rfb/X0frJujZcXmFDnrBcU/c6YfKHeYjh3yQ2vD8WBZNcwlwj3WZNdftTyJFLY SsjPP0g1xtwYIp5AouXNxlzWWRxi8/+43NE6JYitZgytH09V2P7CRx4rSduUTsVdM5aS /1cIQwMdRPZbsh+jrQiCH4wmkrMb3/IAKFBBoOEpkzYybtCw915Nxg3jFZSM1/55oXnu MHoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710919644; x=1711524444; 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=iOaigCZs+BnuWhUv4wDibuU2PGEb2drtLYE0whFxmy4=; b=LHTAoEthW5N56/vS5GSPVJstUBmeYiz1EFdybmh2KMUblWArQOLIzniPRU7clN/d/W L8gVuxnT7o0XBgFgQz+h7tqLsRhOkn8Me2lEiC7FNPqhq8r0BSCdGuQzWXRVgxkNBiXq pX9ixSoAOLeKVJNKbOvDx1P4+ImPlBWHzWnx1feWr8kOSekmRayhazCsT2QOzeCUU9sP wleY0oePv/OTQKukr5Bazb1Zolf9o7ziPy46IWZwKdjTrJv+SEIt3y/kAPHK2iRTCsue B+gsTjGjs6LTvmJrVumpS2DRibkLTou2JKbG52yJW4F6A1tCCvs5I7njFVpkqdGNsac5 GRRw== X-Gm-Message-State: AOJu0YzKQ/LfwBxtIQZgMrd96uQUxaZblqiJx8A83FtLyVD1/DAFay/k c2ozar4+5yB+Mw5CZ7qtkJmXC9XSEhYjz1o3GxuMZeA3dB6M6FgTVR59n27OGaN+vTmP8MybdBZ msS9rM5jhgjpL8UBT7/1ZAyGgVuX9DWJYSf8oqKRSvGumKNgPiH2CGPWewsbP7OKyHcu6iEEGiM A+I/5370GkuGdkQm7zqh/a5DQViYKnjFDW9wvUOQ== X-Google-Smtp-Source: AGHT+IHBNdXqFDMQnnF0XTcwB8TlA80BiQWdbrYGg9WH5g36TNXw4R3rKHVWmaOk+mHNv+ktXykx1w== X-Received: by 2002:a05:6a00:1805:b0:6e6:830:cd13 with SMTP id y5-20020a056a00180500b006e60830cd13mr20201631pfa.23.1710919644204; Wed, 20 Mar 2024 00:27:24 -0700 (PDT) From: Max Chou To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org Cc: Max Chou , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , Richard Henderson Subject: [PATCH] target/riscv: rvv: Check single width operator for vector fp widen instructions Date: Wed, 20 Mar 2024 15:25:03 +0800 Message-Id: <20240320072709.1043227-3-max.chou@sifive.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320072709.1043227-1-max.chou@sifive.com> References: <20240320072709.1043227-1-max.chou@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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::42b; envelope-from=max.chou@sifive.com; helo=mail-pf1-x42b.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=unavailable 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 @sifive.com) X-ZM-MESSAGEID: 1710919681692100001 The require_scale_rvf function only checks the double width operator for the vector floating point widen instructions, so most of the widen checking functions need to add require_rvf for single width operator. The vfwcvt.f.x.v and vfwcvt.f.xu.v instructions convert single width integer to double width float, so the opfxv_widen_check function doesn=E2= =80=99t need require_rvf for the single width operator(integer). Signed-off-by: Max Chou Reviewed-by: Daniel Henrique Barboza --- target/riscv/insn_trans/trans_rvv.c.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_tr= ans/trans_rvv.c.inc index ef568e263d..6cb9bc9fde 100644 --- a/target/riscv/insn_trans/trans_rvv.c.inc +++ b/target/riscv/insn_trans/trans_rvv.c.inc @@ -2331,6 +2331,7 @@ GEN_OPFVF_TRANS(vfrsub_vf, opfvf_check) static bool opfvv_widen_check(DisasContext *s, arg_rmrr *a) { return require_rvv(s) && + require_rvf(s) && require_scale_rvf(s) && (s->sew !=3D MO_8) && vext_check_isa_ill(s) && @@ -2370,6 +2371,7 @@ GEN_OPFVV_WIDEN_TRANS(vfwsub_vv, opfvv_widen_check) static bool opfvf_widen_check(DisasContext *s, arg_rmrr *a) { return require_rvv(s) && + require_rvf(s) && require_scale_rvf(s) && (s->sew !=3D MO_8) && vext_check_isa_ill(s) && @@ -2402,6 +2404,7 @@ GEN_OPFVF_WIDEN_TRANS(vfwsub_vf) static bool opfwv_widen_check(DisasContext *s, arg_rmrr *a) { return require_rvv(s) && + require_rvf(s) && require_scale_rvf(s) && (s->sew !=3D MO_8) && vext_check_isa_ill(s) && @@ -2441,6 +2444,7 @@ GEN_OPFWV_WIDEN_TRANS(vfwsub_wv) static bool opfwf_widen_check(DisasContext *s, arg_rmrr *a) { return require_rvv(s) && + require_rvf(s) && require_scale_rvf(s) && (s->sew !=3D MO_8) && vext_check_isa_ill(s) && @@ -2941,6 +2945,7 @@ GEN_OPFVV_TRANS(vfredmin_vs, freduction_check) static bool freduction_widen_check(DisasContext *s, arg_rmrr *a) { return reduction_widen_check(s, a) && + require_rvf(s) && require_scale_rvf(s) && (s->sew !=3D MO_8); } --=20 2.31.1