summary refs log tree commit diff
path: root/lisc
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-07-24 09:32:17 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:29 -0400
commitdf0836e47565d99632e67f9b9fb62dec52a5b73a (patch)
treefb4c33cd536595f3d5790efd71d94d8d02ba90ff /lisc
parent2981a267f406fb03142f149a0f0e6608917cd123 (diff)
downloadroux-df0836e47565d99632e67f9b9fb62dec52a5b73a.tar.gz
isel logic was moved to spill
Diffstat (limited to 'lisc')
-rw-r--r--lisc/isel.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/lisc/isel.c b/lisc/isel.c
index 60cc2d5..fa01fce 100644
--- a/lisc/isel.c
+++ b/lisc/isel.c
@@ -2,11 +2,6 @@
 
 /* For x86_64, we have to:
  *
- * - add dummy uses for the second argument
- *   after non-commutative arithmetic
- *   operations (this prevents the reg.
- *   allocator to get 'eax = sub ebx eax')
- *
  * - check that constants are used only in
  *   places allowed by the machine
  *
@@ -62,9 +57,7 @@ sel(Ins *i, Fn *fn)
 		break;
 	case OAdd:
 	case OSub:
-		if (!opdesc[i->op].commut
-		&& rtype(i->arg[1]) != RConst)
-			emit(OCopy, R, i->arg[1], R);
+	case OCopy:
 		emit(i->op, i->to, i->arg[0], i->arg[1]);
 		break;
 	default: