diff options
author | Steve Ellcey <sellcey@mips.com> | 2013-10-25 14:01:24 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2013-10-25 15:09:22 +0800 |
commit | 5605fa86c3157aed47c67dc919a0ee1783fde907 (patch) | |
tree | c035de337a7e3c97cef8cf8b2ef5d4c60bce6a2c /gcc-4.7/gcc | |
parent | 1c712bf7621f3859c33fd3afaa61fdcaf3fdfd76 (diff) | |
download | toolchain_gcc-5605fa86c3157aed47c67dc919a0ee1783fde907.tar.gz toolchain_gcc-5605fa86c3157aed47c67dc919a0ee1783fde907.tar.bz2 toolchain_gcc-5605fa86c3157aed47c67dc919a0ee1783fde907.zip |
Backport fix to set mips_dbx_regno entries to IGNORED_DWARF_REGNUM by default
2012-12-12 Steve Ellcey <sellcey@mips.com>
* config/mips/mips.c (mips_option_override): Set
mips_dbx_regno entries to IGNORED_DWARF_REGNUM by default.
2012-12-10 Steve Ellcey <sellcey@mips.com>
PR target/54061
rtl.h (IGNORED_DWARF_REGNUM): New.
* dwarf2out.c (reg_loc_descriptor): Check for IGNORED_DWARF_REGNUM.
(mem_loc_descriptor): Ditto.
* config/mips/mips.h (ALL_COP_REG_FIRST): New.
(ALL_COP_REG_LAST): New.
(ALL_COP_REG_NUM): Redefine using above macros.
* config/mips/mips.c (mips_option_override): Set mips_dbx_regno
coprocessor entries to IGNORED_DWARF_REGNUM.
Error reads:
target C++: libicui18n <= external/icu4c/i18n/olsontz.cpp
external/icu4c/i18n/decimfmt.cpp: In member function 'virtual icu_50::UnicodeString&
icu_50::DecimalFormat::format(const icu_50::StringPiece&, icu_50::UnicodeString&,
icu_50::FieldPositionIterator*, UErrorCode&) const':
external/icu4c/i18n/decimfmt.cpp:1322:1: internal compiler error: in dbx_reg_number,
at dwarf2out.c:10185
See http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00830.html
Change-Id: I84110b5b54d8d9262043811eddb0edc1c42303f8
Diffstat (limited to 'gcc-4.7/gcc')
-rw-r--r-- | gcc-4.7/gcc/config/mips/mips.c | 2 | ||||
-rw-r--r-- | gcc-4.7/gcc/config/mips/mips.h | 7 | ||||
-rw-r--r-- | gcc-4.7/gcc/dwarf2out.c | 24 | ||||
-rw-r--r-- | gcc-4.7/gcc/rtl.h | 3 |
4 files changed, 28 insertions, 8 deletions
diff --git a/gcc-4.7/gcc/config/mips/mips.c b/gcc-4.7/gcc/config/mips/mips.c index 02e757b5b..ae222b891 100644 --- a/gcc-4.7/gcc/config/mips/mips.c +++ b/gcc-4.7/gcc/config/mips/mips.c @@ -16082,7 +16082,7 @@ mips_option_override (void) for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) { - mips_dbx_regno[i] = INVALID_REGNUM; + mips_dbx_regno[i] = IGNORED_DWARF_REGNUM; if (GP_REG_P (i) || FP_REG_P (i) || ALL_COP_REG_P (i)) mips_dwarf_regno[i] = i; else diff --git a/gcc-4.7/gcc/config/mips/mips.h b/gcc-4.7/gcc/config/mips/mips.h index 71c55d24f..ddd4c47d5 100644 --- a/gcc-4.7/gcc/config/mips/mips.h +++ b/gcc-4.7/gcc/config/mips/mips.h @@ -1638,8 +1638,11 @@ struct mips_cpu_info { #define COP3_REG_FIRST 144 #define COP3_REG_LAST 175 #define COP3_REG_NUM (COP3_REG_LAST - COP3_REG_FIRST + 1) -/* ALL_COP_REG_NUM assumes that COP0,2,and 3 are numbered consecutively. */ -#define ALL_COP_REG_NUM (COP3_REG_LAST - COP0_REG_FIRST + 1) + +/* These definitions assume that COP0, 2 and 3 are numbered consecutively. */ +#define ALL_COP_REG_FIRST COP0_REG_FIRST +#define ALL_COP_REG_LAST COP3_REG_LAST +#define ALL_COP_REG_NUM (ALL_COP_REG_LAST - ALL_COP_REG_FIRST + 1) #define DSP_ACC_REG_FIRST 176 #define DSP_ACC_REG_LAST 181 diff --git a/gcc-4.7/gcc/dwarf2out.c b/gcc-4.7/gcc/dwarf2out.c index 36a63ca45..c6bd91cc3 100644 --- a/gcc-4.7/gcc/dwarf2out.c +++ b/gcc-4.7/gcc/dwarf2out.c @@ -10243,7 +10243,12 @@ reg_loc_descriptor (rtx rtl, enum var_init_status initialized) if (hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)] > 1 || regs) return multiple_reg_loc_descriptor (rtl, regs, initialized); else - return one_reg_loc_descriptor (dbx_reg_number (rtl), initialized); + { + unsigned int dbx_regnum = dbx_reg_number (rtl); + if (dbx_regnum == IGNORED_DWARF_REGNUM) + return 0; + return one_reg_loc_descriptor (dbx_regnum, initialized); + } } /* Return a location descriptor that designates a machine register for @@ -11679,6 +11684,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, )) { dw_die_ref type_die; + unsigned int dbx_regnum; if (dwarf_strict) break; @@ -11688,8 +11694,12 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, GET_MODE_CLASS (mode) == MODE_INT); if (type_die == NULL) break; + + dbx_regnum = dbx_reg_number (rtl); + if (dbx_regnum == IGNORED_DWARF_REGNUM) + break; mem_loc_result = new_loc_descr (DW_OP_GNU_regval_type, - dbx_reg_number (rtl), 0); + dbx_regnum, 0); mem_loc_result->dw_loc_oprnd2.val_class = dw_val_class_die_ref; mem_loc_result->dw_loc_oprnd2.v.val_die_ref.die = type_die; mem_loc_result->dw_loc_oprnd2.v.val_die_ref.external = 0; @@ -11900,9 +11910,13 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, op0 = mem_loc_descriptor (ENTRY_VALUE_EXP (rtl), mode, VOIDmode, VAR_INIT_STATUS_INITIALIZED); else - op0 - = one_reg_loc_descriptor (dbx_reg_number (ENTRY_VALUE_EXP (rtl)), - VAR_INIT_STATUS_INITIALIZED); + { + unsigned int dbx_regnum = dbx_reg_number (ENTRY_VALUE_EXP (rtl)); + if (dbx_regnum == IGNORED_DWARF_REGNUM) + return NULL; + op0 = one_reg_loc_descriptor (dbx_regnum, + VAR_INIT_STATUS_INITIALIZED); + } } else if (MEM_P (ENTRY_VALUE_EXP (rtl)) && REG_P (XEXP (ENTRY_VALUE_EXP (rtl), 0))) diff --git a/gcc-4.7/gcc/rtl.h b/gcc-4.7/gcc/rtl.h index 5b43e05d4..40f685a33 100644 --- a/gcc-4.7/gcc/rtl.h +++ b/gcc-4.7/gcc/rtl.h @@ -2335,6 +2335,9 @@ extern rtx gen_rtx_MEM (enum machine_mode, rtx); /* REGNUM never really appearing in the INSN stream. */ #define INVALID_REGNUM (~(unsigned int) 0) +/* REGNUM for which no debug information can be generated. */ +#define IGNORED_DWARF_REGNUM (INVALID_REGNUM - 1) + extern rtx output_constant_def (tree, int); extern rtx lookup_constant_def (tree); |