aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-05-25 09:49:16 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2010-05-25 09:49:16 +0200
commit9d4545b28e1c3ec30b18194d722c9a9717ce98e3 (patch)
tree00a380bba5ff189619cc3b07c8d7c0270f9e515f /gcc
parentfd33fd1023d68590151bdd579c93f062bfcdd884 (diff)
downloadgcc-9d4545b28e1c3ec30b18194d722c9a9717ce98e3.zip
gcc-9d4545b28e1c3ec30b18194d722c9a9717ce98e3.tar.gz
gcc-9d4545b28e1c3ec30b18194d722c9a9717ce98e3.tar.bz2
dwarf2out.c (loc_descr_plus_const): When offset is negative, use DW_OP_minus with negated offset instead of DW_OP_plus.
* 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. From-SVN: r159809
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/dwarf2out.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9b44b2b..7f1d29a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2010-05-25 Jakub Jelinek <jakub@redhat.com>
+
+ * 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 <carrot@google.com>
* config/arm/thumb2.md (thumb2_tlobits_cbranch): Add constraint to
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index fbf581b..19c322d 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)