[patch] rfa: migrate VECTOR_MODE_SUPPORTED_P to target hook

Eric Christopher echristo@redhat.com
Sat Aug 21 02:14:00 GMT 2004


Mainly as an aid to debugging on ports like i386 and soon to be mips.

Pretty much a straight translation. Did some small things to help
readability and debugging.

Tested by bootstrap on i386-linux and test. No regressions. Built cc1
for the embedded targets.

OK? Further testing requested before?

-eric

-- 
Eric Christopher <echristo@redhat.com>

2004-08-20  Eric Christopher  <echristo@redhat.com>

	* defaults.h (VECTOR_MODE_SUPPORTED_P): Remove macro.
	* target-def.h (TARGET_VECTOR_MODE_SUPPORTED_P): Define.
	* target.h: Ditto.
	* expr.c (vector_mode_valid_p): Use.
	* stor-layout.c (layout_type): Ditto.
	* config/alpha/alpha.c (alpha_vector_mode_supported_p): New function.
	Define to target macro.
	* config/alpha/alpha.h (VECTOR_MODE_SUPPORTED_P): Delete.
	* config/arm/arm.c: Ditto. Use.
	* config/arm/arm.h: Ditto.
	* config/arm/arm-protos.h: Ditto.
	* config/i386/i386.c: Ditto.
	* config/i386/i386.h: Ditto.
	* config/rs6000/rs6000.c: Ditto.
	* config/rs6000/rs6000.h: Ditto.
	* config/sh/sh.c: Ditto.
	* config/sh/sh.h: Ditto.
	* config/sh/sh-protos.h: Ditto.
	* config/sh/sh.md: Use.

? fastjar/fastjar.info
Index: gcc/defaults.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/defaults.h,v
retrieving revision 1.149
diff -u -p -w -r1.149 defaults.h
--- gcc/defaults.h	19 Aug 2004 22:24:54 -0000	1.149
+++ gcc/defaults.h	21 Aug 2004 00:23:10 -0000
@@ -660,10 +660,6 @@ You Lose!  You must define PREFERRED_DEB
 #define HAS_LONG_UNCOND_BRANCH 0
 #endif
 
-#ifndef VECTOR_MODE_SUPPORTED_P
-#define VECTOR_MODE_SUPPORTED_P(MODE) 0
-#endif
-
 #ifndef UNITS_PER_SIMD_WORD
 #define UNITS_PER_SIMD_WORD 0
 #endif
Index: gcc/expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.707
diff -u -p -w -r1.707 expr.c
--- gcc/expr.c	18 Aug 2004 21:08:20 -0000	1.707
+++ gcc/expr.c	21 Aug 2004 00:23:17 -0000
@@ -8789,7 +8789,7 @@ vector_mode_valid_p (enum machine_mode m
     return 0;
 
   /* Hardware support.  Woo hoo!  */
-  if (VECTOR_MODE_SUPPORTED_P (mode))
+  if (targetm.vector_mode_supported_p (mode))
     return 1;
 
   innermode = GET_MODE_INNER (mode);
Index: gcc/stor-layout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/stor-layout.c,v
retrieving revision 1.203
diff -u -p -w -r1.203 stor-layout.c
--- gcc/stor-layout.c	20 Aug 2004 14:17:15 -0000	1.203
+++ gcc/stor-layout.c	21 Aug 2004 00:23:19 -0000
@@ -1559,7 +1559,7 @@ layout_type (tree type)
 	    for (; mode != VOIDmode ; mode = GET_MODE_WIDER_MODE (mode))
 	      if (GET_MODE_NUNITS (mode) == nunits
 	  	  && GET_MODE_INNER (mode) == innermode
-	  	  && VECTOR_MODE_SUPPORTED_P (mode))
+	  	  && targetm.vector_mode_supported_p (mode))
 	        break;
 
 	    /* For integers, try mapping it to a same-sized scalar mode.  */
Index: gcc/target-def.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/target-def.h,v
retrieving revision 1.96
diff -u -p -w -r1.96 target-def.h
--- gcc/target-def.h	16 Aug 2004 21:53:21 -0000	1.96
+++ gcc/target-def.h	21 Aug 2004 00:23:19 -0000
@@ -305,6 +305,10 @@ Foundation, 59 Temple Place - Suite 330,
 #define TARGET_VALID_POINTER_MODE default_valid_pointer_mode
 #endif
 
+#ifndef TARGET_VECTOR_MODE_SUPPORTED_P
+#define TARGET_VECTOR_MODE_SUPPORTED_P hook_bool_tree_false
+#endif
+
 #ifndef TARGET_VECTOR_OPAQUE_P
 #define TARGET_VECTOR_OPAQUE_P hook_bool_tree_false
 #endif
@@ -471,6 +475,7 @@ Foundation, 59 Temple Place - Suite 330,
   TARGET_ENCODE_SECTION_INFO,			\
   TARGET_STRIP_NAME_ENCODING,			\
   TARGET_VALID_POINTER_MODE,                    \
+  TARGET_VECTOR_MODE_SUPPORTED_P,               \
   TARGET_VECTOR_OPAQUE_P,			\
   TARGET_RTX_COSTS,				\
   TARGET_ADDRESS_COST,				\
Index: gcc/target.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/target.h,v
retrieving revision 1.107
diff -u -p -w -r1.107 target.h
--- gcc/target.h	16 Aug 2004 20:54:36 -0000	1.107
+++ gcc/target.h	21 Aug 2004 00:23:20 -0000
@@ -381,6 +381,9 @@ struct gcc_target
   /* True if MODE is valid for a pointer in
__attribute__((mode("MODE"))).  */
   bool (* valid_pointer_mode) (enum machine_mode mode);
 
+  /* True if MODE is valid for a vector.  */
+  bool (* vector_mode_supported_p) (enum machine_mode mode);
+
   /* True if a vector is opaque.  */
   bool (* vector_opaque_p) (tree);
 
Index: gcc/config/alpha/alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.387
diff -u -p -w -r1.387 alpha.c
--- gcc/config/alpha/alpha.c	18 Aug 2004 17:05:00 -0000	1.387
+++ gcc/config/alpha/alpha.c	21 Aug 2004 00:23:29 -0000
@@ -670,6 +670,19 @@ alpha_extra_constraint (rtx value, int c
     }
 }
 
+/* Implements target hook vector_mode_supported_p.  */
+static bool
+alpha_vector_mode_supported_p (enum machine_mode mode)
+{
+  if (TARGET_MAX
+      && ((mode == V8QImode)
+	  || (mode == V4HImode)
+	  || (mode == V2SImode)))
+    return true;
+
+  return false;
+}
+
 /* Return 1 if this function can directly return via $26.  */
 
 int
@@ -9349,6 +9362,8 @@ alpha_init_libfuncs (void)
 #define TARGET_SPLIT_COMPLEX_ARG alpha_split_complex_arg
 #undef TARGET_GIMPLIFY_VA_ARG_EXPR
 #define TARGET_GIMPLIFY_VA_ARG_EXPR alpha_gimplify_va_arg
+#undef TARGET_VECTOR_MODE_SUPPORTED_P
+#define TARGET_VECTOR_MODE_SUPPORTED_P alpha_vector_mode_supported_p
 
 #undef TARGET_BUILD_BUILTIN_VA_LIST
 #define TARGET_BUILD_BUILTIN_VA_LIST alpha_build_builtin_va_list
@@ -9357,4 +9372,3 @@ struct gcc_target targetm = TARGET_INITI
 
 
 #include "gt-alpha.h"
-
Index: gcc/config/alpha/alpha.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.h,v
retrieving revision 1.228
diff -u -p -w -r1.228 alpha.h
--- gcc/config/alpha/alpha.h	18 Aug 2004 17:05:02 -0000	1.228
+++ gcc/config/alpha/alpha.h	21 Aug 2004 00:23:31 -0000
@@ -649,12 +649,6 @@ extern const char *alpha_tls_size_string
    ? (MODE) == SFmode || (MODE) == DFmode || (MODE) == DImode		\
    : 1)
 
-/* Value is 1 if MODE is a supported vector mode.  */
-
-#define VECTOR_MODE_SUPPORTED_P(MODE) \
-  (TARGET_MAX \
-   && ((MODE) == V8QImode || (MODE) == V4HImode || (MODE) == V2SImode))
-
 /* A C expression that is nonzero if a value of mode
    MODE1 is accessible in mode MODE2 without copying.
 
Index: gcc/config/arm/arm-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm-protos.h,v
retrieving revision 1.75
diff -u -p -w -r1.75 arm-protos.h
--- gcc/config/arm/arm-protos.h	19 Aug 2004 17:02:02 -0000	1.75
+++ gcc/config/arm/arm-protos.h	21 Aug 2004 00:23:31 -0000
@@ -44,6 +44,7 @@ extern int arm_return_in_memory (tree);
 extern void arm_encode_call_attribute (tree, int);
 #endif
 #ifdef RTX_CODE
+extern bool arm_vector_mode_supported_p (enum machine_mode);
 extern int arm_hard_regno_mode_ok (unsigned int, enum machine_mode);
 extern int const_ok_for_arm (HOST_WIDE_INT);
 extern int arm_split_constant (RTX_CODE, enum machine_mode, rtx,
Index: gcc/config/arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.394
diff -u -p -w -r1.394 arm.c
--- gcc/config/arm/arm.c	19 Aug 2004 17:02:02 -0000	1.394
+++ gcc/config/arm/arm.c	21 Aug 2004 00:23:42 -0000
@@ -246,6 +246,9 @@ static void arm_init_libfuncs (void);
 #undef  TARGET_ADDRESS_COST
 #define TARGET_ADDRESS_COST arm_address_cost
 
+#undef TARGET_VECTOR_MODE_SUPPORTED_P
+#define TARGET_VECTOR_MODE_SUPPORTED_P arm_vector_mode_supported_p
+
 #undef  TARGET_MACHINE_DEPENDENT_REORG
 #define TARGET_MACHINE_DEPENDENT_REORG arm_reorg
 
@@ -2466,7 +2469,7 @@ arm_function_arg (CUMULATIVE_ARGS *pcum,
   /* Varargs vectors are treated the same as long long.
      named_count avoids having to change the way arm handles 'named' */
   if (TARGET_IWMMXT_ABI
-      && VECTOR_MODE_SUPPORTED_P (mode)
+      && arm_vector_mode_supported_p (mode)
       && pcum->named_count > pcum->nargs + 1)
     {
       if (pcum->iwmmxt_nregs <= 9)
@@ -11237,7 +11240,7 @@ arm_assemble_integer (rtx x, unsigned in
       return true;
     }
 
-  if (VECTOR_MODE_SUPPORTED_P (GET_MODE (x)))
+  if (arm_vector_mode_supported_p (GET_MODE (x)))
     {
       int i, units;
 
@@ -15004,3 +15007,14 @@ thumb_set_return_address (rtx source, rt
     emit_move_insn (gen_rtx_REG (Pmode, LR_REGNUM), source);
 }
 
+/* Implements target hook vector_mode_supported_p.  */
+bool
+arm_vector_mode_supported_p (enum machine_mode mode)
+{
+  if ((mode == V2SImode)
+      || (mode == V4HImode)
+      || (mode == V8QImode))
+    return true;
+
+  return false;
+}
Index: gcc/config/arm/arm.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.h,v
retrieving revision 1.251
diff -u -p -w -r1.251 arm.h
--- gcc/config/arm/arm.h	18 Aug 2004 17:05:03 -0000	1.251
+++ gcc/config/arm/arm.h	21 Aug 2004 00:23:45 -0000
@@ -1088,11 +1088,8 @@ extern const char * structure_size_strin
 #define MODES_TIEABLE_P(MODE1, MODE2)  \
   (GET_MODE_CLASS (MODE1) == GET_MODE_CLASS (MODE2))
 
-#define VECTOR_MODE_SUPPORTED_P(MODE) \
- ((MODE) == V2SImode || (MODE) == V4HImode || (MODE) == V8QImode)
-
 #define VALID_IWMMXT_REG_MODE(MODE) \
- (VECTOR_MODE_SUPPORTED_P (MODE) || (MODE) == DImode)
+ (arm_vector_mode_supported_p (MODE) || (MODE) == DImode)
 
 /* The order in which register should be allocated.  It is good to use
ip
    since no saving is required (though calls clobber it) and it never
contains
@@ -1558,7 +1555,7 @@ enum reg_class
    : TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK			\
      && GET_MODE_CLASS (MODE) == MODE_FLOAT				\
    ? gen_rtx_REG (MODE, FIRST_CIRRUS_FP_REGNUM) 			\
-   : TARGET_IWMMXT_ABI && VECTOR_MODE_SUPPORTED_P (MODE)	\
+   : TARGET_IWMMXT_ABI && arm_vector_mode_supported_p (MODE)    	\
    ? gen_rtx_REG (MODE, FIRST_IWMMXT_REGNUM) 				\
    : gen_rtx_REG (MODE, ARG_REGISTER (1)))
 
@@ -1710,7 +1707,7 @@ typedef struct
    this is the number of registers used.
    For args passed entirely in registers or entirely in memory, zero. 
*/
 #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED)	\
-  (VECTOR_MODE_SUPPORTED_P (MODE) ? 0 :				\
+  (arm_vector_mode_supported_p (MODE) ? 0 :				\
        NUM_ARG_REGS > (CUM).nregs				\
    && (NUM_ARG_REGS < ((CUM).nregs + ARM_NUM_REGS2 (MODE, TYPE))	\
    && (CUM).can_split)						\
@@ -1728,7 +1725,7 @@ typedef struct
    (TYPE is null for libcalls where that information may not be
available.)  */
 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)	\
   (CUM).nargs += 1;					\
-  if (VECTOR_MODE_SUPPORTED_P (MODE)			\
+  if (arm_vector_mode_supported_p (MODE)	       	\
       && (CUM).named_count > (CUM).nargs)		\
     (CUM).iwmmxt_nregs += 1;				\
   else							\
Index: gcc/config/i386/i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.713
diff -u -p -w -r1.713 i386.c
--- gcc/config/i386/i386.c	18 Aug 2004 21:08:23 -0000	1.713
+++ gcc/config/i386/i386.c	21 Aug 2004 00:23:57 -0000
@@ -875,6 +875,7 @@ static tree ix86_build_builtin_va_list (
 static void ix86_setup_incoming_varargs (CUMULATIVE_ARGS *, enum
machine_mode,
 					 tree, int *, int);
 static tree ix86_gimplify_va_arg (tree, tree, tree *, tree *);
+static bool ix86_vector_mode_supported_p (enum machine_mode);
 
 static int ix86_address_cost (rtx);
 static bool ix86_cannot_force_const_mem (rtx);
@@ -1065,6 +1066,9 @@ static void init_ext_80387_constants (vo
 #undef TARGET_GIMPLIFY_VA_ARG_EXPR
 #define TARGET_GIMPLIFY_VA_ARG_EXPR ix86_gimplify_va_arg
 
+#undef TARGET_VECTOR_MODE_SUPPORTED_P
+#define TARGET_VECTOR_MODE_SUPPORTED_P ix86_vector_mode_supported_p
+
 #ifdef SUBTARGET_INSERT_ATTRIBUTES
 #undef TARGET_INSERT_ATTRIBUTES
 #define TARGET_INSERT_ATTRIBUTES SUBTARGET_INSERT_ATTRIBUTES
@@ -14910,6 +14914,26 @@ ix86_expand_vector_init (rtx target, rtx
     }
 }
 
+/* Implements target hook vector_mode_supported_p.  */
+static bool
+ix86_vector_mode_supported_p (enum machine_mode mode)
+{
+  if (TARGET_SSE
+      && VALID_SSE_REG_MODE (mode))
+    return true;
+
+  else if (TARGET_MMX
+	   && VALID_MMX_REG_MODE (mode))
+    return true;
+
+  else if (TARGET_3DNOW
+	   && VALID_MMX_REG_MODE_3DNOW (mode))
+    return true;
+
+  else
+    return false;
+}
+
 /* Worker function for TARGET_MD_ASM_CLOBBERS.
 
    We do this in the new i386 backend to maintain source compatibility
Index: gcc/config/i386/i386.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
retrieving revision 1.397
diff -u -p -w -r1.397 i386.h
--- gcc/config/i386/i386.h	18 Aug 2004 15:07:55 -0000	1.397
+++ gcc/config/i386/i386.h	21 Aug 2004 00:24:00 -0000
@@ -1081,11 +1081,6 @@ do {									\
     ((MODE) == DImode || (MODE) == V8QImode || (MODE) == V4HImode	\
      || (MODE) == V2SImode || (MODE) == SImode)
 
-#define VECTOR_MODE_SUPPORTED_P(MODE)					\
-    (VALID_SSE_REG_MODE (MODE) && TARGET_SSE ? 1			\
-     : VALID_MMX_REG_MODE (MODE) && TARGET_MMX ? 1			\
-     : VALID_MMX_REG_MODE_3DNOW (MODE) && TARGET_3DNOW ? 1 : 0)
-
 #define UNITS_PER_SIMD_WORD \
     (TARGET_SSE ? 16 : TARGET_MMX || TARGET_3DNOW ? 8 : 0)
 
Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.694
diff -u -p -w -r1.694 rs6000.c
--- gcc/config/rs6000/rs6000.c	20 Aug 2004 19:07:10 -0000	1.694
+++ gcc/config/rs6000/rs6000.c	21 Aug 2004 00:24:14 -0000
@@ -750,6 +750,7 @@ static tree get_prev_label (tree functio
 static tree rs6000_build_builtin_va_list (void);
 static tree rs6000_gimplify_va_arg (tree, tree, tree *, tree *);
 static bool rs6000_must_pass_in_stack (enum machine_mode, tree);
+static bool rs6000_vector_mode_supported_p (enum machine_mode);
 
 static enum machine_mode rs6000_eh_return_filter_mode (void);
 
@@ -972,6 +973,9 @@ static const char alt_reg_names[][8] =
 #undef TARGET_EH_RETURN_FILTER_MODE
 #define TARGET_EH_RETURN_FILTER_MODE rs6000_eh_return_filter_mode
 
+#undef TARGET_VECTOR_MODE_SUPPORTED_P
+#define TARGET_VECTOR_MODE_SUPPORTED_P rs6000_vector_mode_supported_p
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 
@@ -17620,4 +17624,19 @@ rs6000_eh_return_filter_mode (void)
   return TARGET_32BIT ? SImode : word_mode;
 }
 
+/* Target hook for vector_mode_supported_p.  */
+static bool
+rs6000_vector_mode_supported_p (enum machine_mode mode)
+{
+
+  if (TARGET_SPE && SPE_VECTOR_MODE (mode))
+    return true;
+
+  else if (TARGET_ALTIVEC && ALTIVEC_VECTOR_MODE (mode))
+    return true;
+
+  else
+    return false;
+}
+
 #include "gt-rs6000.h"
Index: gcc/config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.335
diff -u -p -w -r1.335 rs6000.h
--- gcc/config/rs6000/rs6000.h	18 Aug 2004 17:05:10 -0000	1.335
+++ gcc/config/rs6000/rs6000.h	21 Aug 2004 00:24:17 -0000
@@ -1027,14 +1027,6 @@ extern const char *rs6000_warn_altivec_l
          || (MODE) == V1DImode          \
          || (MODE) == V2SImode)
 
-/* Define this macro to be nonzero if the port is prepared to handle
-   insns involving vector mode MODE.  At the very least, it must have
-   move patterns for this mode.  */
-
-#define VECTOR_MODE_SUPPORTED_P(MODE)			\
-        ((TARGET_SPE && SPE_VECTOR_MODE (MODE))		\
-	 || (TARGET_ALTIVEC && ALTIVEC_VECTOR_MODE (MODE)))
-
 #define UNITS_PER_SIMD_WORD     \
         (TARGET_ALTIVEC ? 16 : (TARGET_SPE ? 8 : 0) )
 
Index: gcc/config/sh/sh-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh-protos.h,v
retrieving revision 1.58
diff -u -p -w -r1.58 sh-protos.h
--- gcc/config/sh/sh-protos.h	28 Jul 2004 09:13:54 -0000	1.58
+++ gcc/config/sh/sh-protos.h	21 Aug 2004 00:24:17 -0000
@@ -101,6 +101,7 @@ extern int sh_can_redirect_branch (rtx, 
 extern void sh_expand_unop_v2sf (enum rtx_code, rtx, rtx);
 extern void sh_expand_binop_v2sf (enum rtx_code, rtx, rtx, rtx);
 extern int sh_expand_t_scc (enum rtx_code code, rtx target);
+extern bool sh_vector_mode_supported_p (enum machine_mode);
 #ifdef TREE_CODE
 extern void sh_va_start (tree, rtx);
 #endif /* TREE_CODE */
Index: gcc/config/sh/sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.293
diff -u -p -w -r1.293 sh.c
--- gcc/config/sh/sh.c	18 Aug 2004 21:08:33 -0000	1.293
+++ gcc/config/sh/sh.c	21 Aug 2004 00:24:25 -0000
@@ -444,6 +444,9 @@ static bool sh_pass_by_reference (CUMULA
 #undef TARGET_GIMPLIFY_VA_ARG_EXPR
 #define TARGET_GIMPLIFY_VA_ARG_EXPR sh_gimplify_va_arg_expr
 
+#undef TARGET_VECTOR_MODE_SUPPORTED_P
+#define TARGET_VECTOR_MODE_SUPPORTED_P sh_vector_mode_supported_p
+
 #undef TARGET_PCH_VALID_P
 #define TARGET_PCH_VALID_P sh_pch_valid_p
 
@@ -9338,6 +9341,26 @@ sh_media_init_builtins (void)
     }
 }
 
+/* Implements target hook vector_mode_supported_p.  */
+bool
+sh_vector_mode_supported_p (enum machine_mode mode)
+{
+  if (TARGET_FPU_ANY
+      && ((mode == V2SFmode)
+	  || (mode == V4SFmode)
+	  || (mode == V16SFmode)))
+    return true;
+
+  else if (TARGET_SHMEDIA
+	   && ((mode == V8QImode)
+	       || (mode == V2HImode)
+	       || (mode == V4HImode)
+	       || (mode == V2SImode)))
+    return true;
+
+  return false;
+}
+
 static void
 sh_init_builtins (void)
 {
Index: gcc/config/sh/sh.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.h,v
retrieving revision 1.255
diff -u -p -w -r1.255 sh.h
--- gcc/config/sh/sh.h	18 Aug 2004 17:42:55 -0000	1.255
+++ gcc/config/sh/sh.h	21 Aug 2004 00:24:28 -0000
@@ -1303,14 +1303,6 @@ extern char sh_additional_register_names
    : (REGNO) == FPSCR_REG ? (MODE) == PSImode \
    : 1)
 
-/* Value is 1 if MODE is a supported vector mode.  */
-#define VECTOR_MODE_SUPPORTED_P(MODE) \
-  ((TARGET_FPU_ANY \
-    && ((MODE) == V2SFmode || (MODE) == V4SFmode || (MODE) ==
V16SFmode)) \
-   || (TARGET_SHMEDIA \
-       && ((MODE) == V8QImode || (MODE) == V2HImode || (MODE) ==
V4HImode \
-	   || (MODE) == V2SImode)))
-
 /* Value is 1 if it is a good idea to tie two pseudo registers
    when one has mode MODE1 and one has mode MODE2.
    If HARD_REGNO_MODE_OK could produce different values for MODE1 and
MODE2,
Index: gcc/config/sh/sh.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.md,v
retrieving revision 1.183
diff -u -p -w -r1.183 sh.md
--- gcc/config/sh/sh.md	18 Aug 2004 17:42:55 -0000	1.183
+++ gcc/config/sh/sh.md	21 Aug 2004 00:24:37 -0000
@@ -9666,7 +9666,7 @@ mov.l\\t1f,r0\\n\\
 	(match_operand 1 "sh_rep_vec" ""))]
   "TARGET_SHMEDIA && reload_completed
    && GET_MODE (operands[0]) == GET_MODE (operands[1])
-   && VECTOR_MODE_SUPPORTED_P (GET_MODE (operands[0]))
+   && sh_vector_mode_supported_p (GET_MODE (operands[0]))
    && GET_MODE_SIZE (GET_MODE (operands[0])) == 8
    && (XVECEXP (operands[1], 0, 0) != const0_rtx
        || XVECEXP (operands[1], 0, 1) != const0_rtx)
@@ -9710,7 +9710,7 @@ mov.l\\t1f,r0\\n\\
 	(match_operand 1 "sh_const_vec" ""))]
   "TARGET_SHMEDIA && reload_completed
    && GET_MODE (operands[0]) == GET_MODE (operands[1])
-   && VECTOR_MODE_SUPPORTED_P (GET_MODE (operands[0]))
+   && sh_vector_mode_supported_p (GET_MODE (operands[0]))
    && operands[1] != CONST0_RTX (GET_MODE (operands[1]))"
   [(set (match_dup 0) (match_dup 1))]
   "
@@ -10946,4 +10946,3 @@ mov.l\\t1f,r0\\n\\
   return \"\";
 }"
   [(set_attr "type" "other")])
-




More information about the Gcc-patches mailing list