aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilliam <pgilliam@us.ibm.com>2005-09-01 18:09:41 +0000
committerPaul Gilliam <pgilliam@us.ibm.com>2005-09-01 18:09:41 +0000
commit826d537610a64d140eb715fba9cd29d834bbfc14 (patch)
treee15c543103c1946f08c927f6a83ab7fbb2f52228
parente9df6573ba865dc6aa5328277ad81922a7ac3ee3 (diff)
downloadgdb-826d537610a64d140eb715fba9cd29d834bbfc14.zip
gdb-826d537610a64d140eb715fba9cd29d834bbfc14.tar.gz
gdb-826d537610a64d140eb715fba9cd29d834bbfc14.tar.bz2
20050901 Paul Gilliam <pgilliam@us.ibm.com>
* ppc-tdep.h (struct gdbarch_tdep): Better explanation of using -1 for nonexistant registers. * rs6000-tdep.c (rs6000_register_reggroup_p): Don't assume that tdep->ppc_vr0_regnum and tdep->ppc_ev0_regnum are not -1.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/ppc-tdep.h27
-rw-r--r--gdb/rs6000-tdep.c6
3 files changed, 28 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4dc536d..86a149c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+20050901 Paul Gilliam <pgilliam@us.ibm.com>
+
+ * ppc-tdep.h (struct gdbarch_tdep): Better explanation of using
+ -1 for nonexistant registers.
+ * rs6000-tdep.c (rs6000_register_reggroup_p): Don't assume that
+ tdep->ppc_vr0_regnum and tdep->ppc_ev0_regnum are not -1.
+
2005-09-01 Richard Earnshaw <richard.earnshaw@arm.com>
* arm-linux-tdep.c (arm_linux_push_arguments): Delete.
diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h
index a2c77da..5037c11 100644
--- a/gdb/ppc-tdep.h
+++ b/gdb/ppc-tdep.h
@@ -152,26 +152,33 @@ struct gdbarch_tdep
int ppc_ctr_regnum; /* Count register */
int ppc_xer_regnum; /* Integer exception register */
- /* On PPC and RS6000 variants that have no floating-point
- registers, the next two members will be -1. */
+ /* Not all PPC and RS6000 variants will have the registers
+ represented below. A -1 is used to indicate that the register
+ is not present in this variant. */
+
+ /* Floating-point registers. */
int ppc_fp0_regnum; /* floating-point register 0 */
- int ppc_fpscr_regnum; /* Floating point status and condition
- register */
+ int ppc_fpscr_regnum; /* fp status and condition register */
+
+ /* Segment registers. */
+ int ppc_sr0_regnum; /* segment register 0 */
- int ppc_sr0_regnum; /* segment register 0, or -1 on
- variants that have no segment
- registers. */
+ /* Multiplier-Quotient Register (older POWER architectures only). */
+ int ppc_mq_regnum;
- int ppc_mq_regnum; /* Multiply/Divide extension register */
+ /* Altivec registers. */
int ppc_vr0_regnum; /* First AltiVec register */
int ppc_vrsave_regnum; /* Last AltiVec register */
+
+ /* SPE registers. */
int ppc_ev0_upper_regnum; /* First GPR upper half register */
int ppc_ev0_regnum; /* First ev register */
int ppc_ev31_regnum; /* Last ev register */
int ppc_acc_regnum; /* SPE 'acc' register */
int ppc_spefscr_regnum; /* SPE 'spefscr' register */
- int lr_frame_offset; /* Offset to ABI specific location where
- link register is saved. */
+
+ /* Offset to ABI specific location where link register is saved. */
+ int lr_frame_offset;
/* An array of integers, such that sim_regno[I] is the simulator
register number for GDB register number I, or -1 if the
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 7f37d3e..fb350ef 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -1882,9 +1882,11 @@ rs6000_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
if (group == float_reggroup)
return float_p;
- vector_p = ((regnum >= tdep->ppc_vr0_regnum
+ vector_p = ((tdep->ppc_vr0_regnum >= 0
+ && regnum >= tdep->ppc_vr0_regnum
&& regnum < tdep->ppc_vr0_regnum + 32)
- || (regnum >= tdep->ppc_ev0_regnum
+ || (tdep->ppc_ev0_regnum >= 0
+ && regnum >= tdep->ppc_ev0_regnum
&& regnum < tdep->ppc_ev0_regnum + 32)
|| regnum == tdep->ppc_vrsave_regnum
|| regnum == tdep->ppc_acc_regnum