From da652b93f3dba4a06cf37421ee5741c4d1ef9944 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Fri, 24 Jul 2015 10:22:33 -0400 Subject: comment and fix if(BSET(..)) bug --- lisc/spill.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisc/spill.c b/lisc/spill.c index df8a1a3..741cc68 100644 --- 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) { /* + * 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); -- cgit 1.4.1