From patchwork Mon Jan 22 16:10:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 13525712 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 66EA8C47DD9 for ; Mon, 22 Jan 2024 16:14:02 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRwta-0006US-7X; Mon, 22 Jan 2024 11:11:34 -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 1rRwtY-0006To-7f for qemu-devel@nongnu.org; Mon, 22 Jan 2024 11:11:32 -0500 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rRwtW-0005JC-JG for qemu-devel@nongnu.org; Mon, 22 Jan 2024 11:11:31 -0500 Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-2901f9ea918so1536837a91.3 for ; Mon, 22 Jan 2024 08:11:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1705939889; x=1706544689; 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=huJ0Y4U7cHePq8ipNQd8rkS4E9Epq2NvbZ0Qsc+OzcY=; b=SfMJgS0zPswm7rM7z7gSS88afdUjRR/wgNntR5l0cQUErevBYEemsxq06lbpaNMBWr DGFDyxQuV0XQFP9Rh+GMDdOsB/Yvi0GHH4V6VAK1WlGWqKxyJ6zl6oaeUEZ2OFBzObqd 775570DvAHKHCSpM7vQQd1buoUCcVKIZZgiOVizxN9Uts+n7x1FPWSLXJDGlsuFU5AFj mpjki/tJAehOoluKStAhHuMx7+u4lZsoU3RUGQzCSG3Tu/JtEhrVoLKuzggjRr8i7b6Q TrgSiECD+Jgou/vLBlkLz6YmVYPDF48M2zv6POfawh0n3f2aaldgHTPfgV7ySkSM9Hl4 KZfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705939889; x=1706544689; 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=huJ0Y4U7cHePq8ipNQd8rkS4E9Epq2NvbZ0Qsc+OzcY=; b=eQZPARQoCSrR2pWMbjkHzcMaZHsM05peYqjIJtplhKjSqxVZBdEs9r+nu5/k9d89fZ xpH2HzFM1dUEmw01tM01cwko5tMhg1FqYizU/qBMHn96VKEja2ui7gGi6BS4wjV7bbif hDCrdeA+PqV8SBBtCNuvO/eRKopG3GIH9Bl5LSDSKF2VyaRv8eT7GasT6pbHsxM8yaYU j34CGMBN7vqHuBJx433JW9LBeg68mGMlVdQEEKdsG+OyUZGEGZLhhvGipQG0oaZ9lg6L HXeBNtmqupXnPD3T/sPSadCvCxMfyUFFWCT35FU8e+2tUypSOPBy3+rCHAGPJ2wWMEKd PrNg== X-Gm-Message-State: AOJu0YzQAilcY64wtDL8gziKE17NvKyvaWs/c4R46vPDLQHf6XL8TVUB 8zFipy2GHW5seHLgwGXMbdm0SBy1uF7FO5OLG1IhXc4ZjKY2DWtC7fQDeF0W/0YrnFTqNIoLEBC 1 X-Google-Smtp-Source: AGHT+IG9yYI/lG61I5vFwGEmVcfSZ/isRrBd/yI7M3j00YcMbynTgYFqOYmvyfevh1+ocKwBmvwVvg== X-Received: by 2002:a17:90b:4015:b0:290:c8f6:7499 with SMTP id ie21-20020a17090b401500b00290c8f67499mr46425pjb.30.1705939888964; Mon, 22 Jan 2024 08:11:28 -0800 (PST) Received: from grind.. ([152.234.127.94]) by smtp.gmail.com with ESMTPSA id db3-20020a17090ad64300b0028e245501e7sm9866446pjb.4.2024.01.22.08.11.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 08:11:28 -0800 (PST) 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, richard.henderson@linaro.org, Daniel Henrique Barboza Subject: [PATCH v4 04/13] target/riscv/insn_trans/trans_rvbf16.c.inc: use cpu->cfg.vlenb Date: Mon, 22 Jan 2024 13:10:58 -0300 Message-ID: <20240122161107.26737-5-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122161107.26737-1-dbarboza@ventanamicro.com> References: <20240122161107.26737-1-dbarboza@ventanamicro.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=dbarboza@ventanamicro.com; helo=mail-pj1-x102d.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Use ctx->cfg_ptr->vlenb instead of ctx->cfg_ptr->vlen / 8. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn_trans/trans_rvbf16.c.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvbf16.c.inc b/target/riscv/insn_trans/trans_rvbf16.c.inc index 4e39c00884..8ee99df3f3 100644 --- a/target/riscv/insn_trans/trans_rvbf16.c.inc +++ b/target/riscv/insn_trans/trans_rvbf16.c.inc @@ -83,8 +83,8 @@ static bool trans_vfncvtbf16_f_f_w(DisasContext *ctx, arg_vfncvtbf16_f_f_w *a) data = FIELD_DP32(data, VDATA, VMA, ctx->vma); tcg_gen_gvec_3_ptr(vreg_ofs(ctx, a->rd), vreg_ofs(ctx, 0), vreg_ofs(ctx, a->rs2), tcg_env, - ctx->cfg_ptr->vlen / 8, - ctx->cfg_ptr->vlen / 8, data, + ctx->cfg_ptr->vlenb, + ctx->cfg_ptr->vlenb, data, gen_helper_vfncvtbf16_f_f_w); mark_vs_dirty(ctx); gen_set_label(over); @@ -112,8 +112,8 @@ static bool trans_vfwcvtbf16_f_f_v(DisasContext *ctx, arg_vfwcvtbf16_f_f_v *a) data = FIELD_DP32(data, VDATA, VMA, ctx->vma); tcg_gen_gvec_3_ptr(vreg_ofs(ctx, a->rd), vreg_ofs(ctx, 0), vreg_ofs(ctx, a->rs2), tcg_env, - ctx->cfg_ptr->vlen / 8, - ctx->cfg_ptr->vlen / 8, data, + ctx->cfg_ptr->vlenb, + ctx->cfg_ptr->vlenb, data, gen_helper_vfwcvtbf16_f_f_v); mark_vs_dirty(ctx); gen_set_label(over); @@ -143,8 +143,8 @@ static bool trans_vfwmaccbf16_vv(DisasContext *ctx, arg_vfwmaccbf16_vv *a) tcg_gen_gvec_4_ptr(vreg_ofs(ctx, a->rd), vreg_ofs(ctx, 0), vreg_ofs(ctx, a->rs1), vreg_ofs(ctx, a->rs2), tcg_env, - ctx->cfg_ptr->vlen / 8, - ctx->cfg_ptr->vlen / 8, data, + ctx->cfg_ptr->vlenb, + ctx->cfg_ptr->vlenb, data, gen_helper_vfwmaccbf16_vv); mark_vs_dirty(ctx); gen_set_label(over);