From: Andrew Pinski Date: Sun, 14 Sep 2003 01:14:18 +0000 (+0000) Subject: rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Remove. X-Git-Tag: releases/gcc-3.4.0~3751 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=876455fa517e08458bb848a4cdebf56a4c539ea2;p=thirdparty%2Fgcc.git rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Remove. 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. From-SVN: r71368 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 886df320b3f3..f0c78717061b 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 f441fab00fdd..56a292ebefb6 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);