aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>1994-02-13 22:25:55 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>1994-02-13 22:25:55 +0000
commit3daf36a4c9dc26781462228ccff56ee54afc23f0 (patch)
tree65123e95e836fe478bd95bfbf739d108d6a33b85
parent266f3aacd548ed854b16123f2d9a1e59c5915397 (diff)
downloadgcc-3daf36a4c9dc26781462228ccff56ee54afc23f0.zip
gcc-3daf36a4c9dc26781462228ccff56ee54afc23f0.tar.gz
gcc-3daf36a4c9dc26781462228ccff56ee54afc23f0.tar.bz2
Use ASM_GENERATE_INTERNAL_LABEL rather than assuming what it does
From-SVN: r6548
-rw-r--r--gcc/config/rs6000/rs6000.c37
-rw-r--r--gcc/config/rs6000/rs6000.h25
2 files changed, 52 insertions, 10 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 2b14e5b..e75f747 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1490,7 +1490,14 @@ output_prolog (file, size)
/* If TARGET_MINIMAL_TOC, and the constant pool is needed, then load the
TOC_TABLE address into register 30. */
if (TARGET_MINIMAL_TOC && get_pool_size () != 0)
- asm_fprintf (file, "\t{l|lwz} 30,LCTOC..0(2)\n");
+ {
+ char buf[100];
+
+ ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 0);
+ asm_fprintf (file, "\t{l|lwz} 30,");
+ assemble_name (file, buf);
+ asm_fprintf (file, "(2)\n");
+ }
}
/* Write function epilogue. */
@@ -1586,7 +1593,7 @@ output_epilog (file, size)
from the function start. */
if (*fname == '*')
++fname;
- fprintf (file, "LT..");
+ ASM_OUTPUT_INTERNAL_LABEL_PREFIX (file, "LT");
ASM_OUTPUT_LABEL (file, fname);
/* The .tbtab pseudo-op can only be used for the first eight
@@ -1720,7 +1727,8 @@ output_epilog (file, size)
fprintf (file, "\t.long %d\n", parm_info);
/* Offset from start of code to tb table. */
- fprintf (file, "\t.long LT..");
+ fprintf (file, "\t.long ");
+ ASM_OUTPUT_INTERNAL_LABEL_PREFIX (file, "LT");
RS6000_OUTPUT_BASENAME (file, fname);
fprintf (file, "-.");
RS6000_OUTPUT_BASENAME (file, fname);
@@ -1965,14 +1973,26 @@ output_function_profiler (file, labelno)
/* The last used parameter register. */
int last_parm_reg;
int i, j;
+ char buf[100];
/* Set up a TOC entry for the profiler label. */
toc_section ();
+ ASM_OUTPUT_INTERNAL_LABEL (file, "LPC", labelno);
+ ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno);
if (TARGET_MINIMAL_TOC)
- fprintf (file, "LPC..%d:\n\t.long LP..%d\n", labelno, labelno);
+ {
+ fprintf (file, "\t.long ");
+ assemble_name (file, buf);
+ fprintf (file, "\n");
+ }
else
- fprintf (file, "LPC..%d:\n\t.tc\tLP..%d[TC],LP..%d\n",
- labelno, labelno, labelno);
+ {
+ fprintf (file, "\t.tc\t");
+ assemble_name (file, buf);
+ fprintf (file, "[TC],");
+ assemble_name (file, buf);
+ fprintf (file, "\n");
+ }
text_section ();
/* Figure out last used parameter register. The proper thing to do is
@@ -1992,7 +2012,10 @@ output_function_profiler (file, labelno)
/* Load location address into r3, and call mcount. */
- fprintf (file, "\tl 3,LPC..%d(2)\n\tbl .mcount\n", labelno);
+ ASM_GENERATE_INTERNAL_LABEL (buf, "LPC", labelno);
+ fprintf (file, "\tl 3,");
+ assemble_name (file, buf);
+ fprintf (file, "(2)\n\tbl .mcount\n");
/* Restore parameter registers. */
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index b7fac82..ebfe0c1 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -1869,6 +1869,12 @@ toc_section () \
#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
fprintf (FILE, "%s..%d:\n", PREFIX, NUM)
+/* This is how to output an internal label prefix. rs6000.c uses this
+ when generating traceback tables. */
+
+#define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \
+ fprintf (FILE, "%s..", PREFIX)
+
/* This is how to output a label for a jump table. Arguments are the same as
for ASM_OUTPUT_INTERNAL_LABEL, except the insn for the jump table is
passed. */
@@ -1971,13 +1977,26 @@ toc_section () \
(RS/6000 does not use such vectors, but we must define this macro
anyway.) */
-#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
- fprintf (FILE, "\t.long L..%d\n", VALUE)
+#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
+ do { char buf[100]; \
+ fprintf (FILE, "\t.long "); \
+ ASM_GENERATE_INTERNAL_LABEL (buf, "L", VALUE); \
+ assemble_name (FILE, buf); \
+ fprintf (FILE, "\n"); \
+ } while (0)
/* This is how to output an element of a case-vector that is relative. */
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \
- fprintf (FILE, "\t.long L..%d-L..%d\n", VALUE, REL)
+ do { char buf[100]; \
+ fprintf (FILE, "\t.long "); \
+ ASM_GENERATE_INTERNAL_LABEL (buf, "L", VALUE); \
+ assemble_name (FILE, buf); \
+ fprintf (FILE, "-"); \
+ ASM_GENERATE_INTERNAL_LABEL (buf, "L", REL); \
+ assemble_name (FILE, buf); \
+ fprintf (FILE, "\n"); \
+ } while (0)
/* This is how to output an assembler line
that says to advance the location counter