[PATCH] MIPS: Consolidate printing of floating point registers

cgd@broadcom.com cgd@broadcom.com
Sat Apr 5 20:03:00 GMT 2003


At Sat, 5 Apr 2003 00:09:22 +0000 (UTC), "Kevin Buettner" wrote:
> Also, for some MIPS parts, floating point registers may contain values
> which are not really floating point numbers, so a hex display of these
> registers is useful.  (Thanks to Chris Demetriou for telling me about
> this.)

To explain further to casual but interested readers:

(a) it's possible to load/store random values thru the FP regs.

(b) since the r3000 AFAIK, it's been possible to convert FP values to
integer values in FP regs.  (cvt.w.<fmt>) Starting with MIPS III (r4k)
you an also do this for 64-bit intever values, using cvt.d.<fmt>.

(c) MIPS V adds other formats, e.g. "Paired Single", in which two FP
single values are in a single FP register.  (It's v2sf in gcc
modespeak. 8-)


printing out FP values as singles & doubles is often the right thing
(since usually a given FP reg will contain one or the other) but, to
look at it another way, if you do that then between 0 and 1 of the 2
values you've printed are actually correct.  Printing the hex value as
well is fairly horrible, but at least you're given at least one value
that's correct.  8-)


chris



More information about the Gdb-patches mailing list