diff options
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/i386.c | 12 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 2 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 26 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 4 |
4 files changed, 17 insertions, 27 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index f5aee19..8e54acc 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1677,7 +1677,6 @@ ix86_can_use_return_insn_p () static const char *pic_label_name; static int pic_label_output; -static const char *global_offset_table_name; /* This function generates code for -fpic that loads %ebx with the return address of the caller and then returns. */ @@ -1721,13 +1720,7 @@ load_pic_register () { rtx gotsym, pclab; - if (global_offset_table_name == NULL) - { - global_offset_table_name = - ggc_alloc_string ("_GLOBAL_OFFSET_TABLE_", 21); - ggc_add_string_root (&global_offset_table_name, 1); - } - gotsym = gen_rtx_SYMBOL_REF (Pmode, global_offset_table_name); + gotsym = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_"); if (TARGET_DEEP_BRANCH_PREDICTION) { @@ -1735,8 +1728,7 @@ load_pic_register () { char buf[32]; ASM_GENERATE_INTERNAL_LABEL (buf, "LPR", 0); - pic_label_name = ggc_alloc_string (buf, -1); - ggc_add_string_root (&pic_label_name, 1); + pic_label_name = ggc_strdup (buf); } pclab = gen_rtx_MEM (QImode, gen_rtx_SYMBOL_REF (Pmode, pic_label_name)); } diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 0f6657a..e318dbb 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -4817,7 +4817,7 @@ ia64_encode_section_info (decl) else if (symbol_str[0] == SDATA_NAME_FLAG_CHAR) { XSTR (XEXP (DECL_RTL (decl), 0), 0) - = ggc_alloc_string (symbol_str + 1, -1); + = ggc_strdup (symbol_str + 1); } } diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 98fb376..6dbcb25 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -5114,10 +5114,10 @@ rs6000_emit_load_toc_table (fromprolog) rtx symL; ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno); - symF = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1)); + symF = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); ASM_GENERATE_INTERNAL_LABEL (buf, "LCL", rs6000_pic_labelno); - symL = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1)); + symL = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); rs6000_maybe_dead (emit_insn (gen_load_toc_v4_PIC_1 (tempLR, symF))); @@ -5131,11 +5131,10 @@ rs6000_emit_load_toc_table (fromprolog) rtx tocsym; static int reload_toc_labelno = 0; - tocsym = gen_rtx_SYMBOL_REF (Pmode, - ggc_alloc_string (toc_label_name, -1)); + tocsym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (toc_label_name)); ASM_GENERATE_INTERNAL_LABEL (buf, "LCG", reload_toc_labelno++); - symF = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1)); + symF = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); rs6000_maybe_dead (emit_insn (gen_load_toc_v4_PIC_1b (tempLR, symF, @@ -5152,7 +5151,7 @@ rs6000_emit_load_toc_table (fromprolog) char buf[30]; rtx realsym; ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1); - realsym = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1)); + realsym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); rs6000_maybe_dead (emit_insn (gen_elf_high (dest, realsym))); rs6000_maybe_dead (emit_insn (gen_elf_low (dest, dest, realsym))); @@ -5205,12 +5204,11 @@ rtx create_TOC_reference(symbol) rtx symbol; { - return gen_rtx_PLUS (Pmode, - gen_rtx_REG (Pmode, TOC_REGISTER), - gen_rtx_CONST (Pmode, - gen_rtx_MINUS (Pmode, symbol, - gen_rtx_SYMBOL_REF (Pmode, - ggc_alloc_string (toc_label_name, -1))))); + return gen_rtx_PLUS (Pmode, + gen_rtx_REG (Pmode, TOC_REGISTER), + gen_rtx_CONST (Pmode, + gen_rtx_MINUS (Pmode, symbol, + gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (toc_label_name))))); } #if TARGET_AIX @@ -5613,7 +5611,7 @@ rs6000_emit_prologue() LINK_REGISTER_REGNUM)); sprintf (rname, "%s%d%s", SAVE_FP_PREFIX, info->first_fp_reg_save - 32, SAVE_FP_SUFFIX); - alloc_rname = ggc_alloc_string (rname, -1); + alloc_rname = ggc_strdup (rname); RTVEC_ELT (p, 1) = gen_rtx_USE (VOIDmode, gen_rtx_SYMBOL_REF (Pmode, alloc_rname)); @@ -6061,7 +6059,7 @@ rs6000_emit_epilogue(sibcall) sprintf (rname, "%s%d%s", RESTORE_FP_PREFIX, info->first_fp_reg_save - 32, RESTORE_FP_SUFFIX); - alloc_rname = ggc_alloc_string (rname, -1); + alloc_rname = ggc_strdup (rname); RTVEC_ELT (p, 2) = gen_rtx_USE (VOIDmode, gen_rtx_SYMBOL_REF (Pmode, alloc_rname)); diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index b324e3f..e725f43 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -9190,7 +9190,7 @@ operands[2] = GEN_INT (INTVAL (operands[1]) >> 32); { char buf[30]; ASM_GENERATE_INTERNAL_LABEL (buf, \"LCTOC\", 1); - operands[1] = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1)); + operands[1] = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); operands[2] = gen_rtx_REG (Pmode, 2); return \"{l|lwz} %0,%1(%2)\"; }" @@ -9204,7 +9204,7 @@ operands[2] = GEN_INT (INTVAL (operands[1]) >> 32); { char buf[30]; ASM_GENERATE_INTERNAL_LABEL (buf, \"LCTOC\", 1); - operands[1] = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (buf, -1)); + operands[1] = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); operands[2] = gen_rtx_REG (Pmode, 2); return \"ld %0,%1(%2)\"; }" |