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]

Use proper variable for XScale optimizations


XScale optimizations should be selected with arm_tune_xscale not
arm_arch_xscale.  With this patch, using the -mtune=xscale switch now gives
intended result.


<date>  Nicolas Pitre <nico@cam.org>

	* config/arm/arm.c (arm_override_options): Use arm_tune_xscale for
	XScale optimizations not arm_arch_xscale.
	* config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR, MOVE_RATIO): Likewise.


Index: gcc/config/arm/arm.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.297
diff -u -r1.297 arm.c
--- gcc/config/arm/arm.c	17 Oct 2003 10:58:16 -0000	1.297
+++ gcc/config/arm/arm.c	17 Oct 2003 21:08:11 -0000
@@ -837,7 +837,7 @@
   if (optimize_size || (tune_flags & FL_LDSCHED))
     arm_constant_limit = 1;
   
-  if (arm_arch_xscale)
+  if (arm_tune_xscale)
     arm_constant_limit = 2;
 
   /* If optimizing for size, bump the number of instructions that we
Index: gcc/config/arm/arm.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.h,v
retrieving revision 1.207
diff -u -r1.207 arm.h
--- gcc/config/arm/arm.h	17 Oct 2003 10:58:16 -0000	1.207
+++ gcc/config/arm/arm.h	17 Oct 2003 21:08:15 -0000
@@ -799,7 +799,7 @@
   (TYPE_NEEDS_IWMMXT_ALIGNMENT (TYPE) ? IWMMXT_ALIGNMENT : ALIGN)
 
 /* Make strings word-aligned so strcpy from constants will be faster.  */
-#define CONSTANT_ALIGNMENT_FACTOR (TARGET_THUMB || ! arm_arch_xscale ? 1 : 2)
+#define CONSTANT_ALIGNMENT_FACTOR (TARGET_THUMB || ! arm_tune_xscale ? 1 : 2)
     
 #define CONSTANT_ALIGNMENT(EXP, ALIGN)				\
   ((TARGET_REALLY_IWMMXT && TREE_CODE (EXP) == VECTOR_TYPE) ? IWMMXT_ALIGNMENT : \
@@ -2283,7 +2283,7 @@
 #define MOVE_MAX 4
 
 #undef  MOVE_RATIO
-#define MOVE_RATIO (arm_arch_xscale ? 4 : 2)
+#define MOVE_RATIO (arm_tune_xscale ? 4 : 2)
 
 /* Define if operations between registers always perform the operation
    on the full register even if a narrower mode is specified.  */


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