diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2012-06-20 10:18:08 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2012-06-20 10:18:08 +0000 |
commit | 34dd397b05402820fbb3d790bbf6a7e668acb3b7 (patch) | |
tree | 86c9cfaa3b8f55c5cbf38718712c004b62913340 /gcc | |
parent | f89dcfd816b93c32c2332bd39b4df0020821ee7a (diff) | |
download | gcc-34dd397b05402820fbb3d790bbf6a7e668acb3b7.zip gcc-34dd397b05402820fbb3d790bbf6a7e668acb3b7.tar.gz gcc-34dd397b05402820fbb3d790bbf6a7e668acb3b7.tar.bz2 |
arm.h (EMIT_EABI_ATTRIBUTE): Remove.
* 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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/config/arm/arm-c.c | 5 | ||||
-rw-r--r-- | gcc/config/arm/arm-protos.h | 2 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 47 | ||||
-rw-r--r-- | gcc/config/arm/arm.h | 15 |
5 files changed, 49 insertions, 32 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6f03dc4..623635d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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): diff --git a/gcc/config/arm/arm-c.c b/gcc/config/arm/arm-c.c index cd4cefb..cfe97c7 100644 --- a/gcc/config/arm/arm-c.c +++ b/gcc/config/arm/arm-c.c @@ -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); } diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h index 76e1abd..ba5802e 100644 --- a/gcc/config/arm/arm-protos.h +++ b/gcc/config/arm/arm-protos.h @@ -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 */ diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 73fc0cb..b7ae20f 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -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(); diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index c51bce9..27f0f3e 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -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__) |