summaryrefslogtreecommitdiff
path: root/opt
diff options
context:
space:
mode:
authorOri Bernstein <orib@google.com>2012-06-11 13:12:18 -0400
committerOri Bernstein <orib@google.com>2012-06-11 13:12:18 -0400
commit637aad1be46d7ed9dfafd103dd57a4cbdcba9ca0 (patch)
tree3e165763b066c5b7d2899a7c43604ff24fb3b54b /opt
parenta8a99dd9a47f30f7d50492650345e9dc346b57db (diff)
downloadmc-637aad1be46d7ed9dfafd103dd57a4cbdcba9ca0.tar.gz
When using conditional jumps, use the labels.
Conditional jump args are expr, label, label. We were using the first two (ie, expr, label) as the jump targets, instead of the last two (ie, label, label). Predictably, this didn't work.
Diffstat (limited to 'opt')
-rw-r--r--opt/df.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/opt/df.c b/opt/df.c
index 890e1e6..9106df0 100644
--- a/opt/df.c
+++ b/opt/df.c
@@ -85,8 +85,8 @@ Cfg *mkcfg(Node **nl, int nn)
b = NULL;
break;
case Ocjmp:
- a = cfg->fixjmp[i]->expr.args[0];
- b = cfg->fixjmp[i]->expr.args[1];
+ a = cfg->fixjmp[i]->expr.args[1];
+ b = cfg->fixjmp[i]->expr.args[2];
break;
default:
die("Bad jump fix thingy");