From: Jim Wilson <jimw@sifive.com>
To: gdb-patches@sourceware.org
Cc: Jim Wilson <jimw@sifive.com>
Subject: [PATCH] RISC-V: Fix xlen to flen typo in FP reg handling.
Date: Sat, 03 Nov 2018 03:20:00 -0000 [thread overview]
Message-ID: <20181103032033.21653-1-jimw@sifive.com> (raw)
This fixes a bug in FP register handling for targets where xlen != flen.
Tested against riscv-test/debug where it fixes a few failures. Also tested
on RV64GC linux with the gdb testsuite where it has no effect.
gdb/
* riscv-tdep.c (riscv_register_type): Use riscv_isa_flen for FP regs
not riscv_isa_xlen.
---
gdb/riscv-tdep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c
index db372e2163..b94802aa97 100644
--- a/gdb/riscv-tdep.c
+++ b/gdb/riscv-tdep.c
@@ -630,7 +630,7 @@ riscv_register_type (struct gdbarch *gdbarch, int regnum)
}
else if (regnum <= RISCV_LAST_FP_REGNUM)
{
- regsize = riscv_isa_xlen (gdbarch);
+ regsize = riscv_isa_flen (gdbarch);
switch (regsize)
{
case 4:
--
2.17.1
next reply other threads:[~2018-11-03 3:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-03 3:20 Jim Wilson [this message]
2018-11-03 8:35 ` Andrew Burgess
2018-11-03 20:14 ` Jim Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181103032033.21653-1-jimw@sifive.com \
--to=jimw@sifive.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox