summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-21 14:59:04 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-22 10:34:31 -0400
commit665a45003a7b6d1e80cf56a21b2e24094703f7ea (patch)
tree321b768c5eab7de5082695d84a9cb957f3ddeedd
parent6b58aaa7ea87772216aa0d4bfb1f3d959450c040 (diff)
downloadroux-665a45003a7b6d1e80cf56a21b2e24094703f7ea.tar.gz
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.
-rw-r--r--lisc/isel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisc/isel.c b/lisc/isel.c
index a00c4f2..ab8e46c 100644
--- 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};