diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-09-23 20:07:07 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-09-23 20:07:07 +0200 |
commit | abab57efc6cf2982fd362638dfdf726830334d3b (patch) | |
tree | 3778747985d93fb372f79d56361aa9655317ae72 /gcc | |
parent | 7168dc4708775024f33cfa33b1e86566591af8ac (diff) | |
download | gcc-abab57efc6cf2982fd362638dfdf726830334d3b.zip gcc-abab57efc6cf2982fd362638dfdf726830334d3b.tar.gz gcc-abab57efc6cf2982fd362638dfdf726830334d3b.tar.bz2 |
re PR debug/41439 (choose DW_OP_stack_value over DW_OP_implicit_value more often, please)
PR debug/41439
* dwarf2out.c (address_of_int_loc_descriptor): Don't emit
DW_OP_piece after DW_OP_stack_value, adjust size calculations
for it, when DW_OP_stack_value and DW_OP_implicit_value has
the same size, prefer DW_OP_stack_value.
(loc_descriptor, loc_list_for_address_of_addr_expr_of_indirect_ref,
loc_list_from_tree): Don't emit DW_OP_piece after DW_OP_stack_value.
From-SVN: r152091
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 26 |
2 files changed, 15 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8d461fa..18fe6df 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2009-09-23 Jakub Jelinek <jakub@redhat.com> + + PR debug/41439 + * dwarf2out.c (address_of_int_loc_descriptor): Don't emit + DW_OP_piece after DW_OP_stack_value, adjust size calculations + for it, when DW_OP_stack_value and DW_OP_implicit_value has + the same size, prefer DW_OP_stack_value. + (loc_descriptor, loc_list_for_address_of_addr_expr_of_indirect_ref, + loc_list_from_tree): Don't emit DW_OP_piece after DW_OP_stack_value. + 2009-09-23 Alexandre Oliva <aoliva@redhat.com> PR debug/41353 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index b8a0434..ed1a0fe 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10941,17 +10941,14 @@ address_of_int_loc_descriptor (int size, HOST_WIDE_INT i) } /* Determine if DW_OP_stack_value or DW_OP_implicit_value is more compact. For DW_OP_stack_value we need: - litsize + 1 (DW_OP_stack_value) + 1 (DW_OP_bit_size) - + 1 (mode size) + litsize + 1 (DW_OP_stack_value) and for DW_OP_implicit_value: - 1 (DW_OP_implicit_value) + 1 (length) + mode_size. */ - if ((int) DWARF2_ADDR_SIZE >= size - && litsize + 1 + 1 + 1 < 1 + 1 + size) + 1 (DW_OP_implicit_value) + 1 (length) + size. */ + if ((int) DWARF2_ADDR_SIZE >= size && litsize + 1 <= 1 + 1 + size) { loc_result = int_loc_descriptor (i); add_loc_descr (&loc_result, new_loc_descr (DW_OP_stack_value, 0, 0)); - add_loc_descr_op_piece (&loc_result, size); return loc_result; } @@ -11997,11 +11994,8 @@ loc_descriptor (rtx rtl, enum machine_mode mode, /* Value expression. */ loc_result = mem_loc_descriptor (rtl, VOIDmode, initialized); if (loc_result) - { - add_loc_descr (&loc_result, - new_loc_descr (DW_OP_stack_value, 0, 0)); - add_loc_descr_op_piece (&loc_result, GET_MODE_SIZE (mode)); - } + add_loc_descr (&loc_result, + new_loc_descr (DW_OP_stack_value, 0, 0)); } break; } @@ -12391,11 +12385,6 @@ loc_list_for_address_of_addr_expr_of_indirect_ref (tree loc, bool toplev) loc_list_plus_const (list_ret, bytepos); add_loc_descr_to_each (list_ret, new_loc_descr (DW_OP_stack_value, 0, 0)); - add_loc_descr_to_each (list_ret, - new_loc_descr (DW_OP_piece, - int_size_in_bytes (TREE_TYPE - (loc)), - 0)); } return list_ret; } @@ -12916,11 +12905,6 @@ loc_list_from_tree (tree loc, int want_address) } add_loc_descr_to_each (list_ret, new_loc_descr (DW_OP_stack_value, 0, 0)); - add_loc_descr_to_each (list_ret, - new_loc_descr (DW_OP_piece, - int_size_in_bytes (TREE_TYPE - (loc)), - 0)); have_address = 1; } /* Show if we can't fill the request for an address. */ |