summary refs log tree commit diff
path: root/lisc
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-08-16 14:21:48 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:31 -0400
commit6dc9646f5eced9065d4f6cfdf3979db5cfb48b56 (patch)
tree3afd6b8e8f1315e024758a0358007df4aa6d1d5a /lisc
parent7bbd361083db3f08e173bbf384e7369ab5ffee57 (diff)
downloadroux-6dc9646f5eced9065d4f6cfdf3979db5cfb48b56.tar.gz
remove obsolete comment about MEM
It turned out to be not so useful to have a MEM
type for references.  Instead I used an OAddr
instruction that translates simply to a lea.
Diffstat (limited to 'lisc')
-rw-r--r--lisc/emit.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/lisc/emit.c b/lisc/emit.c
index 2f96c3c..9d59890 100644
--- a/lisc/emit.c
+++ b/lisc/emit.c
@@ -94,14 +94,6 @@ eref(Ref r, Fn *fn, FILE *f)
 static void
 emem(Ref r, Fn *fn, FILE *f)
 {
-	/* this function is now a hack
-	 * when full memory references
-	 * are supported, constants and
-	 * temporaries will not have
-	 * multiple meanings as they do
-	 * now
-	 */
-
 	switch (rtype(r)) {
 	default:
 		diag("emit: invalid memory reference");
@@ -113,9 +105,8 @@ emem(Ref r, Fn *fn, FILE *f)
 		break;
 	case RTmp:
 		assert(r.val < EAX);
-		fprintf(f, "(");
-		eref(r, fn, f);
-		fprintf(f, ")");
+		fprintf(f, "(%%%s)", rtoa(r.val));
+		break;
 	}
 }