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]

PATCH: S/390: clarify register size selection



2001-12-19  Jim Blandy  <jimb@redhat.com>

	* s390-tdep.c (s390_register_raw_size): Replace unnecessarily
	obscure range comparison with legible equivalent.

Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/s390-tdep.c,v
retrieving revision 2.29
diff -c -r2.29 s390-tdep.c
*** gdb/s390-tdep.c	2001/12/07 22:50:10	2.29
--- gdb/s390-tdep.c	2001/12/19 22:16:51
***************
*** 42,55 ****
  
  
  /* Number of bytes of storage in the actual machine representation
!    for register N. 
!    Note that the unsigned cast here forces the result of the
!    subtraction to very high positive values if N < S390_FP0_REGNUM */
  int
  s390_register_raw_size (int reg_nr)
  {
!   return ((unsigned) reg_nr - S390_FP0_REGNUM) <
!     S390_NUM_FPRS ? S390_FPR_SIZE : 4;
  }
  
  int
--- 42,56 ----
  
  
  /* Number of bytes of storage in the actual machine representation
!    for register N.  */
  int
  s390_register_raw_size (int reg_nr)
  {
!   if (S390_FP0_REGNUM <= reg_nr
!       && reg_nr < S390_FP0_REGNUM + S390_NUM_FPRS)
!     return S390_FPR_SIZE;
!   else
!     return 4;
  }
  
  int


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