This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit/alpha] zero register only in all_reggroup
- From: Richard Henderson <rth at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 2 Jun 2003 15:52:53 -0700
- Subject: [commit/alpha] zero register only in all_reggroup
The comment should explain the rationale sufficiently.
r~
* alpha-tdep.c (alpha_register_reggroup_p): Zero is only
a member of all_reggroup.
Index: alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.107
diff -c -p -d -r1.107 alpha-tdep.c
*** alpha-tdep.c 2 Jun 2003 22:43:31 -0000 1.107
--- alpha-tdep.c 2 Jun 2003 22:51:32 -0000
*************** alpha_register_reggroup_p (struct gdbarc
*** 107,116 ****
if (REGISTER_NAME (regnum) == NULL || *REGISTER_NAME (regnum) == '\0')
return 0;
! /* Since we implement no pseudo registers, save/restore is equal to all. */
! if (group == all_reggroup
! || group == save_reggroup
! || group == restore_reggroup)
return 1;
/* All other groups are non-overlapping. */
--- 107,124 ----
if (REGISTER_NAME (regnum) == NULL || *REGISTER_NAME (regnum) == '\0')
return 0;
! if (group == all_reggroup)
! return 1;
!
! /* Zero should not be saved or restored. Technically it is a general
! register (just as $f31 would be a float if we represented it), but
! there's no point displaying it during "info regs", so leave it out
! of all groups except for "all". */
! if (regnum == ALPHA_ZERO_REGNUM)
! return 0;
!
! /* All other registers are saved and restored. */
! if (group == save_reggroup || group == restore_reggroup)
return 1;
/* All other groups are non-overlapping. */