summaryrefslogtreecommitdiff
path: root/6/isel.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-15 00:11:44 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-15 00:11:44 -0800
commit994b042eac3300dd62bbbc7dedbb6d9a0b525638 (patch)
tree79d2ac32ff3d01168ddd270a77aecd3a41b0f2dc /6/isel.c
parent64a7a7346e02999cf451ee45220b86ba7c69c56f (diff)
downloadmc-994b042eac3300dd62bbbc7dedbb6d9a0b525638.tar.gz
More fixes to void values.
We now unbreak varargs, and compare them correctly.
Diffstat (limited to '6/isel.c')
-rw-r--r--6/isel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/6/isel.c b/6/isel.c
index a8469bf..fa8bbfe 100644
--- a/6/isel.c
+++ b/6/isel.c
@@ -949,8 +949,10 @@ void addarglocs(Isel *s, Func *fn)
g(s, Imov, a, l, NULL);
htput(s->reglocs, arg, l);
nints++;
- } else {
- assert(tybase(decltype(arg))->type == Tyvoid);
+ } else if (tybase(decltype(arg))->type != Tyvoid) {
+ /* varargs go on the stack */
+ htput(s->stkoff, arg, itop(-(argoff + 2*Ptrsz)));
+ argoff += size(arg);
}
}
}