aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/netbsd-aout.h
diff options
context:
space:
mode:
authorZack Weinberg <zack@codesourcery.com>2002-07-25 05:14:23 +0000
committerZack Weinberg <zack@gcc.gnu.org>2002-07-25 05:14:23 +0000
commit2be2ac706e998c7383115f5b6c56412233f7b587 (patch)
tree720e723430a5cd77cbcbfddab0ff33078b4a2c15 /gcc/config/netbsd-aout.h
parent518878e18ad35ced635942a7c37ac4984e07926f (diff)
downloadgcc-2be2ac706e998c7383115f5b6c56412233f7b587.zip
gcc-2be2ac706e998c7383115f5b6c56412233f7b587.tar.gz
gcc-2be2ac706e998c7383115f5b6c56412233f7b587.tar.bz2
defaults.h (ASM_OUTPUT_TYPE_DIRECTIVE, [...]): New default definitions of new macros.
* 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. From-SVN: r55735
Diffstat (limited to 'gcc/config/netbsd-aout.h')
-rw-r--r--gcc/config/netbsd-aout.h60
1 files changed, 23 insertions, 37 deletions
diff --git a/gcc/config/netbsd-aout.h b/gcc/config/netbsd-aout.h
index 5d2386a..7111a70 100644
--- a/gcc/config/netbsd-aout.h
+++ b/gcc/config/netbsd-aout.h
@@ -135,11 +135,7 @@ Boston, MA 02111-1307, USA. */
#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_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
ASM_OUTPUT_LABEL(FILE, NAME); \
} \
@@ -148,29 +144,26 @@ Boston, MA 02111-1307, USA. */
/* Write the extra assembler code needed to declare an object properly. */
-#undef ASM_DECLARE_OBJECT_NAME
-#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); \
- size_directive_output = 0; \
- if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
- { \
- size_directive_output = 1; \
- fprintf (FILE, "%s", SIZE_ASM_OP); \
- assemble_name (FILE, NAME); \
- fprintf (FILE, ",%d\n", \
- int_size_in_bytes (TREE_TYPE (DECL))); \
- } \
- ASM_OUTPUT_LABEL(FILE, NAME); \
- } \
+#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
+ do \
+ { \
+ 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; \
+ size = int_size_in_bytes (TREE_TYPE (DECL)); \
+ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size); \
+ } \
+ \
+ ASM_OUTPUT_LABEL (FILE, NAME); \
+ } \
while (0)
-
/* Output the size directive for a decl in rest_of_decl_compilation
in the case where we did not do so before the initializer.
Once we find the error_mark_node, we know that the value of
@@ -182,16 +175,15 @@ 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) \
&& ! AT_END && TOP_LEVEL \
&& DECL_INITIAL (DECL) == error_mark_node \
&& !size_directive_output) \
{ \
size_directive_output = 1; \
- fprintf (FILE, "%s", SIZE_ASM_OP); \
- assemble_name (FILE, name); \
- fprintf (FILE, ",%d\n", \
- int_size_in_bytes (TREE_TYPE (DECL))); \
+ size = int_size_in_bytes (TREE_TYPE (DECL)); \
+ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, name, size); \
} \
} \
while (0)
@@ -210,13 +202,7 @@ Boston, MA 02111-1307, USA. */
labelno++; \
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)