This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb/gdb-7.12-branch] mips-tdep: Rearrange comments in `mips_pseudo_register_type'
- From: Maciej W.Rozycki <macro at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 6 Oct 2016 16:29:16 -0000
- Subject: [binutils-gdb/gdb-7.12-branch] mips-tdep: Rearrange comments in `mips_pseudo_register_type'
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f92cb42932ec343d328f7dbd54d9ca5b542e322e
commit f92cb42932ec343d328f7dbd54d9ca5b542e322e
Author: Maciej W. Rozycki <macro@imgtec.com>
Date: Thu Oct 6 16:19:38 2016 +0100
mips-tdep: Rearrange comments in `mips_pseudo_register_type'
Rearrange comments throughout `mips_pseudo_register_type', placing them
ahead the condtionals they apply to consistently.
gdb/
* mips-tdep.c (mips_pseudo_register_type): Rearrange comments
throughout.
(cherry picked from commit a6912260f813b1493efefd27cbcb6a73d933accc)
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/mips-tdep.c | 20 +++++++++-----------
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ea8fdd1..9cba2b1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-06 Maciej W. Rozycki <macro@imgtec.com>
+
+ * mips-tdep.c (mips_pseudo_register_type): Rearrange comments
+ throughout.
+
2016-10-06 Markus Metzger <markus.t.metzger@intel.com>
* stack.c (frame_info): Call val_print_not_saved instead of
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 4e4d79e..c1ec0d9 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1073,9 +1073,9 @@ mips_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
if (TYPE_LENGTH (rawtype) == 0)
return rawtype;
+ /* Present the floating point registers however the hardware did;
+ do not try to convert between FPU layouts. */
if (mips_float_register_p (gdbarch, rawnum))
- /* Present the floating point registers however the hardware did;
- do not try to convert between FPU layouts. */
return rawtype;
/* Use pointer types for registers if we can. For n32 we can not,
@@ -1102,19 +1102,17 @@ mips_pseudo_register_type (struct gdbarch *gdbarch, int regnum)
&& rawnum < mips_regnum (gdbarch)->dspacc + 6)))
return builtin_type (gdbarch)->builtin_int32;
+ /* The pseudo/cooked view of embedded registers is always
+ 32-bit, even if the target transfers 64-bit values for them.
+ New targets relying on XML descriptions should only transfer
+ the necessary 32 bits, but older versions of GDB expected 64,
+ so allow the target to provide 64 bits without interfering
+ with the displayed type. */
if (gdbarch_osabi (gdbarch) != GDB_OSABI_IRIX
&& gdbarch_osabi (gdbarch) != GDB_OSABI_LINUX
&& rawnum >= MIPS_EMBED_FP0_REGNUM + 32
&& rawnum <= MIPS_LAST_EMBED_REGNUM)
- {
- /* The pseudo/cooked view of embedded registers is always
- 32-bit, even if the target transfers 64-bit values for them.
- New targets relying on XML descriptions should only transfer
- the necessary 32 bits, but older versions of GDB expected 64,
- so allow the target to provide 64 bits without interfering
- with the displayed type. */
- return builtin_type (gdbarch)->builtin_int32;
- }
+ return builtin_type (gdbarch)->builtin_int32;
/* For all other registers, pass through the hardware type. */
return rawtype;