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]

[PATCH] Disable TARGET_POWER on Darwin and PPC SVR4.


	This patch converts the TARGET_POWER test to the constant 0,
disabling patterns that use the flag.  This will allow genconditions to
find more constant conditions and the optimizers to short-circuit some
tests, and should speed up the compiler on those targets.

Is the Darwin patch okay with the Darwin maintainers?

Thanks, David


	* config/rs6000/sysv4.h (TARGET_POWER): Define as 0.
	* config/rs6000/darwin.h (TARGET_POWER): Define as 0.

Index: sysv4.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/sysv4.h,v
retrieving revision 1.154
diff -c -p -r1.154 sysv4.h
*** sysv4.h	8 Oct 2004 07:04:27 -0000	1.154
--- sysv4.h	29 Oct 2004 14:53:19 -0000
*************** do {									\
*** 324,329 ****
--- 324,333 ----
  #undef	PROCESSOR_DEFAULT
  #define	PROCESSOR_DEFAULT PROCESSOR_PPC750
  
+ /* SVR4 only defined for PowerPC, so short-circuit POWER patterns.  */
+ #undef  TARGET_POWER
+ #define TARGET_POWER 0
+ 
  #define FIXED_R2 1
  /* System V.4 uses register 13 as a pointer to the small data area,
     so it is not available to the normal user.  */
Index: darwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/darwin.h,v
retrieving revision 1.67
diff -c -p -r1.67 darwin.h
*** darwin.h	28 Oct 2004 22:32:40 -0000	1.67
--- darwin.h	29 Oct 2004 14:53:19 -0000
*************** do {									\
*** 293,298 ****
--- 293,302 ----
  #define TARGET_DEFAULT (MASK_POWERPC | MASK_MULTIPLE | MASK_NEW_MNEMONICS \
                        | MASK_PPC_GFXOPT)
  
+ /* Darwin only runs on PowerPC, so short-circuit POWER patterns.  */
+ #undef  TARGET_POWER
+ #define TARGET_POWER 0
+ 
  /* Since Darwin doesn't do TOCs, stub this out.  */
  
  #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE)  0


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