qbe

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

commit da652b93f3dba4a06cf37421ee5741c4d1ef9944
parent 5ac9fbd8e4ca152c7fb62e2c77f1c9ccd1d0db02
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Fri, 24 Jul 2015 10:22:33 -0400

comment and fix if(BSET(..)) bug

Diffstat:
Mlisc/spill.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisc/spill.c b/lisc/spill.c @@ -322,7 +322,7 @@ spill(Fn *fn) if (!req(i->to, R)) { assert(rtype(i->to)==RSym); j = i->to.val; - if (BSET(v, j)) + if (BGET(v, j)) BCLR(v, j); else v = limit(&v, NReg-1, &w); @@ -335,6 +335,10 @@ spill(Fn *fn) if (!req(i->to, R) && opdesc[i->op].commut == 0) { /* <arch> + * here we make sure that we + * will never have to compile + * say: eax = sub ebx, eax + * on a two-address machine */ BSET(w, i->to.val); BSET(v, i->to.val);