From: jakub Date: Tue, 25 May 2010 07:49:16 +0000 (+0000) Subject: * dwarf2out.c (loc_descr_plus_const): When offset is negative, use X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b2c4a5b4b099b4a012bd35f5fec07a5b7b2fa6c;p=thirdparty%2Fgcc.git * dwarf2out.c (loc_descr_plus_const): When offset is negative, use DW_OP_minus with negated offset instead of DW_OP_plus. (loc_list_from_tree): Don't test whether second operand is INTEGER_CST. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159809 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9b44b2bd6345..7f1d29ad64f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2010-05-25 Jakub Jelinek + + * dwarf2out.c (loc_descr_plus_const): When offset is negative, use + DW_OP_minus with negated offset instead of DW_OP_plus. + (loc_list_from_tree): Don't test whether second operand is + INTEGER_CST. + 2010-05-25 Wei Guozhi * config/arm/thumb2.md (thumb2_tlobits_cbranch): Add constraint to diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index fbf581bc2f6b..19c322d8e217 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -4677,8 +4677,8 @@ loc_descr_plus_const (dw_loc_descr_ref *list_head, HOST_WIDE_INT offset) else { - loc->dw_loc_next = int_loc_descriptor (offset); - add_loc_descr (&loc->dw_loc_next, new_loc_descr (DW_OP_plus, 0, 0)); + loc->dw_loc_next = int_loc_descriptor (-offset); + add_loc_descr (&loc->dw_loc_next, new_loc_descr (DW_OP_minus, 0, 0)); } } @@ -15137,8 +15137,7 @@ loc_list_from_tree (tree loc, int want_address) case POINTER_PLUS_EXPR: case PLUS_EXPR: - if (TREE_CODE (TREE_OPERAND (loc, 1)) == INTEGER_CST - && host_integerp (TREE_OPERAND (loc, 1), 0)) + if (host_integerp (TREE_OPERAND (loc, 1), 0)) { list_ret = loc_list_from_tree (TREE_OPERAND (loc, 0), 0); if (list_ret == 0)