]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mips.c (mips_no_mips16_string): Remove.
authorRichard Sandiford <rsandifo@redhat.com>
Sun, 10 Aug 2003 08:36:13 +0000 (08:36 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sun, 10 Aug 2003 08:36:13 +0000 (08:36 +0000)
* config/mips/mips.c (mips_no_mips16_string): Remove.
(override_options): Don't handle -mips16 as part of -mipsN.
* config/mips/mips.h (mips_no_mips16_string): Remove declaration.
(TARGET_SWITCHES): Add -mips16 and -mno-mips16 entries.
(TARGET_OPTIONS): Remove -mno-mips16.

From-SVN: r70287

gcc/ChangeLog
gcc/config/mips/mips.c
gcc/config/mips/mips.h

index 0c340370c4aa3623dc12689e0977571ccaccdeb1..5d2d0a6786743ce45e4c9469b73fc8a495b0caae 100644 (file)
@@ -1,3 +1,11 @@
+2003-08-10  Richard Sandiford  <rsandifo@redhat.com>
+
+       * config/mips/mips.c (mips_no_mips16_string): Remove.
+       (override_options): Don't handle -mips16 as part of -mipsN.
+       * config/mips/mips.h (mips_no_mips16_string): Remove declaration.
+       (TARGET_SWITCHES): Add -mips16 and -mno-mips16 entries.
+       (TARGET_OPTIONS): Remove -mno-mips16.
+
 2003-08-10  Richard Sandiford  <rsandifo@redhat.com>
 
        * config/mips/mips-protos.h (coprocessor_operand): Remove declaration.
index 0d0e2a4ff62ace9ea688323c74855556cdf2c73d..18a7954c3845cff8f58b065d8a3a164c854e6159 100644 (file)
@@ -503,11 +503,6 @@ const char *mips_tune_string;   /* for -mtune=<xxx> */
 const char *mips_isa_string;   /* for -mips{1,2,3,4} */
 const char *mips_abi_string;   /* for -mabi={32,n32,64,eabi} */
 
-/* This variable is set by -mno-mips16.  We only care whether
-   -mno-mips16 appears or not, and using a string in this fashion is
-   just a way to avoid using up another bit in target_flags.  */
-const char *mips_no_mips16_string;
-
 /* Whether we are generating mips16 hard float code.  In mips16 mode
    we always set TARGET_SOFT_FLOAT; this variable is nonzero if
    -msoft-float was not specified by the user, which means that we
@@ -4701,32 +4696,22 @@ override_options ()
   if (mips_isa_string != 0)
     {
       /* Handle -mipsN.  */
-
-      if (strcmp (mips_isa_string, "16") == 0)
-       {
-         /* -mips16 specifies an ASE rather than a processor, so don't
-            change mips_arch here.  -mno-mips16 overrides -mips16.  */
-         if (mips_no_mips16_string == NULL)
-           target_flags |= MASK_MIPS16;
-       }
-      else
-       {
-         char *whole_isa_str = concat ("mips", mips_isa_string, NULL);
-         const struct mips_cpu_info *isa_info;
-
-         isa_info = mips_parse_cpu ("-mips option", whole_isa_str);
-         free (whole_isa_str);
-
-         /* -march takes precedence over -mipsN, since it is more descriptive.
-            There's no harm in specifying both as long as the ISA levels
-            are the same.  */
-         if (mips_arch_info != 0 && mips_isa != isa_info->isa)
-           error ("-mips%s conflicts with the other architecture options, which specify a MIPS%d processor",
-                  mips_isa_string, mips_isa);
-
-         /* Set architecture based on the given option.  */
-         mips_set_architecture (isa_info);
-       }
+      char *whole_isa_str = concat ("mips", mips_isa_string, NULL);
+      const struct mips_cpu_info *isa_info;
+
+      isa_info = mips_parse_cpu ("-mips option", whole_isa_str);
+      free (whole_isa_str);
+
+      /* -march takes precedence over -mipsN, since it is more descriptive.
+        There's no harm in specifying both as long as the ISA levels
+        are the same.  */
+      if (mips_arch_info != 0 && mips_isa != isa_info->isa)
+       error ("-mips%s conflicts with the other architecture options, "
+              "which specify a MIPS%d processor",
+              mips_isa_string, mips_isa);
+
+      /* Set architecture based on the given option.  */
+      mips_set_architecture (isa_info);
     }
 
   if (mips_arch_info == 0)
index f1159e54675e6b0b2e7c4b0800e9919a87b4d67f..f1d6fd4f2be21d4f19781a938eab9f4bdbf58994 100644 (file)
@@ -121,7 +121,6 @@ extern const char *mips_tune_string;    /* for -mtune=<xxx> */
 extern const char *mips_isa_string;    /* for -mips{1,2,3,4} */
 extern const char *mips_abi_string;    /* for -mabi={32,n32,64} */
 extern const char *mips_entry_string;  /* for -mentry */
-extern const char *mips_no_mips16_string;/* for -mno-mips16 */
 extern const char *mips_cache_flush_func;/* for -mflush-func= and -mno-flush-func */
 extern int mips_string_length;         /* length of strings for mips16 */
 extern const struct mips_cpu_info mips_cpu_info_table[];
@@ -592,6 +591,10 @@ extern const struct mips_cpu_info *mips_tune_info;
      N_("Use NewABI-style %reloc() assembly operators")},              \
   {"no-explicit-relocs", -MASK_EXPLICIT_RELOCS,                                \
      N_("Use assembler macros instead of relocation operators")},      \
+  {"ips16",              MASK_MIPS16,                                  \
+     N_("Generate mips16 code") },                                     \
+  {"no-mips16",                 -MASK_MIPS16,                                  \
+     N_("Generate normal-mode code") },                                        \
   {"debug",              MASK_DEBUG,                                   \
      NULL},                                                            \
   {"debuga",             MASK_DEBUG_A,                                 \
@@ -718,8 +721,6 @@ extern const struct mips_cpu_info *mips_tune_info;
       N_("Specify a Standard MIPS ISA"), 0},                           \
   { "entry",   &mips_entry_string,                                     \
       N_("Use mips16 entry/exit psuedo ops"), 0},                      \
-  { "no-mips16", &mips_no_mips16_string,                               \
-      N_("Don't use MIPS16 instructions"), 0},                         \
   { "no-flush-func", &mips_cache_flush_func,                           \
       N_("Don't call any cache flush functions"), 0},                  \
   { "flush-func=", &mips_cache_flush_func,                             \