History

arm64: handle slots

Michael Forney committed 7 years ago

Commit 5f994fe1 parent fcdef101 file · +11 −2Browse files

Unified · Split

arm64/emit.c+11−2
@@ -220,8 +220,17 @@ emitf(char *s, Ins *i, E *e) · 219 unmodified lines
220220 c = *s++;
221221 assert(c == '0' || c == '1');
222222 r = i->arg[c - '0'];
223− assert(isreg(r) && "TODO emit non reg addresses");
224− fprintf(e->f, "[%s]", rname(r.val, Kl));
223+ switch (rtype(r)) {
224+ default:
225+ die("todo (arm emit): unhandled ref");
226+ case RTmp:
227+ assert(isreg(r));
228+ fprintf(e->f, "[%s]", rname(r.val, Kl));
229+ break;
230+ case RSlot:
231+ fprintf(e->f, "[sp, %"PRIu64"]", slot(r.val, e));
232+ break;
233+ }
225234 break;
226235 }
227236 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t