aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2003-09-14 01:14:18 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2003-09-13 18:14:18 -0700
commit876455fa517e08458bb848a4cdebf56a4c539ea2 (patch)
tree84da5a5872e1ce454f9b741f837f8e4f5538d0cc
parent3428576c065ef869bc2f61935392439f5c686794 (diff)
downloadgcc-876455fa517e08458bb848a4cdebf56a4c539ea2.zip
gcc-876455fa517e08458bb848a4cdebf56a4c539ea2.tar.gz
gcc-876455fa517e08458bb848a4cdebf56a4c539ea2.tar.bz2
rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Remove.
2003-09-13 Andrew Pinski <pinskia@physics.uc.edu> * config/rs6000/rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Remove. (machopic_output_stub): Only generate pic base symbols when using pic and generate them in the form L00000000$spb. From-SVN: r71368
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/rs6000.c27
2 files changed, 10 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 886df32..f0c7871 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2003-09-13 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * config/rs6000/rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Remove.
+ (machopic_output_stub): Only generate pic base symbols when using pic
+ and generate them in the form L00000000$spb.
+
2003-09-13 Richard Henderson <rth@redhat.com>
* cgraphunit.c (cgraph_assemble_pending_functions): Export.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index f441fab..56a292e 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -13541,25 +13541,6 @@ output_call (rtx insn, rtx call_dest, int operand_number)
#endif /* RS6000_LONG_BRANCH */
-#define GEN_LOCAL_LABEL_FOR_SYMBOL(BUF,SYMBOL,LENGTH,N) \
- do { \
- const char *const symbol_ = (SYMBOL); \
- char *buffer_ = (BUF); \
- if (symbol_[0] == '"') \
- { \
- sprintf(buffer_, "\"L%d$%s", (N), symbol_+1); \
- } \
- else if (name_needs_quotes(symbol_)) \
- { \
- sprintf(buffer_, "\"L%d$%s\"", (N), symbol_); \
- } \
- else \
- { \
- sprintf(buffer_, "L%d$%s", (N), symbol_); \
- } \
- } while (0)
-
-
/* Generate PIC and indirect symbol stubs. */
void
@@ -13573,7 +13554,6 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub)
/* Lose our funky encoding stuff so it doesn't contaminate the stub. */
symb = (*targetm.strip_name_encoding) (symb);
- label += 1;
length = strlen (symb);
symbol_name = alloca (length + 32);
@@ -13582,9 +13562,6 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub)
lazy_ptr_name = alloca (length + 32);
GEN_LAZY_PTR_NAME_FOR_SYMBOL (lazy_ptr_name, symb, length);
- local_label_0 = alloca (length + 32);
- GEN_LOCAL_LABEL_FOR_SYMBOL (local_label_0, symb, length, 0);
-
if (flag_pic == 2)
machopic_picsymbol_stub1_section ();
else
@@ -13596,6 +13573,10 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub)
if (flag_pic == 2)
{
+ label++;
+ local_label_0 = alloca (sizeof("\"L0000000000$spb\""));
+ sprintf (local_label_0, "\"L%011d$spb\"", label);
+
fprintf (file, "\tmflr r0\n");
fprintf (file, "\tbcl 20,31,%s\n", local_label_0);
fprintf (file, "%s:\n\tmflr r11\n", local_label_0);