diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-08-16 14:21:48 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:31 -0400 |
commit | 6dc9646f5eced9065d4f6cfdf3979db5cfb48b56 (patch) | |
tree | 3afd6b8e8f1315e024758a0358007df4aa6d1d5a /lisc | |
parent | 7bbd361083db3f08e173bbf384e7369ab5ffee57 (diff) | |
download | roux-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.c | 13 |
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; } } |