From nobody Tue Nov 26 04:48:01 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 ARC-Seal: i=1; a=rsa-sha256; t=1710180632; cv=none; d=zohomail.com; s=zohoarc; b=khb+UNATwTdTzHnKs7gFFDv2waYOyCuZpiEfzNeAysClIv4SQrDoRGwP4CvTLr2rWY6rJuz+qdWRJ0TEXoXbU18ap7SYNbJ/d9J9NFbxKzGTEFZ5rqBMMx4qtkDtvsPiHH8CRvAu1wV0V5ws4xWy0xX3KS/S4IYhx9Cy0p8dOM4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1710180632; 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=DgCmMDQSmZuQF2R71f2SMhy+sJRtIk+zLEeTXoFqnr0=; b=GZTvYSOs8/sUzWJBJQAy4xAhmmPE37mii6SXS0I563f8hFpuQkBc7qstY+HcaB+pacjIehg9VAE31duO+Xn7pz10RtbHjcsq8V7XXF8vLIPnMw4k6JYx0nYuuenAIw/XsURpk09YelNI5HKCACxZCSviNBdzK/U7SGljFIqsZtM= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1710180632733992.0336198074676; Mon, 11 Mar 2024 11:10:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjk5b-00051S-P1; Mon, 11 Mar 2024 14:09:31 -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 1rjk4v-0004sg-Cg for qemu-devel@nongnu.org; Mon, 11 Mar 2024 14:08:51 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rjk4j-0004Ja-Kz for qemu-devel@nongnu.org; Mon, 11 Mar 2024 14:08:49 -0400 Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-29a8911d11cso2577487a91.1 for ; Mon, 11 Mar 2024 11:08:36 -0700 (PDT) Received: from grind.dc1.ventanamicro.com ([177.94.15.159]) by smtp.gmail.com with ESMTPSA id hk13-20020a17090b224d00b0029c2794d3f7sm525810pjb.7.2024.03.11.11.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 11:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1710180514; x=1710785314; 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=DgCmMDQSmZuQF2R71f2SMhy+sJRtIk+zLEeTXoFqnr0=; b=ll8NkfGYuh/MnitZbaJ0v34tEy6TN1vKPuHzgZEWciUzfsJXnqntCdsdnpSTGWIgV2 1SldHaotZPoCP1bYLnKAjldKBksrIKywPhyxhDYHyqwOUWCPeP2iB5uX4h96KCKKQmo+ SC1nowISbY8deyUsmOBWCrT3KNKOyCZcbVgrsna4Z+qFIoUvsceLqeuDbjDYjZn16WCf TzTkGNdGHLg0Nu/ihmUn58AssQ4zbBlNxzMwuhrk0AFHfhME6M6c0IBx66I2LTwz+zYU HojhmSAQucnT4CFaEro+p6fxYAvp/iOvvhYoegAtVPmLLBqkTjvo2IW/9h91Fur4GajL jaMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710180514; x=1710785314; 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=DgCmMDQSmZuQF2R71f2SMhy+sJRtIk+zLEeTXoFqnr0=; b=fVuDvJWLGNsZWe2nuDWue5V1kx+Tf/84XartjqaQSzQDuiQMuRQK77R4srnk/ftp4U mBGDN/13ruOGvtBoHbw9ONKzWW8eZrDZjxczYmjMjBXaPN9SC9AQq30ju4zjvUpOZEh5 uxRJR1rq0tTpfAc8RH26qRhmjXX7fmKYkeEG2xDG/5R1YzKhKCUBBqJukrW8SpxLEHji q+Xnmxp0exTDcjclZr3WcTJ3EJ/2wy5FDTmOUDcD8kaewXbfe10PxVVR4XKrYTdgP4jH z5xcEET5le/m9aT63kD/gAd+V4Ny9tbjYymAXyJPU+2EDdPiMw3YjDut0Nifg3SgpBrL vQTw== X-Gm-Message-State: AOJu0YyDMVeQ7QJ5ghy8yO3Zl9wLw+ABpb9th/szJXAbLlX1g5dx+6BM M6w89PJoFkw+lt5o8L0gmR3dITrycpUrPTP9EwZ/A/EXlRvepEFHy8A8r2oZ0b97XH1vD7w9oUT q X-Google-Smtp-Source: AGHT+IGbz3K3mQF1+asKARCRn3d8gMfXC9ApdeQndTZkoWHkpL5+M6/uNQ2DEg0R7nW9e/KgOcAVUg== X-Received: by 2002:a17:90a:2e17:b0:29c:289b:1eb3 with SMTP id q23-20020a17090a2e1700b0029c289b1eb3mr1187857pjd.6.1710180514287; Mon, 11 Mar 2024 11:08:34 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, philmd@linaro.org, richard.henderson@linaro.org, Daniel Henrique Barboza Subject: [PATCH v12 2/7] trans_rvv.c.inc: set vstart = 0 in int scalar move insns Date: Mon, 11 Mar 2024 15:08:16 -0300 Message-ID: <20240311180821.250469-3-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240311180821.250469-1-dbarboza@ventanamicro.com> References: <20240311180821.250469-1-dbarboza@ventanamicro.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::1032; envelope-from=dbarboza@ventanamicro.com; helo=mail-pj1-x1032.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 @ventanamicro.com) X-ZM-MESSAGEID: 1710180634567100002 Content-Type: text/plain; charset="utf-8" trans_vmv_x_s, trans_vmv_s_x, trans_vfmv_f_s and trans_vfmv_s_f aren't setting vstart =3D 0 after execution. This is usually done by a helper in vector_helper.c but these functions don't use helpers. We'll set vstart after any potential 'over' brconds, and that will also mandate a mark_vs_dirty() too. Fixes: dedc53cbc9 ("target/riscv: rvv-1.0: integer scalar move instructions= ") Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson --- target/riscv/insn_trans/trans_rvv.c.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_tr= ans/trans_rvv.c.inc index e42728990e..8c16a9f5b3 100644 --- a/target/riscv/insn_trans/trans_rvv.c.inc +++ b/target/riscv/insn_trans/trans_rvv.c.inc @@ -3373,6 +3373,8 @@ static bool trans_vmv_x_s(DisasContext *s, arg_vmv_x_= s *a) vec_element_loadi(s, t1, a->rs2, 0, true); tcg_gen_trunc_i64_tl(dest, t1); gen_set_gpr(s, a->rd, dest); + tcg_gen_movi_tl(cpu_vstart, 0); + mark_vs_dirty(s); return true; } return false; @@ -3399,8 +3401,9 @@ static bool trans_vmv_s_x(DisasContext *s, arg_vmv_s_= x *a) s1 =3D get_gpr(s, a->rs1, EXT_NONE); tcg_gen_ext_tl_i64(t1, s1); vec_element_storei(s, a->rd, 0, t1); - mark_vs_dirty(s); gen_set_label(over); + tcg_gen_movi_tl(cpu_vstart, 0); + mark_vs_dirty(s); return true; } return false; @@ -3427,6 +3430,8 @@ static bool trans_vfmv_f_s(DisasContext *s, arg_vfmv_= f_s *a) } =20 mark_fs_dirty(s); + tcg_gen_movi_tl(cpu_vstart, 0); + mark_vs_dirty(s); return true; } return false; @@ -3452,8 +3457,9 @@ static bool trans_vfmv_s_f(DisasContext *s, arg_vfmv_= s_f *a) do_nanbox(s, t1, cpu_fpr[a->rs1]); =20 vec_element_storei(s, a->rd, 0, t1); - mark_vs_dirty(s); gen_set_label(over); + tcg_gen_movi_tl(cpu_vstart, 0); + mark_vs_dirty(s); return true; } return false; --=20 2.43.2