From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id AB7103839D08 for ; Wed, 7 Dec 2022 01:50:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AB7103839D08 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x429.google.com with SMTP id c13so9118638pfp.5 for ; Tue, 06 Dec 2022 17:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=q6dw9zUJn3mDrzUGjgwcxseiV06wKbkxJ7guKSuu7es=; b=fGGDXv3Ha7NYgfAAoYxaxPfTts8jdpWc+O7JySzvA9yyU3EudR/RkXiHkXoZqmB6Ay reg6R74MDfGFSygKLlk7kwpjSNIvH11RaqqQmdw6UNLxOXjS/Sf6h1Lti08wCMhEXxWl lK4SMtwRyRpv46mTGYvbnVk2UXess2KmRv4/yIjOTzRZXbneJyVVMrajAPNw8LSDA56A aBDMm50D826CRZmIuUiPKwQIwZXswEjnBUJDXWkqHGj/r++588X5g4ALXyzVXi0eswOw lyvQLDuL707GJAzk1IOA9SupO/sGiQUg8wY/RYU9+o/T/7Hf7fcUZQPWhT43SnT5fPZI wERw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q6dw9zUJn3mDrzUGjgwcxseiV06wKbkxJ7guKSuu7es=; b=4CdedDHB5ic+Uc1qcmCdVP+7+/nooYQQNYxA6Ugs+VDo/UsV/Ur6IXN6NWi7mD/Aos U2212wE2XZGAO+XMF/ghpgVAFb/XbDGXXpnvsUXI3y3nlYGaGIfoBlX+YGJxTbG4fzOB 2W/S4Zb0vaHIwJiReaVRQgWiLNUobJwzJPkLLKYqnxziqKUOkUBa4cEPuiwcc0MhYDDi HMktSdeDcr5q5w17f7VIZr3HALpmuVwZMaEmJoVTh8K+tj8nXHQNKCQUq7rcgeLv4hZE Jwu2Hw2VZz4Tm2IdPgcb7TuY7K/14JQzVZPZl9xnblm9XyxB2DIiYycuu+5/qSQvtLMk zV8g== X-Gm-Message-State: ANoB5pkncM9HcOvxoxnTKE9tXV6qBZcR/zTCC4s1pbIbhnK15VS4E7Jc OqPIm992ynZcOpa6HluovOzM/gmCGLhv0qAvslg= X-Google-Smtp-Source: AA0mqf5Bw7jmYmq8zuunJfeeBihtYxTFqIX18l78yumQkm6K8XRYH8vsSlcmPCvfFE37iA5YseOAuDCDkE+LVUEf9Fo= X-Received: by 2002:a05:6a00:450b:b0:574:c544:3b5e with SMTP id cw11-20020a056a00450b00b00574c5443b5emr55438952pfb.66.1670377835600; Tue, 06 Dec 2022 17:50:35 -0800 (PST) MIME-Version: 1.0 References: <20221206053947.821648-1-zengxiao@eswincomputing.com> <87a6404yuh.fsf@redhat.com> <202212070944253540835@eswincomputing.com> In-Reply-To: <202212070944253540835@eswincomputing.com> From: Andrew Pinski Date: Tue, 6 Dec 2022 17:50:23 -0800 Message-ID: Subject: Re: Fwd: [PATCH] RISC-V: Correction of machine registers mapping to dwarf registers To: Xiao Zeng Cc: Andrew Burgess , Nelson Chu , gdb-patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Dec 6, 2022 at 5:46 PM Xiao Zeng wrot= e: > > On Tue, Dec 6, 2022 at 12:00:00 AM Andrew Burgess w= rote: > > > >Nelson Chu writes: > > > >> Forward to gdb mailing list and cc Andrew since it seems under the gdb= folder. > >> > > I will mention the gdb patch in the correct mailing list next time=EF=BC= =8Cthanks Nelson. > > >> Thanks > >> Nelson > >> > >> ---------- Forwarded message --------- > >> From: Xiao Zeng > >> Date: Tue, Dec 6, 2022 at 1:39 PM > >> Subject: [PATCH] RISC-V: Correction of machine registers mapping to > >> dwarf registers > >> To: > >> Cc: , , > >> , Xiao Zeng > >> > >> > >> According to the riscv psabi, the mapping relationship between the > >> dwarf registers and the machine registers are as follows: > >> > >> DWARF Number | Register Name | Description > >> 0 - 31 | x0 - x31 | Integer Registers > >> 32 - 63 | f0 - f31 | Floating-point Registers > >> > >> * gdb/riscv-tdep.c (riscv_dwarf_reg_to_regnum): Correct mappin= g > >> boundary register. > > > >Thanks for catching this. I went ahead and merged this patch. > > > >Thanks, > >Andrew > > hi, Andrew > I still don't know why gdb has a separate mailing list as a part of bintu= ils. > Can you give me an explanation when you are free? Because technically they are separate projects with their own release schedules. Just happens they share the same repositories; mostly because BFD is common between the two. Thanks, Andrew > > Thanks > Xiao > > > > >> --- > >> gdb/riscv-tdep.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c > >> index 0a050b272ff..a298623b449 100644 > >> --- a/gdb/riscv-tdep.c > >> +++ b/gdb/riscv-tdep.c > >> @@ -3623,10 +3623,10 @@ riscv_add_reggroups (struct gdbarch *gdbarch) > >> static int > >> riscv_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) > >> { > >> - if (reg < RISCV_DWARF_REGNUM_X31) > >> + if (reg <=3D RISCV_DWARF_REGNUM_X31) > >> return RISCV_ZERO_REGNUM + (reg - RISCV_DWARF_REGNUM_X0); > >> > >> - else if (reg < RISCV_DWARF_REGNUM_F31) > >> + else if (reg <=3D RISCV_DWARF_REGNUM_F31) > >> return RISCV_FIRST_FP_REGNUM + (reg - RISCV_DWARF_REGNUM_F0); > >> > >> else if (reg >=3D RISCV_DWARF_FIRST_CSR && reg <=3D RISCV_DWARF_LAS= T_CSR) > >> -- > >> 2.34.1 > >