diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-07-24 10:22:33 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:29 -0400 |
commit | da652b93f3dba4a06cf37421ee5741c4d1ef9944 (patch) | |
tree | ce8d5c5ced0d0819a459e648b81163e53265fc74 | |
parent | 5ac9fbd8e4ca152c7fb62e2c77f1c9ccd1d0db02 (diff) | |
download | roux-da652b93f3dba4a06cf37421ee5741c4d1ef9944.tar.gz |
comment and fix if(BSET(..)) bug
-rw-r--r-- | lisc/spill.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) { /* <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); |