From nobody Tue Nov 26 20:28:31 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=1705357602; cv=none; d=zohomail.com; s=zohoarc; b=IhjJnyWWgTSZQ4AL1MWNwtyVgbsa5+bBW1x/sDU8QfSLg4oNyKWFyCPE+uYwqCA2nxlpYFxO9b2W/MotPLlTkrR45lxwWl07BdPfurh+pKQ84EjqZl2EGt/XqGfCiS9AnR1OaJy0vJsmWeetjVBL9WlHU88uceFlJAy2QIUT3M0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705357602; 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=U9YxTyhvBJBHZnpiGwupT/MZk+RpUH5/F7uqSrQEr/Q=; b=LlSxJhHRM4Q49+WmAz3iri54HhyrIw0l1evjmIWGb5V7j4HU5gW3SAC+9xWea1ngyrjL1Fvsi43ZRqSVtsaav19+RyJQm3iPqVysALHBSBYqFIqWhGX2mf4+apJK/AgWmsWB8LykbczNjs6VCtbdhCJSFJDfcm3TIv/8WI4viiU= 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 1705357602273833.8562538551108; Mon, 15 Jan 2024 14:26:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPVOu-0000XV-Cs; Mon, 15 Jan 2024 17:25:48 -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 1rPVOt-0000XF-JC for qemu-devel@nongnu.org; Mon, 15 Jan 2024 17:25:47 -0500 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rPVOs-000633-6R for qemu-devel@nongnu.org; Mon, 15 Jan 2024 17:25:47 -0500 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6db79e11596so1061921b3a.0 for ; Mon, 15 Jan 2024 14:25:45 -0800 (PST) Received: from grind.. ([152.234.123.64]) by smtp.gmail.com with ESMTPSA id ks19-20020a056a004b9300b006d977f70cd5sm8125940pfb.23.2024.01.15.14.25.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 14:25:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1705357544; x=1705962344; 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=U9YxTyhvBJBHZnpiGwupT/MZk+RpUH5/F7uqSrQEr/Q=; b=lUu5tDHAc+zNN9dmqToM8/bg6PyOBlWULMM7lDh4nIbh+x1LLDc1ydx7Fx/zFwPrj1 hzg+7nLBsahGkC4eQvk+A9ESZX3EN4bWBaBQSeiJBzTabHPrYmMBhAZlP+pJ6vh0m18y ETDOTIC3gxy/OARIDN5quAtjQRpceHAXQHbbge1cEhdu1PHa7F5Beo2wqvhvMJj28lB3 YSEHEQmnwJKL0TVu6kTeuLQUlUEPykAsgbssPNW/OWlsEGo06rIXPRhKbrG9TCKK7//s RR9gXd3J2bmlxbssDjWItJmdf9+HqLRWafr6SCPPl9cKAFXSeE0BOeAoaCMuUadmiicE BbHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705357544; x=1705962344; 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=U9YxTyhvBJBHZnpiGwupT/MZk+RpUH5/F7uqSrQEr/Q=; b=RgAF2SYxW7fINxNEPgZpUG4fUGhkN34rKastn2LoZCkunv4wCTSAMqEfS0uePgqJtE unAU/z+Ncyykh4QyW16Jkyl3oNbM/b4bvvvNN8uZsC1oa0oHjxCjbiBcTynnpgtxu5Nm YV2K1FTpipWYNlhHQ2ImB6A+PHAzReTSQTs/SD934T/at7lpWsYUP+tdvV8WGFd2gRKy 8rgyCJBtBmni1pOwy0p4OKB2yhwjspVO4TuhZSWNrTml/xEXIor7H11f2D6fbuJDJWVU y4isIvEI9fI9slA+jxEhpC0h7mcByIFZU22TC7S75Dl3KjCiMkL/uY9Qd2K8KYSbF7Ws 2V9g== X-Gm-Message-State: AOJu0YyUbc9+XsPYVjVgUXdqP1WFVkDH5yYGn4LGch/9SMafBZzD1M+s +oziSDkm+CZBRm72V9jU+KHaxYGHAprGk/snkN1x2vkc1yLShQ== X-Google-Smtp-Source: AGHT+IEr3GW5oUNZIstQmBwZKZmNCuvBnfjIEwveaICKgZyJfSwg7RZoqMBoPTV9thgA71yX422puA== X-Received: by 2002:aa7:9e49:0:b0:6da:1d19:db46 with SMTP id z9-20020aa79e49000000b006da1d19db46mr6333515pfq.34.1705357544409; Mon, 15 Jan 2024 14:25:44 -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, max.chou@sifive.com, Daniel Henrique Barboza Subject: [PATCH v2 03/12] target/riscv/gdbstub.c: use 'vlenb' instead of shifting 'vlen' Date: Mon, 15 Jan 2024 19:25:19 -0300 Message-ID: <20240115222528.257342-4-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240115222528.257342-1-dbarboza@ventanamicro.com> References: <20240115222528.257342-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::433; envelope-from=dbarboza@ventanamicro.com; helo=mail-pf1-x433.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: 1705357602707100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson --- target/riscv/gdbstub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c index 58b3ace0fe..5ab0abda19 100644 --- a/target/riscv/gdbstub.c +++ b/target/riscv/gdbstub.c @@ -130,7 +130,7 @@ static int riscv_gdb_set_fpu(CPURISCVState *env, uint8_= t *mem_buf, int n) =20 static int riscv_gdb_get_vector(CPURISCVState *env, GByteArray *buf, int n) { - uint16_t vlenb =3D riscv_cpu_cfg(env)->vlen >> 3; + uint16_t vlenb =3D riscv_cpu_cfg(env)->vlenb; if (n < 32) { int i; int cnt =3D 0; @@ -146,7 +146,7 @@ static int riscv_gdb_get_vector(CPURISCVState *env, GBy= teArray *buf, int n) =20 static int riscv_gdb_set_vector(CPURISCVState *env, uint8_t *mem_buf, int = n) { - uint16_t vlenb =3D riscv_cpu_cfg(env)->vlen >> 3; + uint16_t vlenb =3D riscv_cpu_cfg(env)->vlenb; if (n < 32) { int i; for (i =3D 0; i < vlenb; i +=3D 8) { @@ -266,7 +266,7 @@ static int ricsv_gen_dynamic_vector_xml(CPUState *cs, i= nt base_reg) RISCVCPU *cpu =3D RISCV_CPU(cs); GString *s =3D g_string_new(NULL); g_autoptr(GString) ts =3D g_string_new(""); - int reg_width =3D cpu->cfg.vlen; + int reg_width =3D cpu->cfg.vlenb << 3; int num_regs =3D 0; int i; =20 --=20 2.43.0