This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: patch: powerpc CALL_REALLY_USED_REGISTERS



> 	If vrsave must be fixed and call_used (as I believe it must), then
> going the call_really_used route is okay.

done

> 	However, you must update all places that set call_used in the port

done

> and must test on AIX.  Please post the updated patch and your test results
> confirming no new regressions.

bootstrapped on both aix and ppc linux.  no regressions.  boy, aix took
forever.

ok?

2001-11-29  Aldy Hernandez  <aldyh@redhat.com>

	* rs6000.h (CALL_REALLY_USED_REGISTERS): New.
	(CONDITIONAL_REGISTER_USAGE): Set call_really_used_registers to
	the values in call_used_registers.

Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.143
diff -c -p -r1.143 rs6000.h
*** rs6000.h	2001/11/22 02:19:56	1.143
--- rs6000.h	2001/11/30 05:04:57
*************** extern int rs6000_debug_arg;		/* debug a
*** 725,730 ****
--- 725,747 ----
     1						   \
  }
  
+ /* Like `CALL_USED_REGISTERS' except this macro doesn't require that
+    the entire set of `FIXED_REGISTERS' be included.
+    (`CALL_USED_REGISTERS' must be a superset of `FIXED_REGISTERS').
+    This macro is optional.  If not specified, it defaults to the value
+    of `CALL_USED_REGISTERS'.  */
+ 		       
+ #define CALL_REALLY_USED_REGISTERS  \
+   {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, FIXED_R13, 0, 0, \
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, \
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+    1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1,	   \
+    /* AltiVec registers.  */			   \
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+    0						   \
+ }
  
  #define MQ_REGNO     64
  #define CR0_REGNO    68
*************** extern int rs6000_debug_arg;		/* debug a
*** 928,950 ****
    if (! TARGET_POWER)							\
      fixed_regs[64] = 1;							\
    if (TARGET_64BIT)							\
!     fixed_regs[13] = call_used_regs[13] = 1; 				\
    if (TARGET_SOFT_FLOAT)						\
      for (i = 32; i < 64; i++)						\
!       fixed_regs[i] = call_used_regs[i] = 1; 				\
    if (DEFAULT_ABI == ABI_V4 && flag_pic == 1)				\
      fixed_regs[PIC_OFFSET_TABLE_REGNUM]					\
!       = call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;			\
    if (DEFAULT_ABI == ABI_DARWIN && flag_pic)				\
      global_regs[PIC_OFFSET_TABLE_REGNUM]				\
        = fixed_regs[PIC_OFFSET_TABLE_REGNUM]				\
!         = call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;			\
    if (! TARGET_ALTIVEC)							\
      for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i)		\
!       fixed_regs[i] = call_used_regs[i] = 1;				\
    if (TARGET_ALTIVEC_ABI)						\
      for (i = FIRST_ALTIVEC_REGNO; i < FIRST_ALTIVEC_REGNO + 20; ++i)	\
!       call_used_regs[i] = 1;						\
  }
  
  /* Specify the registers used for certain standard purposes.
--- 945,971 ----
    if (! TARGET_POWER)							\
      fixed_regs[64] = 1;							\
    if (TARGET_64BIT)							\
!     fixed_regs[13] = call_used_regs[13]					\
!       = call_really_used_regs[13] = 1; 					\
    if (TARGET_SOFT_FLOAT)						\
      for (i = 32; i < 64; i++)						\
!       fixed_regs[i] = call_used_regs[i]					\
!         = call_really_used_regs[i] = 1;					\
    if (DEFAULT_ABI == ABI_V4 && flag_pic == 1)				\
      fixed_regs[PIC_OFFSET_TABLE_REGNUM]					\
!       = call_used_regs[PIC_OFFSET_TABLE_REGNUM]				\
!       = call_really_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;		\
    if (DEFAULT_ABI == ABI_DARWIN && flag_pic)				\
      global_regs[PIC_OFFSET_TABLE_REGNUM]				\
        = fixed_regs[PIC_OFFSET_TABLE_REGNUM]				\
!       = call_used_regs[PIC_OFFSET_TABLE_REGNUM]				\
!       = call_really_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;		\
    if (! TARGET_ALTIVEC)							\
      for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i)		\
!       fixed_regs[i] = call_used_regs[i] = call_really_used_regs[i] = 1;	\
    if (TARGET_ALTIVEC_ABI)						\
      for (i = FIRST_ALTIVEC_REGNO; i < FIRST_ALTIVEC_REGNO + 20; ++i)	\
!       call_used_regs[i] = call_really_used_regs[i] = 1;			\
  }
  
  /* Specify the registers used for certain standard purposes.


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