diff options
Diffstat (limited to 'arm64')
| -rw-r--r-- | arm64/emit.c | 10 | ||||
| -rw-r--r-- | arm64/targ.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/arm64/emit.c b/arm64/emit.c index 28cd6a5..9b6cf0f 100644 --- a/arm64/emit.c +++ b/arm64/emit.c @@ -195,7 +195,7 @@ emitf(char *s, Ins *i, E *e) goto Switch; case '?': if (KBASE(k) == 0) - fputs(rname(R18, k), e->f); + fputs(rname(IP1, k), e->f); else fputs(k==Ks ? "s31" : "d31", e->f); break; @@ -346,9 +346,9 @@ fixarg(Ref *pr, int sz, E *e) if (rtype(r) == RSlot) { s = slot(r, e); if (s > sz * 4095u) { - i = &(Ins){Oaddr, Kl, TMP(IP0), {r}}; + i = &(Ins){Oaddr, Kl, TMP(IP1), {r}}; emitins(i, e); - *pr = TMP(IP0); + *pr = TMP(IP1); } } } @@ -393,7 +393,7 @@ emitins(Ins *i, E *e) if (rtype(i->to) == RSlot) { r = i->to; if (!isreg(i->arg[0])) { - i->to = TMP(R18); + i->to = TMP(IP1); emitins(i, e); i->arg[0] = i->to; } @@ -414,7 +414,7 @@ emitins(Ins *i, E *e) emitins(i, e); break; default: - assert(i->to.val != R18); + assert(i->to.val != IP1); goto Table; } break; diff --git a/arm64/targ.c b/arm64/targ.c index 232376d..4c2643a 100644 --- a/arm64/targ.c +++ b/arm64/targ.c @@ -16,7 +16,7 @@ int arm64_rclob[] = { -1 }; -#define RGLOB (BIT(FP) | BIT(SP) | BIT(R18)) +#define RGLOB (BIT(FP) | BIT(SP) | BIT(IP1) | BIT(R18)) static int arm64_memargs(int op) @@ -31,7 +31,7 @@ arm64_memargs(int op) .fpr0 = V0, \ .nfpr = NFPR, \ .rglob = RGLOB, \ - .nrglob = 3, \ + .nrglob = 4, \ .rsave = arm64_rsave, \ .nrsave = {NGPS, NFPS}, \ .retregs = arm64_retregs, \ |
