aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>2018-05-22 11:09:05 -0300
committerPedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>2018-05-22 11:52:03 -0300
commit0fb2aaa15e04238644471f7d89be3667784b19c0 (patch)
tree608d8c12da0e6ff0ca24916e760b4b2256327267
parent2c3305f6b0432e37d26ce7761d0c4415ab5ca911 (diff)
downloadgdb-0fb2aaa15e04238644471f7d89be3667784b19c0.zip
gdb-0fb2aaa15e04238644471f7d89be3667784b19c0.tar.gz
gdb-0fb2aaa15e04238644471f7d89be3667784b19c0.tar.bz2
[PowerPC] Fix inclusion of dfp pseudoregs in tdep
Previously, decimal floating point pseudoregisters were always included in the target if it had a floating point unit. This patch changes this to only include them if the target description indicates that they are present, i.e. if the FPSCR register has more than 32 bits. gdb/ChangeLog: 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com> * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only if the size of fpscr is larger than 32 bits.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/rs6000-tdep.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9e74395..db8a6a7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
+ * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
+ if the size of fpscr is larger than 32 bits.
+
+2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
+
* ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
(ppc32_linux_vsxregmap): New global.
(ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 0a56c78..ff4699c 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -5981,14 +5981,16 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
return NULL;
}
have_fpu = 1;
+
+ /* The fpscr register was expanded in isa 2.05 to 64 bits
+ along with the addition of the decimal floating point
+ facility. */
+ if (tdesc_register_size (feature, "fpscr") > 32)
+ have_dfp = 1;
}
else
have_fpu = 0;
- /* The DFP pseudo-registers will be available when there are floating
- point registers. */
- have_dfp = have_fpu;
-
feature = tdesc_find_feature (tdesc,
"org.gnu.gdb.power.altivec");
if (feature != NULL)