summaryrefslogtreecommitdiff
path: root/gcc/defaults.h
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-25 05:14:23 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-25 05:14:23 +0000
commitef7af4c322b46664ad8e66dee6d2cebc75d91fbf (patch)
tree720e723430a5cd77cbcbfddab0ff33078b4a2c15 /gcc/defaults.h
parent6f0a80d3fb3963fa4cb5769f8ab37b726eb4e5ea (diff)
downloadgcc-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/defaults.h')
-rw-r--r--gcc/defaults.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 6d12e095565..ef83bdd087b 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -169,6 +169,53 @@ do { fputs (integer_asm_op (POINTER_SIZE / UNITS_PER_WORD, TRUE), FILE); \
#endif
#endif
+/* How to emit a .type directive. */
+#ifndef ASM_OUTPUT_TYPE_DIRECTIVE
+#if defined TYPE_ASM_OP && defined TYPE_OPERAND_FMT
+#define ASM_OUTPUT_TYPE_DIRECTIVE(STREAM, NAME, TYPE) \
+ do \
+ { \
+ fputs (TYPE_ASM_OP, STREAM); \
+ assemble_name (STREAM, NAME); \
+ fputs (", ", STREAM); \
+ fprintf (STREAM, TYPE_OPERAND_FMT, TYPE); \
+ putc ('\n', STREAM); \
+ } \
+ while (0)
+#endif
+#endif
+
+/* How to emit a .size directive. */
+#ifndef ASM_OUTPUT_SIZE_DIRECTIVE
+#ifdef SIZE_ASM_OP
+#define ASM_OUTPUT_SIZE_DIRECTIVE(STREAM, NAME, SIZE) \
+ do \
+ { \
+ HOST_WIDE_INT size_ = (SIZE); \
+ fputs (SIZE_ASM_OP, STREAM); \
+ assemble_name (STREAM, NAME); \
+ fputs (", ", STREAM); \
+ fprintf (STREAM, HOST_WIDE_INT_PRINT_DEC, size_); \
+ putc ('\n', STREAM); \
+ } \
+ while (0)
+
+#define ASM_OUTPUT_MEASURED_SIZE(STREAM, BEG, END) \
+ do \
+ { \
+ fputs (SIZE_ASM_OP, STREAM); \
+ assemble_name (STREAM, BEG); \
+ fputs (", ", STREAM); \
+ assemble_name (STREAM, END); \
+ putc ('-', STREAM); \
+ assemble_name (STREAM, BEG); \
+ putc ('\n', STREAM); \
+ } \
+ while (0)
+
+#endif
+#endif
+
/* This determines whether or not we support weak symbols. */
#ifndef SUPPORTS_WEAK
#if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL)