aboutsummaryrefslogtreecommitdiff
path: root/spill.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <[email protected]>2016-03-30 12:04:43 -0400
committerQuentin Carbonneaux <[email protected]>2016-03-31 09:15:50 -0400
commit729aa97b799f72afdec3604f96526760701f36bc (patch)
tree35761b52e15fe48abe779a07766852717e4e9d6c /spill.c
parentbeec05cd3b6c85af3f3cc8956f4583d9027d569d (diff)
cleanup error handling
Diffstat (limited to 'spill.c')
-rw-r--r--spill.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/spill.c b/spill.c
index 72f8106..8684993 100644
--- a/spill.c
+++ b/spill.c
@@ -94,8 +94,7 @@ fillcost(Fn *fn)
tmpuse(p->to, 0, 0, fn);
for (a=0; a<p->narg; a++) {
n = p->blk[a]->loop;
- assert(b->npred==p->narg &&
- "wrong cfg");
+ assert(b->npred==p->narg && "wrong cfg");
n /= b->npred;
tmpuse(p->arg[a], 1, n, fn);
}
@@ -146,11 +145,10 @@ slot(int t)
{
int s;
- if (t < Tmp0)
- diag("spill: cannot spill register");
+ assert(t >= Tmp0 && "cannot spill register");
s = tmp[t].slot;
if (s == -1) {
- assert(NAlign == 3);
+ /* specific to NAlign == 3 */
/* nice logic to pack stack slots
* on demand, there can be only
* one hole and slot4 points to it
@@ -491,7 +489,7 @@ spill(Fn *fn)
}
/* align the locals to a 16 byte boundary */
- assert(NAlign == 3);
+ /* specific to NAlign == 3 */
slot8 += slot8 & 3;
fn->slot += slot8;