From patchwork Fri Mar 22 08:53:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 1914756 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Ax37E4+/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V1GMv5mGBz1yXy for ; Fri, 22 Mar 2024 19:54:03 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rnael-0003mR-Pe; Fri, 22 Mar 2024 04:53:43 -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 1rnaek-0003m2-8S for qemu-devel@nongnu.org; Fri, 22 Mar 2024 04:53:42 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rnaei-0000yp-Jm for qemu-devel@nongnu.org; Fri, 22 Mar 2024 04:53:42 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1dddad37712so15709535ad.3 for ; Fri, 22 Mar 2024 01:53:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711097618; x=1711702418; 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=Vw0zayBEls3I265PM6dPGFHfEsT5GLnnXUtSra9I+Qc=; b=Ax37E4+/X0RFfZCzTKYJU3K2ypK49qpAvFRcTyNJxrdu9YJYszKVXGCyf+V03LIRQ1 z5KNV8nrwEFh0WTBlM6B7q3H2j4eILlBgxARsD+E9t2lUmFOmOUDmfgzBrbDtSaEd8/r 7gH0+R4likyeRa1YN2Ik12ZnZhzy09VC7t440ziQ1zqQQyTpj6c4SWhelOrXaYemyOzl jb/M7aP7b6r/kvQhgCiyaecmY71elOCVInL+KfUcr7TZjhTsfyNoOHuZAgSepI4quaFP ZXuW/91k7WnM/tB/F/BPoZb9gin7B20v+95LzsHSCZ0nnLRKjAkj7a8DlzmkL1ulO7/B ImlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711097618; x=1711702418; 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=Vw0zayBEls3I265PM6dPGFHfEsT5GLnnXUtSra9I+Qc=; b=rIAOkyTsEHkGC8WjG1phWv+rZcAqt8GA0d2Yyv1Vj5zaj/vm8cKIDyp1mkgkS7QEdR y5JbEZ6WI64g4m80BLIqLtMfkjcak7zVElcDcaeAgX1cToJ9zq/cMpic9aI4pA+KNhca XLV2rIf9quIkcMrNEcSCshQ4XA6FcA9MbtiLqTB4RMNpIryu5ooefyP2FQED8IZvRDDm C5NPXL8gm8OZfWilvCtjTo9ghgs3VGMKX+0+12MqVw8pqBCuNgjVwV0AhsOYbQawaXQY XQfgdnbTxCRuudXx9oRI704d66elmFOJQHauVy9iEeoVy1KoDVozw7OHFYjzGpdytRJc 6ysg== X-Gm-Message-State: AOJu0YwVY4Z+Ld1Cf+9CAprwbovodYYksm8nKO9FUpKfSAobENE03CsF LJEltFFbbho/S84mCPm81rScRQJznDI9xErvf4KcnR7dbEVwEXUkhYTsemmzADmDzQ== X-Google-Smtp-Source: AGHT+IE84yWqkzNVwLZV55anXtRlr6g7Zr3Zj6HwS/qtozfPnztMlnkD4NPlqSud0hn40LveyKMSjg== X-Received: by 2002:a17:902:db04:b0:1dd:c7ee:2ca6 with SMTP id m4-20020a170902db0400b001ddc7ee2ca6mr2070954plx.50.1711097618285; Fri, 22 Mar 2024 01:53:38 -0700 (PDT) Received: from toolbox.wdc.com ([129.253.180.114]) by smtp.gmail.com with ESMTPSA id h5-20020a170902680500b001ddde07af12sm1369048plk.143.2024.03.22.01.53.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 01:53:37 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Daniel Henrique Barboza , Richard Henderson , Alistair Francis Subject: [PULL 03/15] trans_rvv.c.inc: set vstart = 0 in int scalar move insns Date: Fri, 22 Mar 2024 18:53:07 +1000 Message-ID: <20240322085319.1758843-4-alistair.francis@wdc.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240322085319.1758843-1-alistair.francis@wdc.com> References: <20240322085319.1758843-1-alistair.francis@wdc.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=alistair23@gmail.com; helo=mail-pl1-x634.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Daniel Henrique Barboza trans_vmv_x_s, trans_vmv_s_x, trans_vfmv_f_s and trans_vfmv_s_f aren't setting vstart = 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 Reviewed-by: Alistair Francis Message-ID: <20240314175704.478276-3-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis --- 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_trans/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 = 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) } 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]); 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;