Commit 58e9ddb1 by Nick Clifton Committed by Nick Clifton

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
parent 9bc9ee67
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
/* 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;
}
......@@ -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 */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment