summary refs log tree commit diff
path: root/lisc
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-07-24 10:22:33 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:29 -0400
commitda652b93f3dba4a06cf37421ee5741c4d1ef9944 (patch)
treece8d5c5ced0d0819a459e648b81163e53265fc74 /lisc
parent5ac9fbd8e4ca152c7fb62e2c77f1c9ccd1d0db02 (diff)
downloadroux-da652b93f3dba4a06cf37421ee5741c4d1ef9944.tar.gz
comment and fix if(BSET(..)) bug
Diffstat (limited to 'lisc')
-rw-r--r--lisc/spill.c6
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);