* Patch: provide a default definition for ASM_OUTPUT_LABEL
@ 2002-07-29 12:06 Kaveh R. Ghazi
2002-07-30 1:00 ` Mark Mitchell
0 siblings, 1 reply; 2+ messages in thread
From: Kaveh R. Ghazi @ 2002-07-29 12:06 UTC (permalink / raw)
To: gcc-patches
I noticed that most of the definitions for ASM_OUTPUT_LABEL were
identical so this patch moves the common one to defaults.h.
Tested by cross-compiling cc1 to the following targets:
alpha-dec-osf4.0 arc-unknown-elf arm-unknown-pe avr-unknown-elf
c4x-unknown-rtems cris-unknown-linux-gnu d30v-unknown-elf
dsp16xx-unknown-elf fr30-unknown-elf h8300-unknown-rtems
hppa1.1-hp-hpux11 i370-unknown-linux-gnu i686-pc-linux-gnu
i960-wrs-vxworks ia64-unknown-linux-gnu m32r-unknown-elf
m68hc11-unknown-elf m68k-motorola-sysv mcore-unknown-elf
mips-sgi-irix6.5 mn10300-unknown-elf ns32k-unknown-netbsd
pdp11-unknown-bsd powerpc-apple-darwin rs6000-ibm-aix4.3.3.0
s390-unknown-linux-gnu sh-unknown-rtems sparc-sun-sunos4.1.4
v850-unknown-rtems vax-unknown-ultrix xstormy16-unknown-elf
xtensa-unknown-elf
Ok to install?
Thanks,
--Kaveh
2002-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* alpha.h, arc.h, arm/aout.h, avr.h, c4x.h, cris.h, d30v.h,
darwin.h, dsp16xx.h, fr30.h, h8300.h, i370.h, i386.h, i960.h,
ip2k.h, m32r.h, m68hc11.h, m68k.h, m88k.h, mcore.h, mips.h,
mn10200.h, mn10300.h, ns32k.h, pa/pa-linux.h, pdp11.h, romp.h,
rs6000/sysv4.h, s390/linux.h, sh.h, sparc.h, stormy16.h,
v850.h, vax.h, xtensa.h (ASM_OUTPUT_LABEL): Delete definition
* defaults.h (ASM_OUTPUT_LABEL): Provide a default.
* doc/tm.texi (ASM_OUTPUT_LABEL): Update docs.
diff -rup orig/egcc-CVS20020729/gcc/config/alpha/alpha.h egcc-CVS20020729/gcc/config/alpha/alpha.h
--- orig/egcc-CVS20020729/gcc/config/alpha/alpha.h 2002-07-16 22:53:57.000000000 -0400
+++ egcc-CVS20020729/gcc/config/alpha/alpha.h 2002-07-29 14:07:28.348439357 -0400
@@ -1743,12 +1743,6 @@ do { \
fputs (name_, STREAM); \
} while (0)
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/arc/arc.h egcc-CVS20020729/gcc/config/arc/arc.h
--- orig/egcc-CVS20020729/gcc/config/arc/arc.h 2002-07-16 22:53:58.000000000 -0400
+++ egcc-CVS20020729/gcc/config/arc/arc.h 2002-07-29 14:07:28.358438309 -0400
@@ -1174,11 +1174,6 @@ extern const char *arc_text_section, *ar
no longer contain unusual constructs. */
#define ASM_APP_OFF ""
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-#define ASM_OUTPUT_LABEL(FILE, NAME) \
-do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
#define ASM_GLOBALIZE_LABEL(FILE, NAME) \
diff -rup orig/egcc-CVS20020729/gcc/config/arm/aout.h egcc-CVS20020729/gcc/config/arm/aout.h
--- orig/egcc-CVS20020729/gcc/config/arm/aout.h 2002-03-18 07:00:45.000000000 -0500
+++ egcc-CVS20020729/gcc/config/arm/aout.h 2002-07-29 14:07:28.358438309 -0400
@@ -144,16 +144,6 @@ Boston, MA 02111-1307, USA. */
while (0)
#endif
-#ifndef ASM_OUTPUT_LABEL
-#define ASM_OUTPUT_LABEL(STREAM, NAME) \
- do \
- { \
- assemble_name (STREAM,NAME); \
- fputs (":\n", STREAM); \
- } \
- while (0)
-#endif
-
/* Output a globalising directive for a label. */
#ifndef ASM_GLOBALIZE_LABEL
#define ASM_GLOBALIZE_LABEL(STREAM, NAME) \
diff -rup orig/egcc-CVS20020729/gcc/config/avr/avr.h egcc-CVS20020729/gcc/config/avr/avr.h
--- orig/egcc-CVS20020729/gcc/config/avr/avr.h 2002-07-28 16:00:09.000000000 -0400
+++ egcc-CVS20020729/gcc/config/avr/avr.h 2002-07-29 14:07:28.368438923 -0400
@@ -1918,17 +1918,6 @@ do { \
This macro controls how the assembler definitions of uninitialized
static variables are output. */
-#define ASM_OUTPUT_LABEL(STREAM, NAME) \
-{ \
- assemble_name (STREAM, NAME); \
- fprintf (STREAM, ":\n"); \
-}
-/* A C statement (sans semicolon) to output to the stdio stream
- STREAM the assembler definition of a label named NAME. Use the
- expression `assemble_name (STREAM, NAME)' to output the name
- itself; before and after that, output the additional assembler
- syntax for defining the name, and a newline. */
-
#undef TYPE_ASM_OP
#undef SIZE_ASM_OP
#undef WEAK_ASM_OP
diff -rup orig/egcc-CVS20020729/gcc/config/c4x/c4x.h egcc-CVS20020729/gcc/config/c4x/c4x.h
--- orig/egcc-CVS20020729/gcc/config/c4x/c4x.h 2002-07-17 22:50:08.000000000 -0400
+++ egcc-CVS20020729/gcc/config/c4x/c4x.h 2002-07-29 14:07:28.378438901 -0400
@@ -1704,9 +1704,6 @@ fini_section () \
#define NO_DOT_IN_LABEL /* Only required for TI format. */
-#define ASM_OUTPUT_LABEL(FILE, NAME) \
-do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0);
-
#define ASM_GLOBALIZE_LABEL(FILE, NAME) \
do { \
fprintf (FILE, "\t.global\t"); \
diff -rup orig/egcc-CVS20020729/gcc/config/cris/cris.h egcc-CVS20020729/gcc/config/cris/cris.h
--- orig/egcc-CVS20020729/gcc/config/cris/cris.h 2002-07-16 22:53:59.000000000 -0400
+++ egcc-CVS20020729/gcc/config/cris/cris.h 2002-07-29 14:07:28.388438954 -0400
@@ -1574,14 +1574,6 @@ call_ ## FUNC (void) \
/* Node: Label Output */
-#define ASM_OUTPUT_LABEL(FILE, NAME) \
- do \
- { \
- assemble_name (FILE, NAME); \
- fputs (":\n", FILE); \
- } \
- while (0)
-
#define ASM_GLOBALIZE_LABEL(FILE, NAME) \
do \
{ \
diff -rup orig/egcc-CVS20020729/gcc/config/d30v/d30v.h egcc-CVS20020729/gcc/config/d30v/d30v.h
--- orig/egcc-CVS20020729/gcc/config/d30v/d30v.h 2002-07-17 22:50:10.000000000 -0400
+++ egcc-CVS20020729/gcc/config/d30v/d30v.h 2002-07-29 14:07:28.408440075 -0400
@@ -2993,18 +2993,6 @@ extern const char *d30v_branch_cost_stri
\f
/* Output and Generation of Labels. */
-/* A C statement (sans semicolon) to output to the stdio stream STREAM the
- assembler definition of a label named NAME. Use the expression
- `assemble_name (STREAM, NAME)' to output the name itself; before and after
- that, output the additional assembler syntax for defining the name, and a
- newline. */
-
-#define ASM_OUTPUT_LABEL(STREAM, NAME) \
-do { \
- assemble_name (STREAM, NAME); \
- fputs (":\n", STREAM); \
-} while (0)
-
/* A C statement (sans semicolon) to output to the stdio stream STREAM any text
necessary for declaring the name NAME of a function which is being defined.
This macro is responsible for outputting the label definition (perhaps using
diff -rup orig/egcc-CVS20020729/gcc/config/darwin.h egcc-CVS20020729/gcc/config/darwin.h
--- orig/egcc-CVS20020729/gcc/config/darwin.h 2002-07-17 22:50:05.000000000 -0400
+++ egcc-CVS20020729/gcc/config/darwin.h 2002-07-29 14:07:28.418439007 -0400
@@ -161,10 +161,6 @@ do { text_section (); \
} \
} while (0)
-#undef ASM_OUTPUT_LABEL
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
fprintf (FILE, "\t.space %d\n", SIZE)
diff -rup orig/egcc-CVS20020729/gcc/config/dsp16xx/dsp16xx.h egcc-CVS20020729/gcc/config/dsp16xx/dsp16xx.h
--- orig/egcc-CVS20020729/gcc/config/dsp16xx/dsp16xx.h 2002-06-04 07:03:00.000000000 -0400
+++ egcc-CVS20020729/gcc/config/dsp16xx/dsp16xx.h 2002-07-29 14:07:28.428439746 -0400
@@ -1676,11 +1676,6 @@ extern struct dsp16xx_frame_info current
\f
/* OUTPUT AND GENERATION OF LABELS */
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/fr30/fr30.h egcc-CVS20020729/gcc/config/fr30/fr30.h
--- orig/egcc-CVS20020729/gcc/config/fr30/fr30.h 2002-06-17 07:01:07.000000000 -0400
+++ egcc-CVS20020729/gcc/config/fr30/fr30.h 2002-07-29 14:07:28.438437737 -0400
@@ -1165,19 +1165,6 @@ do \
/*}}}*/ \f
/*{{{ Output and Generation of Labels. */
-/* A C statement (sans semicolon) to output to the stdio stream STREAM the
- assembler definition of a label named NAME. Use the expression
- `assemble_name (STREAM, NAME)' to output the name itself; before and after
- that, output the additional assembler syntax for defining the name, and a
- newline. */
-#define ASM_OUTPUT_LABEL(STREAM, NAME) \
- do \
- { \
- assemble_name (STREAM, NAME); \
- fputs (":\n", STREAM); \
- } \
- while (0)
-
/* A C statement (sans semicolon) to output to the stdio stream STREAM some
commands that will make the label NAME global; that is, available for
reference from other files. Use the expression `assemble_name (STREAM,
diff -rup orig/egcc-CVS20020729/gcc/config/h8300/h8300.h egcc-CVS20020729/gcc/config/h8300/h8300.h
--- orig/egcc-CVS20020729/gcc/config/h8300/h8300.h 2002-06-11 23:54:48.000000000 -0400
+++ egcc-CVS20020729/gcc/config/h8300/h8300.h 2002-07-29 14:07:28.438437737 -0400
@@ -1118,17 +1118,6 @@ struct cum_arg
/* Switch into a generic section. */
#define TARGET_ASM_NAMED_SECTION h8300_asm_named_section
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE, NAME) \
- do \
- { \
- assemble_name (FILE, NAME); \
- fputs (":\n", FILE); \
- } \
- while (0)
-
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
asm_fprintf ((FILE), "%U%s", (NAME) + (TINY_DATA_NAME_P (NAME) ? 1 : 0))
diff -rup orig/egcc-CVS20020729/gcc/config/i370/i370.h egcc-CVS20020729/gcc/config/i370/i370.h
--- orig/egcc-CVS20020729/gcc/config/i370/i370.h 2002-07-17 22:50:16.000000000 -0400
+++ egcc-CVS20020729/gcc/config/i370/i370.h 2002-07-29 14:07:28.448439491 -0400
@@ -1845,11 +1845,6 @@ abort(); \
#define ASM_DOUBLE "\t.double"
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- (assemble_name (FILE, NAME), fputs (":\n", FILE))
-
/* #define ASM_OUTPUT_LABELREF(FILE, NAME) */ /* use gas -- defaults.h */
/* Generate internal label. Since we can branch here from off page, we
diff -rup orig/egcc-CVS20020729/gcc/config/i386/i386.h egcc-CVS20020729/gcc/config/i386/i386.h
--- orig/egcc-CVS20020729/gcc/config/i386/i386.h 2002-07-16 22:54:07.000000000 -0400
+++ egcc-CVS20020729/gcc/config/i386/i386.h 2002-07-29 14:07:28.458439304 -0400
@@ -2960,12 +2960,6 @@ extern int const svr4_dbx_register_map[F
? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4\
: DW_EH_PE_absptr)
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE, NAME) \
- (assemble_name ((FILE), (NAME)), fputs (":\n", (FILE)))
-
/* Store in OUTPUT a string (made with alloca) containing
an assembler-name for a local static variable named NAME.
LABELNO is an integer which is different for each call. */
diff -rup orig/egcc-CVS20020729/gcc/config/i960/i960.h egcc-CVS20020729/gcc/config/i960/i960.h
--- orig/egcc-CVS20020729/gcc/config/i960/i960.h 2002-07-17 22:50:17.000000000 -0400
+++ egcc-CVS20020729/gcc/config/i960/i960.h 2002-07-29 14:07:28.468439832 -0400
@@ -1312,12 +1312,6 @@ extern struct rtx_def *i960_compare_op0,
fprintf((FILE),"\t.stabd 68,0,%d\n",(LINE)); \
} }
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/ip2k/ip2k.h egcc-CVS20020729/gcc/config/ip2k/ip2k.h
--- orig/egcc-CVS20020729/gcc/config/ip2k/ip2k.h 2002-07-28 16:00:11.000000000 -0400
+++ egcc-CVS20020729/gcc/config/ip2k/ip2k.h 2002-07-29 14:07:28.478490450 -0400
@@ -2121,17 +2121,6 @@ do { \
This macro controls how the assembler definitions of uninitialized
static variables are output. */
-#define ASM_OUTPUT_LABEL(STREAM, NAME) \
-do { \
- assemble_name ((STREAM), (NAME)); \
- fprintf ((STREAM), ":\n"); \
-} while (0)
-/* A C statement (sans semicolon) to output to the stdio stream
- STREAM the assembler definition of a label named NAME. Use the
- expression `assemble_name (STREAM, NAME)' to output the name
- itself; before and after that, output the additional assembler
- syntax for defining the name, and a newline. */
-
#undef WEAK_ASM_OP
#define WEAK_ASM_OP ".weak"
diff -rup orig/egcc-CVS20020729/gcc/config/m32r/m32r.h egcc-CVS20020729/gcc/config/m32r/m32r.h
--- orig/egcc-CVS20020729/gcc/config/m32r/m32r.h 2002-07-15 22:57:28.000000000 -0400
+++ egcc-CVS20020729/gcc/config/m32r/m32r.h 2002-07-29 14:07:28.488491243 -0400
@@ -1660,18 +1660,6 @@ sbss_section () \
no longer contain unusual constructs. */
#define ASM_APP_OFF ""
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-/* On the M32R we need to ensure the next instruction starts on a 32 bit
- boundary [the previous insn must either be 2 16 bit insns or 1 32 bit]. */
-#define ASM_OUTPUT_LABEL(FILE, NAME) \
- do \
- { \
- assemble_name (FILE, NAME); \
- fputs (":\n", FILE); \
- } \
- while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
#define ASM_GLOBALIZE_LABEL(FILE, NAME) \
diff -rup orig/egcc-CVS20020729/gcc/config/m68hc11/m68hc11.h egcc-CVS20020729/gcc/config/m68hc11/m68hc11.h
--- orig/egcc-CVS20020729/gcc/config/m68hc11/m68hc11.h 2002-07-17 22:50:18.000000000 -0400
+++ egcc-CVS20020729/gcc/config/m68hc11/m68hc11.h 2002-07-29 14:07:28.498491171 -0400
@@ -1555,13 +1555,6 @@ do {
/* Output #ident as a .ident. */
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/m68k/m68k.h egcc-CVS20020729/gcc/config/m68k/m68k.h
--- orig/egcc-CVS20020729/gcc/config/m68k/m68k.h 2002-06-11 07:01:08.000000000 -0400
+++ egcc-CVS20020729/gcc/config/m68k/m68k.h 2002-07-29 14:07:28.508490764 -0400
@@ -1735,12 +1735,6 @@ __transfer_from_trampoline () \
/* Before the prologue, the top of the frame is at 4(%sp). */
#define INCOMING_FRAME_SP_OFFSET 4
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/m88k/m88k.h egcc-CVS20020729/gcc/config/m88k/m88k.h
--- orig/egcc-CVS20020729/gcc/config/m88k/m88k.h 2002-07-28 16:00:11.000000000 -0400
+++ egcc-CVS20020729/gcc/config/m88k/m88k.h 2002-07-29 14:07:28.528490654 -0400
@@ -1870,11 +1870,6 @@ do { \
ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \
} while (0)
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
#define ASM_GLOBALIZE_LABEL(FILE,NAME) \
diff -rup orig/egcc-CVS20020729/gcc/config/mcore/mcore.h egcc-CVS20020729/gcc/config/mcore/mcore.h
--- orig/egcc-CVS20020729/gcc/config/mcore/mcore.h 2002-05-19 07:01:12.000000000 -0400
+++ egcc-CVS20020729/gcc/config/mcore/mcore.h 2002-07-29 14:07:28.528490654 -0400
@@ -1112,10 +1112,6 @@ switch_to_section (section, decl) \
(STACK_BOUNDARY / BITS_PER_UNIT))
-/* Output a label definition. */
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* Output a reference to a label. */
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(STREAM, NAME) \
diff -rup orig/egcc-CVS20020729/gcc/config/mips/mips.h egcc-CVS20020729/gcc/config/mips/mips.h
--- orig/egcc-CVS20020729/gcc/config/mips/mips.h 2002-07-25 07:00:37.000000000 -0400
+++ egcc-CVS20020729/gcc/config/mips/mips.h 2002-07-29 14:07:28.548490780 -0400
@@ -4245,22 +4245,6 @@ while (0)
$Lc[0-9]+ Label for use in s<xx> operation.
$Le[0-9]+ End blocks for MIPS debug support */
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME.
-
- If we are optimizing the gp, remember that this label has been put
- out, so we know not to emit an .extern for it in mips_asm_file_end.
- We use one of the common bits in the IDENTIFIER tree node for this,
- since those bits seem to be unused, and we don't have any method
- of getting the decl nodes from the name. */
-
-#define ASM_OUTPUT_LABEL(STREAM,NAME) \
-do { \
- assemble_name (STREAM, NAME); \
- fputs (":\n", STREAM); \
-} while (0)
-
-
/* A C statement (sans semicolon) to output to the stdio stream
STREAM any text necessary for declaring the name NAME of an
initialized variable which is being defined. This macro must
diff -rup orig/egcc-CVS20020729/gcc/config/mn10200/mn10200.h egcc-CVS20020729/gcc/config/mn10200/mn10200.h
--- orig/egcc-CVS20020729/gcc/config/mn10200/mn10200.h 2002-06-11 23:54:51.000000000 -0400
+++ egcc-CVS20020729/gcc/config/mn10200/mn10200.h 2002-07-29 14:07:28.558490728 -0400
@@ -814,12 +814,6 @@ struct cum_arg { int nbytes; };
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE, NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/mn10300/mn10300.h egcc-CVS20020729/gcc/config/mn10300/mn10300.h
--- orig/egcc-CVS20020729/gcc/config/mn10300/mn10300.h 2002-07-16 22:54:10.000000000 -0400
+++ egcc-CVS20020729/gcc/config/mn10300/mn10300.h 2002-07-29 14:07:28.568491261 -0400
@@ -895,12 +895,6 @@ struct cum_arg {int nbytes; };
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE, NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/ns32k/ns32k.h egcc-CVS20020729/gcc/config/ns32k/ns32k.h
--- orig/egcc-CVS20020729/gcc/config/ns32k/ns32k.h 2002-07-16 16:00:34.000000000 -0400
+++ egcc-CVS20020729/gcc/config/ns32k/ns32k.h 2002-07-29 14:07:28.568491261 -0400
@@ -1314,14 +1314,8 @@ __transfer_from_trampoline () \
/* This is how to output the definition of a user-level label named NAME,
such as the label on a static function or variable NAME. */
-#ifndef COLLECT
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-#else
-#define ASM_OUTPUT_LABEL(STREAM,NAME) \
-do { \
- fprintf (STREAM, "%s:\n", NAME); \
-} while (0)
+#ifdef COLLECT
+#define ASM_OUTPUT_LABEL(STREAM,NAME) fprintf ((STREAM), "%s:\n", (NAME))
#endif
/* This is how to output a command to make the user-level label named NAME
diff -rup orig/egcc-CVS20020729/gcc/config/pa/pa-linux.h egcc-CVS20020729/gcc/config/pa/pa-linux.h
--- orig/egcc-CVS20020729/gcc/config/pa/pa-linux.h 2002-07-25 07:00:38.000000000 -0400
+++ egcc-CVS20020729/gcc/config/pa/pa-linux.h 2002-07-29 14:07:28.578491700 -0400
@@ -161,17 +161,8 @@ Boston, MA 02111-1307, USA. */
else \
fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE)
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
+/* Use the default. */
#undef ASM_OUTPUT_LABEL
-#define ASM_OUTPUT_LABEL(FILE, NAME) \
- do \
- { \
- assemble_name (FILE, NAME); \
- fputs (":\n", FILE); \
- } \
- while (0)
/* NOTE: ASM_OUTPUT_INTERNAL_LABEL() is defined for us by elfos.h, and
does what we want (i.e. uses colons). It must be compatible with
diff -rup orig/egcc-CVS20020729/gcc/config/pdp11/pdp11.h egcc-CVS20020729/gcc/config/pdp11/pdp11.h
--- orig/egcc-CVS20020729/gcc/config/pdp11/pdp11.h 2002-06-10 22:34:12.000000000 -0400
+++ egcc-CVS20020729/gcc/config/pdp11/pdp11.h 2002-07-29 14:07:28.578491700 -0400
@@ -1029,12 +1029,6 @@ fprintf (FILE, "$help$: . = .+8 ; space
{"r0", "r1", "r2", "r3", "r4", "r5", "sp", "pc", \
"ac0", "ac1", "ac2", "ac3", "ac4", "ac5" }
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/romp/romp.h egcc-CVS20020729/gcc/config/romp/romp.h
--- orig/egcc-CVS20020729/gcc/config/romp/romp.h 2002-05-19 07:01:19.000000000 -0400
+++ egcc-CVS20020729/gcc/config/romp/romp.h 2002-07-29 14:07:28.588487589 -0400
@@ -1315,12 +1315,6 @@ struct rt_cargs {int gregs, fregs; };
"r10", "r11", "r12", "r13", "r14", "r15", "ap", \
"fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7" }
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/rs6000/sysv4.h egcc-CVS20020729/gcc/config/rs6000/sysv4.h
--- orig/egcc-CVS20020729/gcc/config/rs6000/sysv4.h 2002-07-25 07:00:41.000000000 -0400
+++ egcc-CVS20020729/gcc/config/rs6000/sysv4.h 2002-07-29 14:07:28.588487589 -0400
@@ -680,9 +680,6 @@ extern int rs6000_pic_labelno;
#define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
asm_fprintf (FILE, "%L%s", PREFIX)
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- (assemble_name (FILE, NAME), fputs (":\n", FILE))
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/s390/linux.h egcc-CVS20020729/gcc/config/s390/linux.h
--- orig/egcc-CVS20020729/gcc/config/s390/linux.h 2002-06-13 16:00:54.000000000 -0400
+++ egcc-CVS20020729/gcc/config/s390/linux.h 2002-07-29 14:07:28.598492081 -0400
@@ -141,14 +141,6 @@ Boston, MA 02111-1307, USA. */
/* Prefix for internally generated assembler labels. */
#define LPREFIX ".L"
-
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#undef ASM_OUTPUT_LABEL
-#define ASM_OUTPUT_LABEL(FILE, NAME) \
- (assemble_name (FILE, NAME), fputs (":\n", FILE))
-
/* Store in OUTPUT a string (made with alloca) containing
an assembler-name for a local static variable named NAME.
LABELNO is an integer which is different for each call. */
diff -rup orig/egcc-CVS20020729/gcc/config/sh/sh.h egcc-CVS20020729/gcc/config/sh/sh.h
--- orig/egcc-CVS20020729/gcc/config/sh/sh.h 2002-07-25 16:00:18.000000000 -0400
+++ egcc-CVS20020729/gcc/config/sh/sh.h 2002-07-29 14:07:28.608491213 -0400
@@ -2995,10 +2995,6 @@ while (0)
} \
while (0)
-/* Output a label definition. */
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0)
-
/* This is how to output an assembler line
that says to advance the location counter
to a multiple of 2**LOG bytes. */
diff -rup orig/egcc-CVS20020729/gcc/config/sparc/sparc.h egcc-CVS20020729/gcc/config/sparc/sparc.h
--- orig/egcc-CVS20020729/gcc/config/sparc/sparc.h 2002-07-16 22:54:14.000000000 -0400
+++ egcc-CVS20020729/gcc/config/sparc/sparc.h 2002-07-29 14:07:28.618491746 -0400
@@ -2726,12 +2726,6 @@ case LABEL_REF: case SYMBOL_REF: case CO
guess... */
#define DBX_CONTIN_LENGTH 1000
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/stormy16/stormy16.h egcc-CVS20020729/gcc/config/stormy16/stormy16.h
--- orig/egcc-CVS20020729/gcc/config/stormy16/stormy16.h 2002-07-28 18:34:12.000000000 -0400
+++ egcc-CVS20020729/gcc/config/stormy16/stormy16.h 2002-07-29 14:07:28.648492791 -0400
@@ -2782,17 +2782,6 @@ do { \
\f
/* Output and Generation of Labels. */
-/* A C statement (sans semicolon) to output to the stdio stream STREAM the
- assembler definition of a label named NAME. Use the expression
- `assemble_name (STREAM, NAME)' to output the name itself; before and after
- that, output the additional assembler syntax for defining the name, and a
- newline. */
-#define ASM_OUTPUT_LABEL(STREAM, NAME) \
-do { \
- assemble_name (STREAM, NAME); \
- fputs (":\n", STREAM); \
-} while (0)
-
/* A C statement to output to the stdio stream STREAM the assembler
definition of a symbol named SYMBOL. */
#define ASM_OUTPUT_SYMBOL_REF(STREAM, SYMBOL) \
diff -rup orig/egcc-CVS20020729/gcc/config/v850/v850.h egcc-CVS20020729/gcc/config/v850/v850.h
--- orig/egcc-CVS20020729/gcc/config/v850/v850.h 2002-05-19 07:01:27.000000000 -0400
+++ egcc-CVS20020729/gcc/config/v850/v850.h 2002-07-29 14:07:28.648492791 -0400
@@ -1172,12 +1172,6 @@ zbss_section () \
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
v850_output_local (FILE, DECL, NAME, SIZE, ALIGN)
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE, NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/vax/vax.h egcc-CVS20020729/gcc/config/vax/vax.h
--- orig/egcc-CVS20020729/gcc/config/vax/vax.h 2002-06-21 23:00:37.000000000 -0400
+++ egcc-CVS20020729/gcc/config/vax/vax.h 2002-07-29 14:07:28.658492038 -0400
@@ -1051,12 +1051,6 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_
#define ASM_DOUBLE_CHAR (TARGET_G_FLOAT ? 'g' : 'd')
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-
-#define ASM_OUTPUT_LABEL(FILE,NAME) \
- do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
diff -rup orig/egcc-CVS20020729/gcc/config/xtensa/xtensa.h egcc-CVS20020729/gcc/config/xtensa/xtensa.h
--- orig/egcc-CVS20020729/gcc/config/xtensa/xtensa.h 2002-07-16 22:54:15.000000000 -0400
+++ egcc-CVS20020729/gcc/config/xtensa/xtensa.h 2002-07-29 14:07:28.668491395 -0400
@@ -1545,15 +1545,6 @@ typedef struct xtensa_args {
goto FAIL; \
} while (0)
-
-/* This is how to output the definition of a user-level label named NAME,
- such as the label on a static function or variable NAME. */
-#define ASM_OUTPUT_LABEL(STREAM, NAME) \
- do { \
- assemble_name (STREAM, NAME); \
- fputs (":\n", STREAM); \
- } while (0)
-
/* This is how to output a command to make the user-level label named NAME
defined for reference from other files. */
#define ASM_GLOBALIZE_LABEL(STREAM, NAME) \
diff -rup orig/egcc-CVS20020729/gcc/defaults.h egcc-CVS20020729/gcc/defaults.h
--- orig/egcc-CVS20020729/gcc/defaults.h 2002-07-28 16:00:08.000000000 -0400
+++ egcc-CVS20020729/gcc/defaults.h 2002-07-29 14:07:28.668491395 -0400
@@ -140,6 +140,14 @@ do { fputs (integer_asm_op (POINTER_SIZE
#endif
#endif
+/* This is how to output the definition of a user-level label named
+ NAME, such as the label on a static function or variable NAME. */
+
+#ifndef ASM_OUTPUT_LABEL
+#define ASM_OUTPUT_LABEL(FILE,NAME) \
+ do { assemble_name ((FILE), (NAME)); fputs (":\n", (FILE)); } while (0)
+#endif
+
/* This is how to output a reference to a user-level label named NAME. */
#ifndef ASM_OUTPUT_LABELREF
diff -rup orig/egcc-CVS20020729/gcc/doc/tm.texi egcc-CVS20020729/gcc/doc/tm.texi
--- orig/egcc-CVS20020729/gcc/doc/tm.texi 2002-07-28 16:00:13.000000000 -0400
+++ egcc-CVS20020729/gcc/doc/tm.texi 2002-07-29 14:36:51.053671962 -0400
@@ -6397,7 +6397,8 @@ A C statement (sans semicolon) to output
@var{stream} the assembler definition of a label named @var{name}.
Use the expression @code{assemble_name (@var{stream}, @var{name})} to
output the name itself; before and after that, output the additional
-assembler syntax for defining the name, and a newline.
+assembler syntax for defining the name, and a newline. A default
+definition of this macro is provided which is correct for most systems.
@findex SIZE_ASM_OP
@item SIZE_ASM_OP
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch: provide a default definition for ASM_OUTPUT_LABEL
2002-07-29 12:06 Patch: provide a default definition for ASM_OUTPUT_LABEL Kaveh R. Ghazi
@ 2002-07-30 1:00 ` Mark Mitchell
0 siblings, 0 replies; 2+ messages in thread
From: Mark Mitchell @ 2002-07-30 1:00 UTC (permalink / raw)
To: Kaveh R. Ghazi, gcc-patches
--On Monday, July 29, 2002 02:58:08 PM -0400 "Kaveh R. Ghazi"
<ghazi@caip.rutgers.edu> wrote:
> I noticed that most of the definitions for ASM_OUTPUT_LABEL were
> identical so this patch moves the common one to defaults.h.
>
OK. Thanks,
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-07-30 6:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-29 12:06 Patch: provide a default definition for ASM_OUTPUT_LABEL Kaveh R. Ghazi
2002-07-30 1:00 ` Mark Mitchell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).