arm.h (EMIT_EABI_ATTRIBUTE): Remove.
authorSteven Bosscher <steven@gcc.gnu.org>
Wed, 20 Jun 2012 10:18:08 +0000 (10:18 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Wed, 20 Jun 2012 10:18:08 +0000 (10:18 +0000)
* config/arm/arm.h (EMIT_EABI_ATTRIBUTE): Remove.
* config/arm/arm.c: Do not include c-pragma.h.
(arm_emit_eabi_attribute): New function based on EMIT_EABI_ATTRIBUTE.
(arm_file_start): Replace uses of EMIT_EABI_ATTRIBUTE with calls
to arm_emit_eabi_attribute.
* arm-c.c: Do not include output.h.
(arm_output_c_attributes): Replace use of EMIT_EABI_ATTRIBUTE with a
call to arm_emit_eabi_attribute.
* config/arm/arm-protos.h (arm_emit_eabi_attribute): Prototype it.

From-SVN: r188823

gcc/ChangeLog
gcc/config/arm/arm-c.c
gcc/config/arm/arm-protos.h
gcc/config/arm/arm.c
gcc/config/arm/arm.h

index 6f03dc4172822134a373dc3fc8c97dd7423bc143..623635d89ac8ad39df196ae3f202ce1c7c3d1de9 100644 (file)
@@ -1,3 +1,15 @@
+2012-06-20  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * config/arm/arm.h (EMIT_EABI_ATTRIBUTE): Remove.
+       * config/arm/arm.c: Do not include c-pragma.h.
+       (arm_emit_eabi_attribute): New function based on EMIT_EABI_ATTRIBUTE.
+       (arm_file_start): Replace uses of EMIT_EABI_ATTRIBUTE with calls
+       to arm_emit_eabi_attribute.
+       * arm-c.c: Do not include output.h.
+       (arm_output_c_attributes): Replace use of EMIT_EABI_ATTRIBUTE with a
+       call to arm_emit_eabi_attribute.
+       * config/arm/arm-protos.h (arm_emit_eabi_attribute): Prototype it.
+
 2012-06-20  Richard Guenther  <rguenther@suse.de>
 
        * tree-vect-data-refs.c (vect_can_force_dr_alignment_p):
index cd4cefbc330db0287f7260cc9833d5bfd62f5b33..cfe97c7ec0dc2cb169837df094763320bfb52b55 100644 (file)
@@ -22,7 +22,6 @@
 #include "tm.h"
 #include "tm_p.h"
 #include "tree.h"
-#include "output.h"
 #include "c-family/c-common.h"
 
 /* Output C specific EABI object attributes.  These can not be done in
@@ -31,8 +30,8 @@
 static void
 arm_output_c_attributes (void)
 {
-  EMIT_EABI_ATTRIBUTE (Tag_ABI_PCS_wchar_t, 18,
-                      (int)(TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT));
+  int wchar_size = (int)(TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT);
+  arm_emit_eabi_attribute ("Tag_ABI_PCS_wchar_t", 18, wchar_size);
 }
 
 
index 76e1abd0b1f3223c4fb5d7ec9c05e2cac4c34218..ba5802e8cb2e9aef21816c1d312e46a717382c94 100644 (file)
@@ -260,4 +260,6 @@ extern bool arm_expand_vec_perm_const (rtx target, rtx op0, rtx op1, rtx sel);
 
 extern bool arm_autoinc_modes_ok_p (enum machine_mode, enum arm_auto_incmodes);
 
+extern void arm_emit_eabi_attribute (const char *, int, int);
+
 #endif /* ! GCC_ARM_PROTOS_H */
index 73fc0cb35a761cbd0500a7d122d47389092b1464..b7ae20f73cae31ac15f2a3afd9633734dd21d3de 100644 (file)
@@ -45,7 +45,6 @@
 #include "cgraph.h"
 #include "ggc.h"
 #include "except.h"
-#include "c-family/c-pragma.h" /* ??? */
 #include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
@@ -23580,6 +23579,23 @@ arm_asm_output_labelref (FILE *stream, const char *name)
     asm_fprintf (stream, "%U%s", name);
 }
 
+/* This function is used to emit an EABI tag and its associated value.
+   We emit the numerical value of the tag in case the assembler does not
+   support textual tags.  (Eg gas prior to 2.20).  If requested we include
+   the tag name in a comment so that anyone reading the assembler output
+   will know which tag is being set.
+
+   This function is not static because arm-c.c needs it too.  */
+
+void
+arm_emit_eabi_attribute (const char *name, int num, int val)
+{
+  asm_fprintf (asm_out_file, "\t.eabi_attribute %d, %d", num, val);
+  if (flag_verbose_asm || flag_debug_asm)
+    asm_fprintf (asm_out_file, "\t%s %s", ASM_COMMENT_START, name);
+  asm_fprintf (asm_out_file, "\n");
+}
+
 static void
 arm_file_start (void)
 {
@@ -23611,9 +23627,9 @@ arm_file_start (void)
          if (arm_fpu_desc->model == ARM_FP_MODEL_VFP)
            {
              if (TARGET_HARD_FLOAT)
-               EMIT_EABI_ATTRIBUTE (Tag_ABI_HardFP_use, 27, 3);
+               arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 3);
              if (TARGET_HARD_FLOAT_ABI)
-               EMIT_EABI_ATTRIBUTE (Tag_ABI_VFP_args, 28, 1);
+               arm_emit_eabi_attribute ("Tag_ABI_VFP_args", 28, 1);
            }
        }
       asm_fprintf (asm_out_file, "\t.fpu %s\n", fpu_name);
@@ -23623,22 +23639,23 @@ arm_file_start (void)
         Conservatively record the setting that would have been used.  */
 
       if (flag_rounding_math)
-       EMIT_EABI_ATTRIBUTE (Tag_ABI_FP_rounding, 19, 1);
+       arm_emit_eabi_attribute ("Tag_ABI_FP_rounding", 19, 1);
 
       if (!flag_unsafe_math_optimizations)
        {
-         EMIT_EABI_ATTRIBUTE (Tag_ABI_FP_denormal, 20, 1);
-         EMIT_EABI_ATTRIBUTE (Tag_ABI_FP_exceptions, 21, 1);
+         arm_emit_eabi_attribute ("Tag_ABI_FP_denormal", 20, 1);
+         arm_emit_eabi_attribute ("Tag_ABI_FP_exceptions", 21, 1);
        }
       if (flag_signaling_nans)
-       EMIT_EABI_ATTRIBUTE (Tag_ABI_FP_user_exceptions, 22, 1);
+       arm_emit_eabi_attribute ("Tag_ABI_FP_user_exceptions", 22, 1);
 
-      EMIT_EABI_ATTRIBUTE (Tag_ABI_FP_number_model, 23,
+      arm_emit_eabi_attribute ("Tag_ABI_FP_number_model", 23,
                           flag_finite_math_only ? 1 : 3);
 
-      EMIT_EABI_ATTRIBUTE (Tag_ABI_align8_needed, 24, 1);
-      EMIT_EABI_ATTRIBUTE (Tag_ABI_align8_preserved, 25, 1);
-      EMIT_EABI_ATTRIBUTE (Tag_ABI_enum_size, 26, flag_short_enums ? 1 : 2);
+      arm_emit_eabi_attribute ("Tag_ABI_align8_needed", 24, 1);
+      arm_emit_eabi_attribute ("Tag_ABI_align8_preserved", 25, 1);
+      arm_emit_eabi_attribute ("Tag_ABI_enum_size", 26,
+                              flag_short_enums ? 1 : 2);
 
       /* Tag_ABI_optimization_goals.  */
       if (optimize_size)
@@ -23649,12 +23666,14 @@ arm_file_start (void)
        val = 1;
       else
        val = 6;
-      EMIT_EABI_ATTRIBUTE (Tag_ABI_optimization_goals, 30, val);
+      arm_emit_eabi_attribute ("Tag_ABI_optimization_goals", 30, val);
 
-      EMIT_EABI_ATTRIBUTE (Tag_CPU_unaligned_access, 34, unaligned_access);
+      arm_emit_eabi_attribute ("Tag_CPU_unaligned_access", 34,
+                              unaligned_access);
 
       if (arm_fp16_format)
-       EMIT_EABI_ATTRIBUTE (Tag_ABI_FP_16bit_format, 38, (int) arm_fp16_format);
+       arm_emit_eabi_attribute ("Tag_ABI_FP_16bit_format", 38,
+                            (int) arm_fp16_format);
 
       if (arm_lang_output_object_attributes_hook)
        arm_lang_output_object_attributes_hook();
index c51bce9451825a4ec6f34ad640f572c92d30e9bc..27f0f3eff1e2c1828c4368165eeaf13ba28141f6 100644 (file)
@@ -2191,21 +2191,6 @@ extern int making_const_table;
    " %{mcpu=generic-*:-march=%*;"                              \
    "   :%{mcpu=*:-mcpu=%*} %{march=*:-march=%*}}"
 
-/* This macro is used to emit an EABI tag and its associated value.
-   We emit the numerical value of the tag in case the assembler does not
-   support textual tags.  (Eg gas prior to 2.20).  If requested we include
-   the tag name in a comment so that anyone reading the assembler output
-   will know which tag is being set.  */
-#define EMIT_EABI_ATTRIBUTE(NAME,NUM,VAL)                              \
-  do                                                                   \
-    {                                                                  \
-      asm_fprintf (asm_out_file, "\t.eabi_attribute %d, %d", NUM, VAL); \
-      if (flag_verbose_asm || flag_debug_asm)                          \
-       asm_fprintf (asm_out_file, "\t%s " #NAME, ASM_COMMENT_START);   \
-      asm_fprintf (asm_out_file, "\n");                                        \
-    }                                                                  \
-  while (0)
-
 /* -mcpu=native handling only makes sense with compiler running on
    an ARM chip.  */
 #if defined(__arm__)