diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-26 19:53:37 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-26 19:53:37 +0000 |
commit | b8255cbc853c46d6e33189bc52d269ee92d0627c (patch) | |
tree | 5c8eeacaebad5510e442bf09c0c571c3c19f6b64 /gcc/config/rs6000/rs6000.c | |
parent | 1b8c43abf91cf0922c8ce40e4481112c59d4560f (diff) | |
download | gcc-b8255cbc853c46d6e33189bc52d269ee92d0627c.tar.gz |
PR target/68662
* config/rs6000/rs6000.c (rs6000_option_override_internal): Initialize
toc_label_name unconditionally.
(rs6000_emit_load_toc_table): Call ggc_strdup on toc_label_name for
SYMBOL_REF string. Use toc_label_name instead of constructing
LCTOC1.
(rs6000_elf_declare_function_name): Use toc_label_name instead of
constructing LCTOC1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232844 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/rs6000.c')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index b97dc19d114..7b9201a80d4 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4560,8 +4560,7 @@ rs6000_option_override_internal (bool global_init_p) if (TARGET_LONG_DOUBLE_128 && !TARGET_IEEEQUAD) REAL_MODE_FORMAT (TFmode) = &ibm_extended_format; - if (TARGET_TOC) - ASM_GENERATE_INTERNAL_LABEL (toc_label_name, "LCTOC", 1); + ASM_GENERATE_INTERNAL_LABEL (toc_label_name, "LCTOC", 1); /* We can only guarantee the availability of DI pseudo-ops when assembling for 64-bit targets. */ @@ -23983,7 +23982,7 @@ rs6000_emit_load_toc_table (int fromprolog) ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (lab)); lab = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); if (flag_pic == 2) - got = gen_rtx_SYMBOL_REF (Pmode, toc_label_name); + got = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (toc_label_name)); else got = rs6000_got_sym (); tmp1 = tmp2 = dest; @@ -24027,7 +24026,7 @@ rs6000_emit_load_toc_table (int fromprolog) { rtx tocsym, lab; - tocsym = gen_rtx_SYMBOL_REF (Pmode, toc_label_name); + tocsym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (toc_label_name)); lab = gen_label_rtx (); emit_insn (gen_load_toc_v4_PIC_1b (tocsym, lab)); emit_move_insn (dest, gen_rtx_REG (Pmode, LR_REGNO)); @@ -24040,10 +24039,7 @@ rs6000_emit_load_toc_table (int fromprolog) else if (TARGET_ELF && !TARGET_AIX && flag_pic == 0 && TARGET_MINIMAL_TOC) { /* This is for AIX code running in non-PIC ELF32. */ - char buf[30]; - rtx realsym; - ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1); - realsym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); + rtx realsym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (toc_label_name)); emit_insn (gen_elf_high (dest, realsym)); emit_insn (gen_elf_low (dest, dest, realsym)); @@ -31726,9 +31722,8 @@ rs6000_elf_declare_function_name (FILE *file, const char *name, tree decl) (*targetm.asm_out.internal_label) (file, "LCL", rs6000_pic_labelno); - ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1); fprintf (file, "\t.long "); - assemble_name (file, buf); + assemble_name (file, toc_label_name); putc ('-', file); ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno); assemble_name (file, buf); |