This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to use GLOBAL_ASM_OP instead of ASM_GLOBALIZE_LABEL
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 Jul 2002 22:47:33 -0400 (EDT)
- Subject: Patch to use GLOBAL_ASM_OP instead of ASM_GLOBALIZE_LABEL
This patch converts most ports to define GLOBAL_ASM_OP instead of
ASM_GLOBALIZE_LABEL. This patch relies on my previous one:
http://gcc.gnu.org/ml/gcc-patches/2002-07/msg01771.html
Tested in conjunction with the above patch by bootstrapping on
solaris2.7 and cross-compiling cc1 to:
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, cris.h, d30v.h, dsp16xx.h,
fr30.h, h8300.h, i370.h, i386/sco5.h, i386/unix.h, i960.h, ia64.h,
ip2k.h, m32r.h, mcore.h, mips.h, mn10200.h, mn10300.h, ns32k.h,
openbsd.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_GLOBALIZE_LABEL): Delete.
(GLOBAL_ASM_OP): Define.
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-29 15:03:27.226081092 -0400
+++ egcc-CVS20020729/gcc/config/alpha/alpha.h 2002-07-29 15:52:20.690219504 -0400
@@ -1743,11 +1743,8 @@ do { \
fputs (name_, 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(FILE,NAME) \
- do { fputs ("\t.globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.globl "
/* The prefix to add to user-visible assembler symbols. */
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-29 15:03:27.236081040 -0400
+++ egcc-CVS20020729/gcc/config/arc/arc.h 2002-07-29 15:53:08.992868617 -0400
@@ -1174,14 +1174,8 @@ extern const char *arc_text_section, *ar
no longer contain unusual constructs. */
#define ASM_APP_OFF ""
-/* 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) \
-do { \
- fputs ("\t.global\t", FILE); \
- assemble_name (FILE, NAME); \
- fputs ("\n", FILE); \
-} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global\t"
/* A C statement (sans semicolon) to output on FILE an assembler pseudo-op to
declare a library function name external. The name of the library function
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-07-29 15:03:27.236081040 -0400
+++ egcc-CVS20020729/gcc/config/arm/aout.h 2002-07-29 15:21:06.536023324 -0400
@@ -144,17 +144,8 @@ Boston, MA 02111-1307, USA. */
while (0)
#endif
-/* Output a globalising directive for a label. */
-#ifndef ASM_GLOBALIZE_LABEL
-#define ASM_GLOBALIZE_LABEL(STREAM, NAME) \
- do \
- { \
- fprintf (STREAM, "\t.global\t"); \
- assemble_name (STREAM, NAME); \
- fputc ('\n',STREAM); \
- } \
- while (0)
-#endif
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global\t"
/* Make an internal label into a string. */
#ifndef ASM_GENERATE_INTERNAL_LABEL
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-29 15:03:27.246082154 -0400
+++ egcc-CVS20020729/gcc/config/avr/avr.h 2002-07-29 15:22:04.719242775 -0400
@@ -2052,20 +2052,8 @@ do { \
If your target assembler doesn't support the .string directive, you
should define this to zero. */
-#define ASM_GLOBALIZE_LABEL(STREAM, NAME) \
-do { \
- fprintf (STREAM, ".global\t"); \
- assemble_name (STREAM, NAME); \
- fprintf (STREAM, "\n"); \
-} \
-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, NAME)' to output the name itself; before
- and after that, output the additional assembler syntax for making
- that name global, and a newline. */
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP ".global\t"
#define ASM_WEAKEN_LABEL(FILE, NAME) \
do \
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-29 15:03:27.266081639 -0400
+++ egcc-CVS20020729/gcc/config/cris/cris.h 2002-07-29 15:23:24.413645554 -0400
@@ -1574,14 +1574,8 @@ call_ ## FUNC (void) \
/* Node: Label Output */
-#define ASM_GLOBALIZE_LABEL(FILE, NAME) \
- do \
- { \
- fputs ("\t.global ", FILE); \
- assemble_name (FILE, NAME); \
- fputs ("\n", FILE); \
- } \
- while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global "
#define SUPPORTS_WEAK 1
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-29 15:03:27.286083131 -0400
+++ egcc-CVS20020729/gcc/config/d30v/d30v.h 2002-07-29 15:24:03.605853869 -0400
@@ -3039,18 +3039,8 @@ extern const char *d30v_branch_cost_stri
Defined in svr4.h. */
/* #define ASM_FINISH_DECLARE_OBJECT(STREAM, DECL, TOPLEVEL, ATEND) */
-/* 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,
- NAME)' to output the name itself; before and after that, output the
- additional assembler syntax for making that name global, and a newline. */
-
-#define ASM_GLOBALIZE_LABEL(STREAM,NAME) \
-do { \
- fputs ("\t.globl ", STREAM); \
- assemble_name (STREAM, NAME); \
- fputs ("\n", STREAM); \
-} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.globl "
/* A C statement (sans semicolon) to output to the stdio stream STREAM some
commands that will make the label NAME weak; that is, available for
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-07-29 15:03:27.296083084 -0400
+++ egcc-CVS20020729/gcc/config/dsp16xx/dsp16xx.h 2002-07-29 15:24:45.418120429 -0400
@@ -1676,11 +1676,8 @@ extern struct dsp16xx_frame_info current
/* OUTPUT AND GENERATION OF LABELS */
-/* 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) \
- do { fputs (".global ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP ".global "
/* A C statement to output to the stdio stream any text necessary
for declaring the name of an external symbol named name which
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-07-29 15:03:27.306093441 -0400
+++ egcc-CVS20020729/gcc/config/fr30/fr30.h 2002-07-29 15:25:42.021248756 -0400
@@ -1165,19 +1165,8 @@ do \
/*}}}*/
/*{{{ Output and Generation of Labels. */
-/* 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,
- NAME)' to output the name itself; before and after that, output the
- additional assembler syntax for making that name global, and a newline. */
-#define ASM_GLOBALIZE_LABEL(STREAM,NAME) \
- do \
- { \
- fputs ("\t.globl ", STREAM); \
- assemble_name (STREAM, NAME); \
- fputs ("\n", STREAM); \
- } \
- while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.globl "
/* A C expression to assign to OUTVAR (which is a variable of type `char *') a
newly allocated string made from the string NAME and the number NUMBER, with
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-07-29 15:03:27.306093441 -0400
+++ egcc-CVS20020729/gcc/config/h8300/h8300.h 2002-07-29 15:26:33.834184225 -0400
@@ -1123,17 +1123,8 @@ struct cum_arg
#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME)
-/* 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) \
- do \
- { \
- fputs ("\t.global ", FILE); \
- assemble_name (FILE, NAME); \
- fputs ("\n", FILE); \
- } \
- while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global "
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
ASM_OUTPUT_LABEL (FILE, NAME)
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-29 15:03:27.316086958 -0400
+++ egcc-CVS20020729/gcc/config/i370/i370.h 2002-07-29 15:27:15.426450494 -0400
@@ -1924,11 +1924,8 @@ abort(); \
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG)!=0) fprintf ((FILE), "\t.balign %d\n", 1<<(LOG))
-/* 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) \
- (fputs (".globl ", FILE), assemble_name (FILE, NAME), fputs ("\n", FILE))
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP ".globl "
/* This says how to output an assembler line
to define a global common symbol. */
diff -rup orig/egcc-CVS20020729/gcc/config/i386/sco5.h egcc-CVS20020729/gcc/config/i386/sco5.h
--- orig/egcc-CVS20020729/gcc/config/i386/sco5.h 2002-07-28 16:00:11.000000000 -0400
+++ egcc-CVS20020729/gcc/config/i386/sco5.h 2002-07-29 15:29:02.002404780 -0400
@@ -351,8 +351,6 @@ do { \
fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME);
#undef ASM_GLOBALIZE_LABEL
-#define ASM_GLOBALIZE_LABEL(FILE,NAME) \
- (fprintf ((FILE), "%s", GLOBAL_ASM_OP), assemble_name (FILE, NAME), fputs ("\n", FILE))
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
diff -rup orig/egcc-CVS20020729/gcc/config/i386/unix.h egcc-CVS20020729/gcc/config/i386/unix.h
--- orig/egcc-CVS20020729/gcc/config/i386/unix.h 2002-05-15 07:00:56.000000000 -0400
+++ egcc-CVS20020729/gcc/config/i386/unix.h 2002-07-29 15:29:45.194793795 -0400
@@ -58,11 +58,8 @@ Boston, MA 02111-1307, USA. */
#define BSS_SECTION_ASM_OP "\t.bss"
-/* 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) \
- (fputs (".globl ", FILE), assemble_name (FILE, NAME), fputs ("\n", FILE))
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP ".globl "
/* By default, target has a 80387, uses IEEE compatible arithmetic,
and returns float values in the 387. */
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-29 15:03:27.336083931 -0400
+++ egcc-CVS20020729/gcc/config/i960/i960.h 2002-07-29 15:30:32.207415716 -0400
@@ -1312,13 +1312,8 @@ extern struct rtx_def *i960_compare_op0,
fprintf((FILE),"\t.stabd 68,0,%d\n",(LINE)); \
} }
-/* 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) \
-{ fputs ("\t.globl ", FILE); \
- assemble_name (FILE, NAME); \
- fputs ("\n", FILE); }
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.globl "
/* The prefix to add to user-visible assembler symbols. */
diff -rup orig/egcc-CVS20020729/gcc/config/ia64/ia64.h egcc-CVS20020729/gcc/config/ia64/ia64.h
--- orig/egcc-CVS20020729/gcc/config/ia64/ia64.h 2002-07-15 22:57:27.000000000 -0400
+++ egcc-CVS20020729/gcc/config/ia64/ia64.h 2002-07-29 15:31:16.119873793 -0400
@@ -1905,16 +1905,8 @@ do { \
ia64_asm_output_label = 0; \
} 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. */
-
-#define ASM_GLOBALIZE_LABEL(STREAM,NAME) \
-do { \
- fputs ("\t.global ", STREAM); \
- assemble_name (STREAM, NAME); \
- fputs ("\n", STREAM); \
-} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global "
/* A C statement (sans semicolon) to output to the stdio stream STREAM any text
necessary for declaring the name of an external symbol named NAME which is
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-29 15:03:27.346083764 -0400
+++ egcc-CVS20020729/gcc/config/ip2k/ip2k.h 2002-07-29 15:31:53.501949891 -0400
@@ -2162,18 +2162,8 @@ do { \
the i386) don't know about that. Also, we don't use \v
since some versions of gas, such as 2.2 did not accept it. */
-#define ASM_GLOBALIZE_LABEL(STREAM, NAME) \
-do { \
- fprintf ((STREAM), ".global\t"); \
- assemble_name ((STREAM), (NAME)); \
- fprintf ((STREAM), "\n"); \
-} 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, NAME)' to output the name itself; before
- and after that, output the additional assembler syntax for making
- that name global, and a newline. */
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP ".global\t"
#undef ASM_FORMAT_PRIVATE_NAME
#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
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-29 15:03:27.356083857 -0400
+++ egcc-CVS20020729/gcc/config/m32r/m32r.h 2002-07-29 15:32:37.444324859 -0400
@@ -1660,16 +1660,8 @@ sbss_section () \
no longer contain unusual constructs. */
#define ASM_APP_OFF ""
-/* 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) \
- do \
- { \
- fputs ("\t.global\t", FILE); \
- assemble_name (FILE, NAME); \
- fputs ("\n", FILE); \
- } \
- while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global\t"
/* This is how to output a reference to a user-level label named NAME.
`assemble_name' uses this. */
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-07-29 15:03:27.376083242 -0400
+++ egcc-CVS20020729/gcc/config/mcore/mcore.h 2002-07-29 15:33:08.476081670 -0400
@@ -1161,11 +1161,8 @@ extern long mcore_current_compilation_ti
} \
while (0)
-/* Output a globalising directive for a label. */
-#define ASM_GLOBALIZE_LABEL(STREAM,NAME) \
- (fprintf (STREAM, "\t.export\t"), \
- assemble_name (STREAM, NAME), \
- fputc ('\n',STREAM)) \
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.export\t"
/* The prefix to add to user-visible assembler symbols. */
#undef USER_LABEL_PREFIX
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-29 15:03:27.396083513 -0400
+++ egcc-CVS20020729/gcc/config/mips/mips.h 2002-07-29 15:33:37.407646612 -0400
@@ -4263,16 +4263,8 @@ do \
} \
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) \
- do { \
- fputs ("\t.globl\t", STREAM); \
- assemble_name (STREAM, NAME); \
- fputs ("\n", STREAM); \
- } while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.globl\t"
/* This says how to define a global common symbol. */
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-07-29 15:03:27.396083513 -0400
+++ egcc-CVS20020729/gcc/config/mn10200/mn10200.h 2002-07-29 15:38:20.814008581 -0400
@@ -814,11 +814,8 @@ 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 a command to make the user-level label named NAME
- defined for reference from other files. */
-
-#define ASM_GLOBALIZE_LABEL(FILE, NAME) \
- do { fputs ("\t.global ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global "
/* This is how to output a reference to a user-level label named NAME.
`assemble_name' uses this. */
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-29 15:03:27.406084107 -0400
+++ egcc-CVS20020729/gcc/config/mn10300/mn10300.h 2002-07-29 15:38:56.366091873 -0400
@@ -895,11 +895,8 @@ 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 a command to make the user-level label named NAME
- defined for reference from other files. */
-
-#define ASM_GLOBALIZE_LABEL(FILE, NAME) \
- do { fputs ("\t.global ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global "
/* This is how to output a reference to a user-level label named NAME.
`assemble_name' uses this. */
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-29 15:03:27.406084107 -0400
+++ egcc-CVS20020729/gcc/config/ns32k/ns32k.h 2002-07-29 15:40:37.641649499 -0400
@@ -1322,13 +1322,11 @@ __transfer_from_trampoline () \
defined for reference from other files. */
#ifndef COLLECT
-#define ASM_GLOBALIZE_LABEL(FILE,NAME) \
- do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP ".globl "
#else
#define ASM_GLOBALIZE_LABEL(STREAM,NAME) \
-do { \
- fprintf (STREAM, "\t.globl\t%s\n", NAME); \
-} while (0)
+ fprintf ((STREAM), "\t.globl\t%s\n", (NAME));
#endif
/* This is how to output an internal numbered label where
diff -rup orig/egcc-CVS20020729/gcc/config/openbsd.h egcc-CVS20020729/gcc/config/openbsd.h
--- orig/egcc-CVS20020729/gcc/config/openbsd.h 2002-07-28 16:00:09.000000000 -0400
+++ egcc-CVS20020729/gcc/config/openbsd.h 2002-07-29 15:14:55.585347946 -0400
@@ -175,10 +175,12 @@ Boston, MA 02111-1307, USA. */
#undef TYPE_ASM_OP
#undef SIZE_ASM_OP
#undef SET_ASM_OP
+#undef GLOBAL_ASM_OP
#define TYPE_ASM_OP "\t.type\t"
#define SIZE_ASM_OP "\t.size\t"
#define SET_ASM_OP "\t.set\t"
+#define GLOBAL_ASM_OP "\t.globl\t"
/* The following macro defines the format used to output the second
operand of the .type assembler directive. */
@@ -273,14 +275,6 @@ do { \
do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
fputc ('\n', FILE); } while (0)
#endif
-
-/* Tell the assembler that a symbol is global. */
-#ifndef ASM_GLOBALIZE_LABEL
-#define ASM_GLOBALIZE_LABEL(FILE,NAME) \
- do { fputs ("\t.globl\t", FILE); assemble_name (FILE, NAME); \
- fputc ('\n', FILE); } while(0)
-#endif
-
/* Storage layout. */
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-29 15:03:27.416083879 -0400
+++ egcc-CVS20020729/gcc/config/pa/pa-linux.h 2002-07-29 15:42:38.468246379 -0400
@@ -168,9 +168,10 @@ Boston, MA 02111-1307, USA. */
does what we want (i.e. uses colons). It must be compatible with
ASM_GENERATE_INTERNAL_LABEL(), so do not define it here. */
+/* Use the default. */
#undef ASM_GLOBALIZE_LABEL
-#define ASM_GLOBALIZE_LABEL(FILE, NAME) \
- (fputs (".globl ", FILE), assemble_name (FILE, NAME), fputs ("\n", FILE))
+/* Globalizing directive for a label. */
+#definef GLOBAL_ASM_OP ".globl "
/* FIXME: Hacked from the <elfos.h> one so that we avoid multiple
labels in a function declaration (since pa.c seems determined to do
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-07-29 15:03:27.416083879 -0400
+++ egcc-CVS20020729/gcc/config/pdp11/pdp11.h 2002-07-29 15:43:13.480218964 -0400
@@ -1029,11 +1029,8 @@ fprintf (FILE, "$help$: . = .+8 ; space
{"r0", "r1", "r2", "r3", "r4", "r5", "sp", "pc", \
"ac0", "ac1", "ac2", "ac3", "ac4", "ac5" }
-/* 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) \
- do { fputs ("\t.globl ", FILE); assemble_name (FILE, NAME); fputs("\n", FILE); } while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.globl "
/* The prefix to add to user-visible assembler symbols. */
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-07-29 15:03:27.426084888 -0400
+++ egcc-CVS20020729/gcc/config/romp/romp.h 2002-07-29 15:43:59.582736092 -0400
@@ -1315,11 +1315,8 @@ 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 a command to make the user-level label named NAME
- defined for reference from other files. */
-
-#define ASM_GLOBALIZE_LABEL(FILE,NAME) \
- do { fputs ("\t.globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.globl "
/* The prefix to add to user-visible assembler symbols. */
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-29 15:03:27.426084888 -0400
+++ egcc-CVS20020729/gcc/config/rs6000/sysv4.h 2002-07-29 15:44:57.105861205 -0400
@@ -680,12 +680,8 @@ extern int rs6000_pic_labelno;
#define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
asm_fprintf (FILE, "%L%s", PREFIX)
-/* 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) \
- do { fputs ("\t.globl ", FILE); \
- assemble_name (FILE, NAME); putc ('\n', FILE);} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.globl "
/* This says how to output assembler code to declare an
uninitialized internal linkage data object. Under SVR4,
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-07-29 15:03:27.436086422 -0400
+++ egcc-CVS20020729/gcc/config/s390/linux.h 2002-07-29 15:46:17.480299623 -0400
@@ -207,8 +207,8 @@ Boston, MA 02111-1307, USA. */
/* 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) \
- (fputs (".globl ", FILE), assemble_name (FILE, NAME), fputs ("\n", FILE))
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP ".globl "
/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
Used for C++ multiple inheritance. */
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-29 15:03:27.446085915 -0400
+++ egcc-CVS20020729/gcc/config/sh/sh.h 2002-07-29 15:46:41.581614469 -0400
@@ -3003,11 +3003,8 @@ while (0)
if ((LOG) != 0) \
fprintf ((FILE), "\t.align %d\n", (LOG))
-/* Output a globalising directive for a label. */
-#define ASM_GLOBALIZE_LABEL(STREAM,NAME) \
- (fprintf ((STREAM), "\t.global\t"), \
- assemble_name ((STREAM), (NAME)), \
- fputc ('\n', (STREAM)))
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global\t"
/* #define ASM_OUTPUT_CASE_END(STREAM,NUM,TABLE) */
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-29 15:03:27.456084426 -0400
+++ egcc-CVS20020729/gcc/config/sparc/sparc.h 2002-07-29 15:47:04.692871456 -0400
@@ -2729,8 +2729,8 @@ case LABEL_REF: case SYMBOL_REF: case CO
/* 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) \
- do { fputs ("\t.global ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global "
/* The prefix to add to user-visible assembler symbols. */
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-29 15:03:27.476135877 -0400
+++ egcc-CVS20020729/gcc/config/stormy16/stormy16.h 2002-07-29 15:47:33.374411654 -0400
@@ -2848,17 +2848,8 @@ do { \
Defined in svr4.h. */
/* #define ASM_FINISH_DECLARE_OBJECT(STREAM, DECL, TOPLEVEL, ATEND) */
-/* 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,
- NAME)' to output the name itself; before and after that, output the
- additional assembler syntax for making that name global, and a newline. */
-#define ASM_GLOBALIZE_LABEL(STREAM,NAME) \
-do { \
- fputs ("\t.globl ", STREAM); \
- assemble_name (STREAM, NAME); \
- fputs ("\n", STREAM); \
-} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.globl "
/* A C statement (sans semicolon) to output to the stdio stream STREAM some
commands that will make the label NAME weak; that is, available for
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-07-29 15:03:27.476135877 -0400
+++ egcc-CVS20020729/gcc/config/v850/v850.h 2002-07-29 15:47:57.985784678 -0400
@@ -1172,17 +1172,8 @@ 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 a command to make the user-level label named NAME
- defined for reference from other files. */
-
-#define ASM_GLOBALIZE_LABEL(FILE, NAME) \
- do \
- { \
- fputs ("\t.global ", FILE); \
- assemble_name (FILE, NAME); \
- fputs ("\n", FILE); \
- } \
- while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global "
/* This is how to output a reference to a user-level label named NAME.
`assemble_name' uses this. */
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-07-29 15:03:27.486136891 -0400
+++ egcc-CVS20020729/gcc/config/vax/vax.h 2002-07-29 15:48:25.517325459 -0400
@@ -1054,8 +1054,8 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_
/* 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) \
- do { fputs (".globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP ".globl "
/* The prefix to add to user-visible assembler symbols. */
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-29 15:03:27.496136504 -0400
+++ egcc-CVS20020729/gcc/config/xtensa/xtensa.h 2002-07-29 15:49:40.371380041 -0400
@@ -1545,14 +1545,8 @@ typedef struct xtensa_args {
goto FAIL; \
} 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) \
- do { \
- fputs ("\t.global\t", STREAM); \
- assemble_name (STREAM, NAME); \
- fputs ("\n", STREAM); \
- } while (0)
+/* Globalizing directive for a label. */
+#define GLOBAL_ASM_OP "\t.global\t"
/* This says how to define a global common symbol. */
#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \