From 258f4afb96a4a2a8e367b5911fd67043be29592c Mon Sep 17 00:00:00 2001 From: pinskia Date: Sun, 14 Sep 2003 01:14:18 +0000 Subject: [PATCH] 2003-09-13 Andrew Pinski * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71368 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/rs6000/rs6000.c | 27 ++++----------------------- 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 + + * 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 * 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); -- 2.7.4