summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-28 15:13:42 +0000
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-28 15:13:42 +0000
commit3122a11754d12a7dfb03c7413db8847dec1d4e31 (patch)
tree2a79bb82f6bc6c61a5e280fc09264feb49d2c1dd /gcc/dwarf2out.c
parent91eed94674770fbe757400b6d052976ae3295e8c (diff)
downloadgcc-3122a11754d12a7dfb03c7413db8847dec1d4e31.tar.gz
* dwarf2out.c (mem_loc_descriptor): Handle shifts.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81252 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 83c6821c4da..7f234eebfd2 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -8435,6 +8435,7 @@ static dw_loc_descr_ref
mem_loc_descriptor (rtx rtl, enum machine_mode mode, bool can_use_fbreg)
{
dw_loc_descr_ref mem_loc_result = NULL;
+ enum dwarf_location_atom op;
/* Note that for a dynamically sized array, the location we will generate a
description of here will be the lowest numbered location which is
@@ -8576,10 +8577,26 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, bool can_use_fbreg)
}
break;
+ /* If a pseudo-reg is optimized away, it is possible for it to
+ be replaced with a MEM containing a multiply or shift. */
case MULT:
+ op = DW_OP_mul;
+ goto do_binop;
+
+ case ASHIFT:
+ op = DW_OP_shl;
+ goto do_binop;
+
+ case ASHIFTRT:
+ op = DW_OP_shra;
+ goto do_binop;
+
+ case LSHIFTRT:
+ op = DW_OP_shr;
+ goto do_binop;
+
+ do_binop:
{
- /* If a pseudo-reg is optimized away, it is possible for it to
- be replaced with a MEM containing a multiply. */
dw_loc_descr_ref op0 = mem_loc_descriptor (XEXP (rtl, 0), mode,
can_use_fbreg);
dw_loc_descr_ref op1 = mem_loc_descriptor (XEXP (rtl, 1), mode,
@@ -8590,7 +8607,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, bool can_use_fbreg)
mem_loc_result = op0;
add_loc_descr (&mem_loc_result, op1);
- add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_mul, 0, 0));
+ add_loc_descr (&mem_loc_result, new_loc_descr (op, 0, 0));
break;
}