This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]