summaryrefslogtreecommitdiffstats
path: root/loc2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'loc2c.c')
-rw-r--r--loc2c.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/loc2c.c b/loc2c.c
index 161df763..818e9e49 100644
--- a/loc2c.c
+++ b/loc2c.c
@@ -479,7 +479,6 @@ translate (struct obstack *pool, int indent, Dwarf_Addr addrbias,
UNOP (abs, op_abs);
BINOP (and, &);
- BINOP (div, /);
BINOP (minus, -);
BINOP (mod, %);
BINOP (mul, *);
@@ -488,7 +487,7 @@ translate (struct obstack *pool, int indent, Dwarf_Addr addrbias,
BINOP (or, |);
BINOP (plus, +);
BINOP (shl, <<);
- BINOP (shra, >>);
+ BINOP (shr, >>);
BINOP (xor, ^);
/* Comparisons are binary operators too. */
@@ -502,7 +501,7 @@ translate (struct obstack *pool, int indent, Dwarf_Addr addrbias,
#undef UNOP
#undef BINOP
- case DW_OP_shr:
+ case DW_OP_shra:
{
POP (b);
POP (a);
@@ -512,6 +511,16 @@ translate (struct obstack *pool, int indent, Dwarf_Addr addrbias,
break;
}
+ case DW_OP_div:
+ {
+ POP (b);
+ POP (a);
+ push ("(%s) " STACKFMT " / (%s)" STACKFMT,
+ stack_slot_type (loc, true), a,
+ stack_slot_type (loc, true), b);
+ break;
+ }
+
case DW_OP_plus_uconst:
{
POP (x);