aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
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 /gdb/rs6000-tdep.c
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.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c6
1 files changed, 4 insertions, 2 deletions
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