arm.h (EMIT_EABI_ATTRIBUTE): New macro.
* config/arm/arm.h (EMIT_EABI_ATTRIBUTE): New macro. Used to emit a .eabi_attribute assembler directive, possibly with a comment attached. * config/arm/arm.c (arm_file_start): Use the new macro. * config/arm/arm-c.c (arm_output_c_attributes): Likewise. From-SVN: r179844
This commit is contained in:
parent
9bc9ee6799
commit
58e9ddb14d
|
@ -1,3 +1,11 @@
|
|||
2011-10-12 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* config/arm/arm.h (EMIT_EABI_ATTRIBUTE): New macro. Used to
|
||||
emit a .eabi_attribute assembler directive, possibly with a
|
||||
comment attached.
|
||||
* config/arm/arm.c (arm_file_start): Use the new macro.
|
||||
* config/arm/arm-c.c (arm_output_c_attributes): Likewise.
|
||||
|
||||
2011-10-12 Georg-Johann Lay <avr@gjlay.de>
|
||||
|
||||
PR target/49939
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
/* Copyright (C) 2007, 2010 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
This file is part of GCC.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 3, or (at your option) any later
|
||||
version.
|
||||
GCC is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 3, or (at your option) any later
|
||||
version.
|
||||
|
||||
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
|
@ -25,21 +25,21 @@ along with GCC; see the file COPYING3. If not see
|
|||
#include "output.h"
|
||||
#include "c-family/c-common.h"
|
||||
|
||||
|
||||
/* Output C specific EABI object attributes. These can not be done in
|
||||
arm.c because they require information from the C frontend. */
|
||||
|
||||
static void arm_output_c_attributes(void)
|
||||
static void
|
||||
arm_output_c_attributes (void)
|
||||
{
|
||||
/* Tag_ABI_PCS_wchar_t. */
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 18, %d\n",
|
||||
(int)(TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT));
|
||||
EMIT_EABI_ATTRIBUTE (Tag_ABI_PCS_wchar_t, 18,
|
||||
(int)(TYPE_PRECISION (wchar_type_node) / BITS_PER_UNIT));
|
||||
}
|
||||
|
||||
|
||||
/* Setup so that common code calls arm_output_c_attributes. */
|
||||
|
||||
void arm_lang_object_attributes_init(void)
|
||||
void
|
||||
arm_lang_object_attributes_init (void)
|
||||
{
|
||||
arm_lang_output_object_attributes_hook = arm_output_c_attributes;
|
||||
}
|
||||
|
|
|
@ -13462,7 +13462,6 @@ output_move_double (rtx *operands, bool emit, int *count)
|
|||
return "";
|
||||
}
|
||||
|
||||
|
||||
if (code0 == REG)
|
||||
{
|
||||
unsigned int reg0 = REGNO (operands[0]);
|
||||
|
@ -13489,7 +13488,6 @@ output_move_double (rtx *operands, bool emit, int *count)
|
|||
gcc_assert (TARGET_LDRD);
|
||||
if (emit)
|
||||
output_asm_insn ("ldr%(d%)\t%0, [%m1, #8]!", operands);
|
||||
|
||||
break;
|
||||
|
||||
case PRE_DEC:
|
||||
|
@ -13503,7 +13501,6 @@ output_move_double (rtx *operands, bool emit, int *count)
|
|||
break;
|
||||
|
||||
case POST_INC:
|
||||
|
||||
if (emit)
|
||||
{
|
||||
if (TARGET_LDRD)
|
||||
|
@ -13700,7 +13697,6 @@ output_move_double (rtx *operands, bool emit, int *count)
|
|||
else
|
||||
output_asm_insn ("add%?\t%0, %1, %2", otherops);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -13717,7 +13713,7 @@ output_move_double (rtx *operands, bool emit, int *count)
|
|||
if (TARGET_LDRD)
|
||||
return "ldr%(d%)\t%0, [%1]";
|
||||
|
||||
return "ldm%(ia%)\t%1, %M0";
|
||||
return "ldm%(ia%)\t%1, %M0";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -13894,7 +13890,6 @@ output_move_double (rtx *operands, bool emit, int *count)
|
|||
}
|
||||
if (count)
|
||||
*count = 2;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17638,6 +17633,7 @@ arm_elf_asm_destructor (rtx symbol, int priority)
|
|||
/* Returns the index of the ARM condition code string in
|
||||
`arm_condition_codes', or ARM_NV if the comparison is invalid.
|
||||
COMPARISON should be an rtx like `(eq (...) (...))'. */
|
||||
|
||||
enum arm_cond_code
|
||||
maybe_get_arm_condition_code (rtx comparison)
|
||||
{
|
||||
|
@ -22291,9 +22287,9 @@ arm_file_start (void)
|
|||
if (arm_fpu_desc->model == ARM_FP_MODEL_VFP)
|
||||
{
|
||||
if (TARGET_HARD_FLOAT)
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 27, 3\n");
|
||||
EMIT_EABI_ATTRIBUTE (Tag_ABI_HardFP_use, 27, 3);
|
||||
if (TARGET_HARD_FLOAT_ABI)
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 28, 1\n");
|
||||
EMIT_EABI_ATTRIBUTE (Tag_ABI_VFP_args, 28, 1);
|
||||
}
|
||||
}
|
||||
asm_fprintf (asm_out_file, "\t.fpu %s\n", fpu_name);
|
||||
|
@ -22302,30 +22298,23 @@ arm_file_start (void)
|
|||
are used. However we don't have any easy way of figuring this out.
|
||||
Conservatively record the setting that would have been used. */
|
||||
|
||||
/* Tag_ABI_FP_rounding. */
|
||||
if (flag_rounding_math)
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 19, 1\n");
|
||||
EMIT_EABI_ATTRIBUTE (Tag_ABI_FP_rounding, 19, 1);
|
||||
|
||||
if (!flag_unsafe_math_optimizations)
|
||||
{
|
||||
/* Tag_ABI_FP_denomal. */
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 20, 1\n");
|
||||
/* Tag_ABI_FP_exceptions. */
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 21, 1\n");
|
||||
EMIT_EABI_ATTRIBUTE (Tag_ABI_FP_denormal, 20, 1);
|
||||
EMIT_EABI_ATTRIBUTE (Tag_ABI_FP_exceptions, 21, 1);
|
||||
}
|
||||
/* Tag_ABI_FP_user_exceptions. */
|
||||
if (flag_signaling_nans)
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 22, 1\n");
|
||||
/* Tag_ABI_FP_number_model. */
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 23, %d\n",
|
||||
flag_finite_math_only ? 1 : 3);
|
||||
EMIT_EABI_ATTRIBUTE (Tag_ABI_FP_user_exceptions, 22, 1);
|
||||
|
||||
/* Tag_ABI_align8_needed. */
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 24, 1\n");
|
||||
/* Tag_ABI_align8_preserved. */
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 25, 1\n");
|
||||
/* Tag_ABI_enum_size. */
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 26, %d\n",
|
||||
flag_short_enums ? 1 : 2);
|
||||
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);
|
||||
|
||||
/* Tag_ABI_optimization_goals. */
|
||||
if (optimize_size)
|
||||
|
@ -22336,21 +22325,18 @@ arm_file_start (void)
|
|||
val = 1;
|
||||
else
|
||||
val = 6;
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 30, %d\n", val);
|
||||
EMIT_EABI_ATTRIBUTE (Tag_ABI_optimization_goals, 30, val);
|
||||
|
||||
/* Tag_CPU_unaligned_access. */
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 34, %d\n",
|
||||
unaligned_access);
|
||||
EMIT_EABI_ATTRIBUTE (Tag_CPU_unaligned_access, 34, unaligned_access);
|
||||
|
||||
/* Tag_ABI_FP_16bit_format. */
|
||||
if (arm_fp16_format)
|
||||
asm_fprintf (asm_out_file, "\t.eabi_attribute 38, %d\n",
|
||||
(int)arm_fp16_format);
|
||||
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();
|
||||
}
|
||||
default_file_start();
|
||||
|
||||
default_file_start ();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -2235,4 +2235,19 @@ 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)
|
||||
|
||||
#endif /* ! GCC_ARM_H */
|
||||
|
|
Loading…
Reference in New Issue