2015-09-15 Christian Bruel <christian.bruel@st.com>
authorchrbr <chrbr@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Sep 2015 13:46:57 +0000 (13:46 +0000)
committerchrbr <chrbr@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 15 Sep 2015 13:46:57 +0000 (13:46 +0000)
* config/arm/arm.c (TARGET_OPTION_PRINT): Define.
(arm_option_print): New function.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227796 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/arm/arm.c

index 72de7ff..fda0151 100644 (file)
@@ -1,5 +1,10 @@
 2015-09-15  Christian Bruel  <christian.bruel@st.com>
 
+       * config/arm/arm.c (TARGET_OPTION_PRINT): Define.
+       (arm_option_print): New function.
+
+2015-09-15  Christian Bruel  <christian.bruel@st.com>
+
        PR target/52144
        * config/arm/arm.c (arm_option_params_internal): Remove opts parameter.
        * config/arm/arm-c.c (arm_cpu_builtins): Declare static.
@@ -7,7 +12,7 @@
        * config/arm/arm.h (TARGET_32BIT_P, TARGET_ARM_QBIT_P)
        (TARGET_ARM_SAT_P, TARGET_IDIV_P, TARGET_HAVE_LDREX_P)
        (TARGET_HAVE_LDREXBH_P, TARGET_HAVE_LDREXD_P, TARGET_DSP_MULTIPLY_P)
-       (TARGET_ARM_FEATURE_LDREX_P, TARGET_INT_SIMD_P): Redefine macros with:
+       (TARGET_ARM_FEATURE_LDREX_P, TARGET_INT_SIMD_P): Redefine macros with...
        (TARGET_ARM_SAT, TARGET_IDIV, TARGET_HAVE_LDREX)
        (TARGET_HAVE_LDREXBH, TARGET_HAVE_LDREXD, TARGET_ARM_FEATURE_LDREX)
        (TARGET_DSP_MULTIPLY, TARGET_INT_SIMD): Redefined macros.
index 214d0b1..e5d1a45 100644 (file)
@@ -245,6 +245,7 @@ static tree arm_build_builtin_va_list (void);
 static void arm_expand_builtin_va_start (tree, rtx);
 static tree arm_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *);
 static void arm_option_override (void);
+static void arm_option_print (FILE *, int, struct cl_target_option *);
 static void arm_set_current_function (tree);
 static bool arm_can_inline_p (tree, tree);
 static bool arm_valid_target_attribute_p (tree, tree, tree, int);
@@ -405,6 +406,9 @@ static const struct attribute_spec arm_attribute_table[] =
 #undef  TARGET_OPTION_OVERRIDE
 #define TARGET_OPTION_OVERRIDE arm_option_override
 
+#undef TARGET_OPTION_PRINT
+#define TARGET_OPTION_PRINT arm_option_print
+
 #undef  TARGET_COMP_TYPE_ATTRIBUTES
 #define TARGET_COMP_TYPE_ATTRIBUTES arm_comp_type_attributes
 
@@ -29483,6 +29487,19 @@ arm_set_current_function (tree fndecl)
   arm_option_params_internal ();
 }
 
+/* Implement TARGET_OPTION_PRINT.  */
+
+static void
+arm_option_print (FILE *file, int indent, struct cl_target_option *ptr)
+{
+  int flags = ptr->x_target_flags;
+
+  fprintf (file, "%*sselected arch %s\n", indent, "",
+          TARGET_THUMB2_P (flags) ? "thumb2" :
+          TARGET_THUMB_P (flags) ? "thumb1" :
+          "arm");
+}
+
 /* Hook to determine if one function can safely inline another.  */
 
 static bool