aboutsummaryrefslogtreecommitdiff
path: root/arm64
diff options
context:
space:
mode:
authorMichael Forney <[email protected]>2019-05-08 18:29:28 -0700
committerQuentin Carbonneaux <[email protected]>2021-10-25 18:37:12 +0200
commit5f994fed4e17bd65fc3958b5a8aab577a8948b9f (patch)
tree0efd3bb4f0875da20b29d7efb16a491b5a247a8e /arm64
parentfcdef10dae54d7124aca9ccbefe53baa8e67267d (diff)
arm64: handle slots
Diffstat (limited to 'arm64')
-rw-r--r--arm64/emit.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/arm64/emit.c b/arm64/emit.c
index cd0a2b1..76588ed 100644
--- a/arm64/emit.c
+++ b/arm64/emit.c
@@ -220,8 +220,17 @@ emitf(char *s, Ins *i, E *e)
c = *s++;
assert(c == '0' || c == '1');
r = i->arg[c - '0'];
- assert(isreg(r) && "TODO emit non reg addresses");
- fprintf(e->f, "[%s]", rname(r.val, Kl));
+ switch (rtype(r)) {
+ default:
+ die("todo (arm emit): unhandled ref");
+ case RTmp:
+ assert(isreg(r));
+ fprintf(e->f, "[%s]", rname(r.val, Kl));
+ break;
+ case RSlot:
+ fprintf(e->f, "[sp, %"PRIu64"]", slot(r.val, e));
+ break;
+ }
break;
}
}