diff options
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 4c840b4094c..ed0824ee198 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -14164,15 +14164,17 @@ minmax_loc_descriptor (rtx rtl, machine_mode mode, add_loc_descr (&op1, new_loc_descr (DW_OP_over, 0, 0)); if (GET_CODE (rtl) == UMIN || GET_CODE (rtl) == UMAX) { - if (GET_MODE_SIZE (mode) < DWARF2_ADDR_SIZE) + /* Checked by the caller. */ + int_mode = as_a <scalar_int_mode> (mode); + if (GET_MODE_SIZE (int_mode) < DWARF2_ADDR_SIZE) { - HOST_WIDE_INT mask = GET_MODE_MASK (mode); + HOST_WIDE_INT mask = GET_MODE_MASK (int_mode); add_loc_descr (&op0, int_loc_descriptor (mask)); add_loc_descr (&op0, new_loc_descr (DW_OP_and, 0, 0)); add_loc_descr (&op1, int_loc_descriptor (mask)); add_loc_descr (&op1, new_loc_descr (DW_OP_and, 0, 0)); } - else if (GET_MODE_SIZE (mode) == DWARF2_ADDR_SIZE) + else if (GET_MODE_SIZE (int_mode) == DWARF2_ADDR_SIZE) { HOST_WIDE_INT bias = 1; bias <<= (DWARF2_ADDR_SIZE * BITS_PER_UNIT - 1); @@ -15058,7 +15060,8 @@ mem_loc_descriptor (rtx rtl, machine_mode mode, break; if (CONST_INT_P (XEXP (rtl, 1)) - && GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE) + && (GET_MODE_SIZE (as_a <scalar_int_mode> (mode)) + <= DWARF2_ADDR_SIZE)) loc_descr_plus_const (&mem_loc_result, INTVAL (XEXP (rtl, 1))); else { @@ -15841,8 +15844,11 @@ loc_descriptor (rtx rtl, machine_mode mode, case CONST_INT: if (mode != VOIDmode && mode != BLKmode) - loc_result = address_of_int_loc_descriptor (GET_MODE_SIZE (mode), - INTVAL (rtl)); + { + int_mode = as_a <scalar_int_mode> (mode); + loc_result = address_of_int_loc_descriptor (GET_MODE_SIZE (int_mode), + INTVAL (rtl)); + } break; case CONST_DOUBLE: @@ -15887,11 +15893,12 @@ loc_descriptor (rtx rtl, machine_mode mode, if (mode != VOIDmode && (dwarf_version >= 4 || !dwarf_strict)) { + int_mode = as_a <scalar_int_mode> (mode); loc_result = new_loc_descr (DW_OP_implicit_value, - GET_MODE_SIZE (mode), 0); + GET_MODE_SIZE (int_mode), 0); loc_result->dw_loc_oprnd2.val_class = dw_val_class_wide_int; loc_result->dw_loc_oprnd2.v.val_wide = ggc_alloc<wide_int> (); - *loc_result->dw_loc_oprnd2.v.val_wide = rtx_mode_t (rtl, mode); + *loc_result->dw_loc_oprnd2.v.val_wide = rtx_mode_t (rtl, int_mode); } break; |