commit 6dc9646f5eced9065d4f6cfdf3979db5cfb48b56
parent 7bbd361083db3f08e173bbf384e7369ab5ffee57
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Sun, 16 Aug 2015 14:21:48 -0400
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:
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git 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;
}
}