qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 5f994fed4e17bd65fc3958b5a8aab577a8948b9f
parent fcdef10dae54d7124aca9ccbefe53baa8e67267d
Author: Michael Forney <mforney@mforney.org>
Date:   Wed,  8 May 2019 18:29:28 -0700

arm64: handle slots

Diffstat:
Marm64/emit.c | 13+++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git 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; } }