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.
This commit is contained in:
parent
7bbd361083
commit
6dc9646f5e
1 changed files with 2 additions and 11 deletions
13
lisc/emit.c
13
lisc/emit.c
|
@ -94,14 +94,6 @@ eref(Ref r, Fn *fn, FILE *f)
|
||||||
static void
|
static void
|
||||||
emem(Ref r, Fn *fn, FILE *f)
|
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)) {
|
switch (rtype(r)) {
|
||||||
default:
|
default:
|
||||||
diag("emit: invalid memory reference");
|
diag("emit: invalid memory reference");
|
||||||
|
@ -113,9 +105,8 @@ emem(Ref r, Fn *fn, FILE *f)
|
||||||
break;
|
break;
|
||||||
case RTmp:
|
case RTmp:
|
||||||
assert(r.val < EAX);
|
assert(r.val < EAX);
|
||||||
fprintf(f, "(");
|
fprintf(f, "(%%%s)", rtoa(r.val));
|
||||||
eref(r, fn, f);
|
break;
|
||||||
fprintf(f, ")");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue