diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-25 05:14:23 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-25 05:14:23 +0000 |
commit | ef7af4c322b46664ad8e66dee6d2cebc75d91fbf (patch) | |
tree | 720e723430a5cd77cbcbfddab0ff33078b4a2c15 /gcc/config/elfos.h | |
parent | 6f0a80d3fb3963fa4cb5769f8ab37b726eb4e5ea (diff) | |
download | gcc-ef7af4c322b46664ad8e66dee6d2cebc75d91fbf.tar.gz |
* defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, ASM_OUTPUT_SIZE_DIRECTIVE,
ASM_OUTPUT_MEASURED_SIZE): New default definitions of new macros.
* doc/tm.texi: Document them. Also document SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
* config/elfos.h, config/netbsd-aout.h, config/openbsd.h,
config/alpha/elf.h, config/arm/elf.h, config/avr/avr.h,
config/cris/aout.h, config/i386/freebsd-aout.h,
config/i386/sco5.h, config/ia64/ia64.c, config/ip2k/ip2k.h,
config/m68k/m68kelf.h, config/m68k/m68kv4.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mips/elf.h, config/mips/elf64.h,
config/mips/iris6.h, config/mips/linux.h, config/pa/pa-linux.h,
config/pa/pa64-hpux.h, config/rs6000/sysv4.h,
config/xtensa/elf.h, config/xtensa/linux.h:
Use the new macros.
Where possible, remove redundant definitions of SIZE_ASM_OP,
TYPE_ASM_OP, and TYPE_OPERAND_FMT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55735 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/elfos.h')
-rw-r--r-- | gcc/config/elfos.h | 58 |
1 files changed, 18 insertions, 40 deletions
diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h index 46a13b4afa7..5b0ec6de171 100644 --- a/gcc/config/elfos.h +++ b/gcc/config/elfos.h @@ -291,18 +291,13 @@ Boston, MA 02111-1307, USA. */ function's return value. We allow for that here. */ #ifndef ASM_DECLARE_FUNCTION_NAME -#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ - do \ - { \ - fprintf (FILE, "%s", TYPE_ASM_OP); \ - assemble_name (FILE, NAME); \ - putc (',', FILE); \ - fprintf (FILE, TYPE_OPERAND_FMT, "function"); \ - putc ('\n', FILE); \ - \ - ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ - ASM_OUTPUT_LABEL(FILE, NAME); \ - } \ +#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ + do \ + { \ + ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ + ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ + ASM_OUTPUT_LABEL (FILE, NAME); \ + } \ while (0) #endif @@ -311,26 +306,19 @@ Boston, MA 02111-1307, USA. */ #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ do \ { \ - fprintf (FILE, "%s", TYPE_ASM_OP); \ - assemble_name (FILE, NAME); \ - putc (',', FILE); \ - fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ - putc ('\n', FILE); \ - \ + HOST_WIDE_INT size; \ + \ + ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ + \ size_directive_output = 0; \ - \ if (!flag_inhibit_size_directive \ && (DECL) && DECL_SIZE (DECL)) \ { \ size_directive_output = 1; \ - fprintf (FILE, "%s", SIZE_ASM_OP); \ - assemble_name (FILE, NAME); \ - putc (',', FILE); \ - fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ - int_size_in_bytes (TREE_TYPE (DECL))); \ - fputc ('\n', FILE); \ + size = int_size_in_bytes (TREE_TYPE (DECL)); \ + ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \ } \ - \ + \ ASM_OUTPUT_LABEL (FILE, NAME); \ } \ while (0) @@ -345,6 +333,7 @@ Boston, MA 02111-1307, USA. */ do \ { \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + HOST_WIDE_INT size; \ \ if (!flag_inhibit_size_directive \ && DECL_SIZE (DECL) \ @@ -353,12 +342,8 @@ Boston, MA 02111-1307, USA. */ && !size_directive_output) \ { \ size_directive_output = 1; \ - fprintf (FILE, "%s", SIZE_ASM_OP); \ - assemble_name (FILE, name); \ - putc (',', FILE); \ - fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, \ - int_size_in_bytes (TREE_TYPE (DECL))); \ - fputc ('\n', FILE); \ + size = int_size_in_bytes (TREE_TYPE (DECL)); \ + ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \ } \ } \ while (0) @@ -377,14 +362,7 @@ Boston, MA 02111-1307, USA. */ \ ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \ ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \ - \ - fprintf (FILE, "%s", SIZE_ASM_OP); \ - assemble_name (FILE, (FNAME)); \ - fprintf (FILE, ","); \ - assemble_name (FILE, label); \ - fprintf (FILE, "-"); \ - assemble_name (FILE, (FNAME)); \ - putc ('\n', FILE); \ + ASM_OUTPUT_MEASURED_SIZE (FILE, (FNAME), label); \ } \ } \ while (0) |