summaryrefslogtreecommitdiffstats
path: root/loc2c.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2010-01-19 12:38:31 -0800
committerRoland McGrath <roland@redhat.com>2010-01-19 12:38:51 -0800
commit682d5372669bc117cabe1c44a205ad6acca72730 (patch)
tree99898a0cadcce7af566d70280e0edaa6f80cc541 /loc2c.c
parent70dc04429ec63764b6d1dd831c753329d2c0574a (diff)
downloadsystemtap-steved-682d5372669bc117cabe1c44a205ad6acca72730.tar.gz
systemtap-steved-682d5372669bc117cabe1c44a205ad6acca72730.tar.xz
systemtap-steved-682d5372669bc117cabe1c44a205ad6acca72730.zip
Use signed division for DW_OP_div.
* loc2c.c (translate): Use signed division for DW_OP_div.
Diffstat (limited to 'loc2c.c')
-rw-r--r--loc2c.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/loc2c.c b/loc2c.c
index 161df763..4633e739 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, *);
@@ -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);