OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / config / frv / frv.c
index dac5323..5b0c084 100644 (file)
@@ -49,7 +49,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "integrate.h"
 #include "langhooks.h"
 #include "df.h"
-#include "opts.h"
 
 #ifndef FRV_INLINE
 #define FRV_INLINE inline
@@ -256,15 +255,8 @@ enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];
 /* Cached value of frv_stack_info.  */
 static frv_stack_t *frv_stack_cache = (frv_stack_t *)0;
 
-/* -mcpu= support */
-frv_cpu_t frv_cpu_type = CPU_TYPE;     /* value of -mcpu= */
-
 /* Forward references */
 
-static bool frv_handle_option                  (struct gcc_options *,
-                                                struct gcc_options *,
-                                                const struct cl_decoded_option *,
-                                                location_t);
 static void frv_option_override                        (void);
 static bool frv_legitimate_address_p           (enum machine_mode, rtx, bool);
 static int frv_default_flags_for_cpu           (void);
@@ -380,7 +372,7 @@ static int frv_memory_move_cost                     (enum machine_mode,
 static void frv_asm_out_constructor            (rtx, int);
 static void frv_asm_out_destructor             (rtx, int);
 static bool frv_function_symbol_referenced_p   (rtx);
-static bool frv_cannot_force_const_mem         (rtx);
+static bool frv_cannot_force_const_mem         (enum machine_mode, rtx);
 static const char *unspec_got_name             (int);
 static void frv_output_const_unspec            (FILE *,
                                                 const struct frv_unspec *);
@@ -444,8 +436,6 @@ static const struct default_options frv_option_optimization_table[] =
    | MASK_VLIW_BRANCH                          \
    | MASK_MULTI_CE                             \
    | MASK_NESTED_CE)
-#undef TARGET_HANDLE_OPTION
-#define TARGET_HANDLE_OPTION frv_handle_option
 #undef TARGET_OPTION_OVERRIDE
 #define TARGET_OPTION_OVERRIDE frv_option_override
 #undef TARGET_OPTION_OPTIMIZATION_TABLE
@@ -626,54 +616,12 @@ frv_const_unspec_p (rtx x, struct frv_unspec *unspec)
    4. In many cases, it's more efficient to calculate the constant in-line.  */
 
 static bool
-frv_cannot_force_const_mem (rtx x ATTRIBUTE_UNUSED)
+frv_cannot_force_const_mem (enum machine_mode mode ATTRIBUTE_UNUSED,
+                           rtx x ATTRIBUTE_UNUSED)
 {
   return TARGET_FDPIC;
 }
 \f
-/* Implement TARGET_HANDLE_OPTION.  */
-
-static bool
-frv_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
-                  const struct cl_decoded_option *decoded,
-                  location_t loc ATTRIBUTE_UNUSED)
-{
-  size_t code = decoded->opt_index;
-  const char *arg = decoded->arg;
-
-  gcc_assert (opts == &global_options);
-  gcc_assert (opts_set == &global_options_set);
-
-  switch (code)
-    {
-    case OPT_mcpu_:
-      if (strcmp (arg, "simple") == 0)
-       frv_cpu_type = FRV_CPU_SIMPLE;
-      else if (strcmp (arg, "tomcat") == 0)
-       frv_cpu_type = FRV_CPU_TOMCAT;
-      else if (strcmp (arg, "fr550") == 0)
-       frv_cpu_type = FRV_CPU_FR550;
-      else if (strcmp (arg, "fr500") == 0)
-       frv_cpu_type = FRV_CPU_FR500;
-      else if (strcmp (arg, "fr450") == 0)
-       frv_cpu_type = FRV_CPU_FR450;
-      else if (strcmp (arg, "fr405") == 0)
-       frv_cpu_type = FRV_CPU_FR405;
-      else if (strcmp (arg, "fr400") == 0)
-       frv_cpu_type = FRV_CPU_FR400;
-      else if (strcmp (arg, "fr300") == 0)
-       frv_cpu_type = FRV_CPU_FR300;
-      else if (strcmp (arg, "frv") == 0)
-       frv_cpu_type = FRV_CPU_GENERIC;
-      else
-       return false;
-      return true;
-
-    default:
-      return true;
-    }
-}
-
 static int
 frv_default_flags_for_cpu (void)
 {