qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit ecaad8119f77601fec4cab61c510d697ec5bb939
parent 3ef269315409c698a1e0f689722136dcd974fe36
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Thu,  1 Oct 2015 13:20:21 -0400

fix a bug for structure arguments in regs

Diffstat:
Mlisc/isel.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 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}};