From 6dc9646f5eced9065d4f6cfdf3979db5cfb48b56 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Sun, 16 Aug 2015 14:21:48 -0400 Subject: 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. --- lisc/emit.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'lisc') 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; } } -- cgit 1.4.1