summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-13 11:44:04 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-13 12:39:57 -0400
commitaf3363a79695c9f56e3cede129c340676f2f93d7 (patch)
tree1863dde32d5bd0aac0f2c6afd4a1220b0863225e
parent491c55e6e0295904c8c5f996503b4e8b9e2e180c (diff)
downloadroux-af3363a79695c9f56e3cede129c340676f2f93d7.tar.gz
turn alignment asserts into err()
-rw-r--r--sysv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysv.c b/sysv.c
index 25d9859..d15e556 100644
--- a/sysv.c
+++ b/sysv.c
@@ -278,7 +278,8 @@ selcall(Fn *fn, Ins *i0, Ins *i1, RAlloc **rap)
 
 	for (stk=0, a=&ac[i1-i0]; a>ac;)
 		if ((--a)->inmem) {
-			assert(a->align <= 4);
+			if (a->align > 4)
+				err("sysv abi requires alignments of 16 or less");
 			stk += a->size;
 			if (a->align == 4)
 				stk += stk & 15;
@@ -414,7 +415,8 @@ selpar(Fn *fn, Ins *i0, Ins *i1)
 	for (i=i0, a=ac, s=4; i<i1; i++, a++) {
 		switch (a->inmem) {
 		case 1:
-			assert(a->align <= 4);
+			if (a->align > 4)
+				err("sysv abi requires alignments of 16 or less");
 			if (a->align == 4)
 				s = (s+3) & -4;
 			fn->tmp[i->to.val].slot = -s;