diff options
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index c92fa4b..a284eed 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -11840,6 +11840,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, dw_loc_descr_ref mem_loc_result = NULL; enum dwarf_location_atom op; dw_loc_descr_ref op0, op1; + rtx inner = NULL_RTX; if (mode == VOIDmode) mode = GET_MODE (rtl); @@ -11869,35 +11870,39 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, contains the given subreg. */ if (!subreg_lowpart_p (rtl)) break; + inner = SUBREG_REG (rtl); + case TRUNCATE: + if (inner == NULL_RTX) + inner = XEXP (rtl, 0); if (GET_MODE_CLASS (mode) == MODE_INT - && GET_MODE_CLASS (GET_MODE (SUBREG_REG (rtl))) == MODE_INT + && GET_MODE_CLASS (GET_MODE (inner)) == MODE_INT && (GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE #ifdef POINTERS_EXTEND_UNSIGNED || (mode == Pmode && mem_mode != VOIDmode) #endif ) - && GET_MODE_SIZE (GET_MODE (SUBREG_REG (rtl))) <= DWARF2_ADDR_SIZE) + && GET_MODE_SIZE (GET_MODE (inner)) <= DWARF2_ADDR_SIZE) { - mem_loc_result = mem_loc_descriptor (SUBREG_REG (rtl), - GET_MODE (SUBREG_REG (rtl)), + mem_loc_result = mem_loc_descriptor (inner, + GET_MODE (inner), mem_mode, initialized); break; } if (dwarf_strict) break; - if (GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (SUBREG_REG (rtl)))) + if (GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (inner))) break; - if (GET_MODE_SIZE (mode) != GET_MODE_SIZE (GET_MODE (SUBREG_REG (rtl))) + if (GET_MODE_SIZE (mode) != GET_MODE_SIZE (GET_MODE (inner)) && (GET_MODE_CLASS (mode) != MODE_INT - || GET_MODE_CLASS (GET_MODE (SUBREG_REG (rtl))) != MODE_INT)) + || GET_MODE_CLASS (GET_MODE (inner)) != MODE_INT)) break; else { dw_die_ref type_die; dw_loc_descr_ref cvt; - mem_loc_result = mem_loc_descriptor (SUBREG_REG (rtl), - GET_MODE (SUBREG_REG (rtl)), + mem_loc_result = mem_loc_descriptor (inner, + GET_MODE (inner), mem_mode, initialized); if (mem_loc_result == NULL) break; @@ -11909,7 +11914,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, break; } if (GET_MODE_SIZE (mode) - != GET_MODE_SIZE (GET_MODE (SUBREG_REG (rtl)))) + != GET_MODE_SIZE (GET_MODE (inner))) cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); else cvt = new_loc_descr (DW_OP_GNU_reinterpret, 0, 0); @@ -12666,7 +12671,6 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, break; case COMPARE: - case TRUNCATE: /* In theory, we could implement the above. */ /* DWARF cannot represent the unsigned compare operations natively. */ |