commit 665a45003a7b6d1e80cf56a21b2e24094703f7ea
parent 6b58aaa7ea87772216aa0d4bfb1f3d959450c040
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Mon, 21 Mar 2016 14:59:04 -0400
fix incorrect size increment in abi (abi fuzzer)
Sizes are expressed in multiples of 4 bytes, so
we need to divide the size of aggregate types by
four when computing stack offsets.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisc/isel.c b/lisc/isel.c
@@ -819,7 +819,7 @@ selpar(Fn *fn, Ins *i0, Ins *i1)
if (a->align == 4)
s = (s+3) & -4;
fn->tmp[i->to.val].slot = -s; /* HACK! */
- s += a->size;
+ s += a->size / 4;
continue;
case 2:
*curi++ = (Ins){OLoad, i->to, {SLOT(-s)}, i->cls};