diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-10-01 13:20:21 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-10-01 13:20:21 -0400 |
commit | ecaad8119f77601fec4cab61c510d697ec5bb939 (patch) | |
tree | 4f4d285ffaa84fae37de509216ba0ad78b15cc58 | |
parent | 3ef269315409c698a1e0f689722136dcd974fe36 (diff) | |
download | roux-ecaad8119f77601fec4cab61c510d697ec5bb939.tar.gz |
fix a bug for structure arguments in regs
-rw-r--r-- | lisc/isel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisc/isel.c b/lisc/isel.c index 9767a7a..09af1d1 100644 --- a/lisc/isel.c +++ b/lisc/isel.c @@ -605,9 +605,10 @@ selpar(Fn *fn, Ins *i0, Ins *i1) for (i=i0, a=ac; i<i1; i++, a++) { if (i->op != OParc || a->inmem) continue; - for (al=0; a->align >> (al+2); al++) /* careful here, this is because base alloc is aligned at 4 */ + assert(NAlign == 3); + for (al=0; a->align >> (al+2); al++) ; - r1 = newtmp(fn); + r1 = i->to; r = TMP(a->rty[0]); r2 = newcon(a->size, fn); *curi++ = (Ins){OAlloc+al, 1, r1, {r2}}; |