2016-12-01 Jakub Jelinek <jakub@redhat.com>
+ PR debug/78587
+ * dwarf2out.c (loc_descr_plus_const): For negative offset use
+ uint_loc_descriptor instead of int_loc_descriptor and perform negation
+ in unsigned HOST_WIDE_INT type.
+ (scompare_loc_descriptor): Shift UINTVAL left instead of INTVAL.
+
PR target/78614
* config/rs6000/rs6000.c (rs6000_frame_related): Call
set_used_flags (pat) before any simplifications. Clear used flag on
else
{
- loc->dw_loc_next = int_loc_descriptor (-offset);
+ loc->dw_loc_next
+ = uint_loc_descriptor (-(unsigned HOST_WIDE_INT) offset);
add_loc_descr (&loc->dw_loc_next, new_loc_descr (DW_OP_minus, 0, 0));
}
}
if (CONST_INT_P (XEXP (rtl, 1))
&& GET_MODE_BITSIZE (op_mode) < HOST_BITS_PER_WIDE_INT
&& (size_of_int_loc_descriptor (shift) + 1
- + size_of_int_loc_descriptor (INTVAL (XEXP (rtl, 1)) << shift)
+ + size_of_int_loc_descriptor (UINTVAL (XEXP (rtl, 1)) << shift)
>= size_of_int_loc_descriptor (GET_MODE_MASK (op_mode)) + 1
+ size_of_int_loc_descriptor (INTVAL (XEXP (rtl, 1))
& GET_MODE_MASK (op_mode))))
add_loc_descr (&op0, int_loc_descriptor (shift));
add_loc_descr (&op0, new_loc_descr (DW_OP_shl, 0, 0));
if (CONST_INT_P (XEXP (rtl, 1)))
- op1 = int_loc_descriptor (INTVAL (XEXP (rtl, 1)) << shift);
+ op1 = int_loc_descriptor (UINTVAL (XEXP (rtl, 1)) << shift);
else
{
add_loc_descr (&op1, int_loc_descriptor (shift));