public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] RISC-V: Improve FP register support.
@ 2018-10-19 21:46 Jim Wilson
  2018-10-19 21:49 ` [PATCH 1/2] RISC-V: Print FP regs as union of float types Jim Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jim Wilson @ 2018-10-19 21:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess, Jim Wilson

The first patch improves printing of values in FP registers.  A 64-bit FP
register can hold either float or double, and they are currently printed as
only double.  The patch changes this to print them as both float and
double.  Without the patch I see
(gdb) print $fa0
$1 = -nan(0xfffff3f828f5c)
With the patch I see
(gdb) print $fa0
$1 = {float = 1.01999998, double = -nan(0xfffff3f828f5c)}

The second patch fixes problems with inferior calls, when passing single
float values in 64-bit FP registers.  The hardware requires that they
be NaN-boxed, which means the upper 32-bits must be ones, so that they
look like a 64-bit NaN.  See the above for instance.  These values are
currently zero extended.

Tested with a gdb testsuite run on a HiFive Unleashed running fedora
core 29.  The first patch has no effect on the results.  The second
patch fixes about 74 testcases in gdb.base, for call*, infcall*, and
struct* testcases.

Jim

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-10-25 23:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-19 21:46 [PATCH 0/2] RISC-V: Improve FP register support Jim Wilson
2018-10-19 21:49 ` [PATCH 1/2] RISC-V: Print FP regs as union of float types Jim Wilson
2018-10-20 21:38   ` Kevin Buettner
2018-10-22 21:22     ` Jim Wilson
2018-10-19 21:50 ` [PATCH 2/2] RISC-V: NaN-box FP values smaller than an FP register Jim Wilson
2018-10-20 21:39   ` Kevin Buettner
2018-10-22 21:21     ` Jim Wilson
2018-10-23 11:18 ` [PATCH 0/2] RISC-V: Improve FP register support Pedro Alves
2018-10-25 23:49   ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).