From nobody Sun Nov 24 00:05:43 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=1730952698; cv=none; d=zohomail.com; s=zohoarc; b=TVhmJYNGPU1+A+VbN69utBYx/UOX+ZzqWxDid7Xy89fivvgM7g7YxlCdH7/H8vL2NXjaFQVa26qPpSuvSlnHYNA3oOck2mJZWRGGQ1zbP6xweyVssL69GBVM2wHkK8ZJ2bKhQvffy+VBGu9DIZc+tbhQq6Qti86Hu5VOE2C8tnI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730952698; 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=RAj+A4mnSUh5INZ2zk/jr1EQV8+iiISuFmUPqvB9PIw=; b=km7HW+X+hwpI/EKUvS7r41lppy1G5hZzPl8n+tS0xv86aaRvvEeYxhHsvk2toH999LTXZ0ktK5N25OT98g/ZViMBFy+Dx91DzTTvPjB/MYB9mau69P1qJGsMgqAKKX9jwrPQZjPJa+pxpGmWBm08bwpAaFYSvctW7lmYT4daYkc= 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 1730952698509416.80771912384114; Wed, 6 Nov 2024 20:11:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t8tr5-0006E2-97; Wed, 06 Nov 2024 23:10:47 -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 1t8tr2-0006DJ-1k for qemu-devel@nongnu.org; Wed, 06 Nov 2024 23:10:44 -0500 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t8tr0-0004zA-No for qemu-devel@nongnu.org; Wed, 06 Nov 2024 23:10:43 -0500 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-7ede6803585so1248949a12.0 for ; Wed, 06 Nov 2024 20:10:42 -0800 (PST) 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-21177dc3f12sm2789105ad.9.2024.11.06.20.10.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 20:10:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730952641; x=1731557441; 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=RAj+A4mnSUh5INZ2zk/jr1EQV8+iiISuFmUPqvB9PIw=; b=FW4OGtpxc9B8gYhZaG5uLTA1QKu9RU2JSWi0s9bdDzl85+hteZkAtJCE9Hz/yd7gQp 936iizymzTIPlls5pZOD7ZuLs4B63OhJwki+Hq2ITYWGuAyRl6Yx/XgwJVR5JvKcT/+m UDg5QvAeXTVA7FmkfT6VdBq/B7BurMNCpUcMT3zeq/OqYQmMskMe0SukzUjTpF3HA9Nj KiRPStzLOrHFdugD9Yl34lzXSOfWf4aqb+KzMBvQ/uFa0Ptvn/36Z4cFYFRvwvGKdDIK f4KsnCp1wEJlPhmokQNoWDF7pUvJ5V0pw1hpU42CHSaTWE29zD+QyH0n1dcdjJ833o+Z A3fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730952641; x=1731557441; 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=RAj+A4mnSUh5INZ2zk/jr1EQV8+iiISuFmUPqvB9PIw=; b=s4OJKHB3pkb4OES7i3hjR6JPbaAWf92AsIrMzOgmhr384scrM2sET+JBcnzFyziAzP TkVCZVJ5swrmWSi3sdyJORdyv4iY8hLGElwuV2O9pPLbQYQnj1/zETBAGSH1/x+piTgQ turYTvEkNS5uoyFT+wnmoqujqdkpzxbi0/15mbENjSR5s1sYsKfhxM0DPzAo4eRc4mvC kaXXzdPKbD1Cq+5pM6k6+383RDHguCEtkTrj2JiRC3MfDEPPaJ9SEpwcGacRmYohR51R Op6Vto3WLAVL119v51N8CFK5YzqXsRg9VV5zdVLXWmxiUux5Naa9jtTMGBIu9XOmtSpJ BmYA== X-Gm-Message-State: AOJu0YxIzbWwk2rsAlM2j5/CW1HmyB8NdxadXaKHuc2KCr4/1/g8HqqO d1rHeHakYaO/s48A98kIBnqPIg4YlqLW+UfNcZ0xhMBsniCKiq3coJcOLg== X-Google-Smtp-Source: AGHT+IFlKeKd1OeBdUvNC8sbFtZY/lIkxtlCOraDWKhvEYYPmvNkZvf1QgXEdSI5Dmh+gwj26f20yQ== X-Received: by 2002:a17:902:f70b:b0:20c:7661:dc9a with SMTP id d9443c01a7336-21175c13accmr32834095ad.3.1730952641096; Wed, 06 Nov 2024 20:10:41 -0800 (PST) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Max Chou , Daniel Henrique Barboza , Alistair Francis Subject: [PULL 05/12] target/riscv: rvv: Replace VSTART_CHECK_EARLY_EXIT in vext_ldst_us Date: Thu, 7 Nov 2024 14:10:09 +1000 Message-ID: <20241107041016.40800-6-alistair.francis@wdc.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241107041016.40800-1-alistair.francis@wdc.com> References: <20241107041016.40800-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::529; envelope-from=alistair23@gmail.com; helo=mail-pg1-x529.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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 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: 1730952700561116600 Content-Type: text/plain; charset="utf-8" From: Max Chou Because the real vl (evl) of vext_ldst_us may be different (e.g. vlm.v/vsm.v/etc.), so the VSTART_CHECK_EARLY_EXIT checking function should be replaced by checking evl in vext_ldst_us. Signed-off-by: Max Chou Reviewed-by: Daniel Henrique Barboza Message-ID: <20240918171412.150107-3-max.chou@sifive.com> Signed-off-by: Alistair Francis --- target/riscv/vector_helper.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index ccb32e6122..93cac23a13 100644 --- a/target/riscv/vector_helper.c +++ b/target/riscv/vector_helper.c @@ -277,7 +277,10 @@ vext_ldst_us(void *vd, target_ulong base, CPURISCVStat= e *env, uint32_t desc, uint32_t max_elems =3D vext_max_elems(desc, log2_esz); uint32_t esz =3D 1 << log2_esz; =20 - VSTART_CHECK_EARLY_EXIT(env); + if (env->vstart >=3D evl) { + env->vstart =3D 0; + return; + } =20 /* load bytes from guest memory */ for (i =3D env->vstart; i < evl; env->vstart =3D ++i) { --=20 2.47.0