linux.h (TARGET_DEFAULT): Remove MASK_USERMODE.
authorKaz Kojima <kkojima@gcc.gnu.org>
Thu, 14 Mar 2013 03:01:53 +0000 (03:01 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Thu, 14 Mar 2013 03:01:53 +0000 (03:01 +0000)
* config/sh/linux.h (TARGET_DEFAULT): Remove MASK_USERMODE.
(SUBTARGET_OVERRIDE_OPTIONS): Set TARGET_USERMODE as default.
* config/sh/netbsd-elf.h (TARGET_DEFAULT): Remove MASK_USERMODE.
(SUBTARGET_OVERRIDE_OPTIONS): New.

From-SVN: r196646

gcc/ChangeLog
gcc/config/sh/linux.h
gcc/config/sh/netbsd-elf.h

index e2cd655971acb9940ff86a81f6e2994ab382abbe..cd69f0cf6a742c72fa7e6571a292c18701c5578c 100644 (file)
@@ -1,3 +1,10 @@
+2013-03-14  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       * config/sh/linux.h (TARGET_DEFAULT): Remove MASK_USERMODE.
+       (SUBTARGET_OVERRIDE_OPTIONS): Set TARGET_USERMODE as default.
+       * config/sh/netbsd-elf.h (TARGET_DEFAULT): Remove MASK_USERMODE.
+       (SUBTARGET_OVERRIDE_OPTIONS): New.
+
 2013-03-13  Oleg Endo  <olegendo@gcc.gnu.org>
 
        PR target/49880
index 8bc7de83ab089bf7aecd968ce1dfc7b92e03450b..9e8f32d06d1a4f6dea2b3e8920bae90541015489 100644 (file)
@@ -39,8 +39,7 @@ along with GCC; see the file COPYING3.  If not see
 
 #undef TARGET_DEFAULT
 #define TARGET_DEFAULT \
-  (TARGET_CPU_DEFAULT | MASK_USERMODE | TARGET_ENDIAN_DEFAULT \
-   | TARGET_OPT_DEFAULT)
+  (TARGET_CPU_DEFAULT | TARGET_ENDIAN_DEFAULT | TARGET_OPT_DEFAULT)
 
 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
 
@@ -146,5 +145,8 @@ along with GCC; see the file COPYING3.  If not see
          else if (TARGET_SH1)                                          \
            sh_atomic_model_str = "soft-imask";                         \
        }                                                               \
+      /* Set -musermode if it hasn't been specified.  */               \
+      if (global_options_set.x_TARGET_USERMODE == 0)                   \
+       TARGET_USERMODE = true;                                         \
     }                                                                  \
   while (0)
index a390f40feead9d169d4c3f0a383af59821f4abbe..807638a0f79dc3aca274fc099dad1217def9515f 100644 (file)
@@ -58,7 +58,7 @@ along with GCC; see the file COPYING3.  If not see
 
 #undef TARGET_DEFAULT
 #define TARGET_DEFAULT \
-  (TARGET_CPU_DEFAULT | MASK_USERMODE | TARGET_ENDIAN_DEFAULT)
+  (TARGET_CPU_DEFAULT | TARGET_ENDIAN_DEFAULT)
 
 /* Define because we use the label and we do not need them.  */
 #define NO_PROFILE_COUNTERS 1
@@ -94,3 +94,13 @@ while (0)
 #define SH_DIV_STRATEGY_DEFAULT SH_DIV_CALL2
 #undef SH_DIV_STR_FOR_SIZE
 #define SH_DIV_STR_FOR_SIZE "call2"
+
+#undef SUBTARGET_OVERRIDE_OPTIONS
+#define SUBTARGET_OVERRIDE_OPTIONS                                     \
+  do                                                                   \
+    {                                                                  \
+      /* Set -musermode if it hasn't been specified.  */               \
+      if (global_options_set.x_TARGET_USERMODE == 0)                   \
+       TARGET_USERMODE = true;                                         \
+    }                                                                  \
+  while (0)