commit 50452b88e98488875c11995902e9212ddd0f8414
parent 96f16f958a7f8a5be0e68e22cabc97650b894728
Author: Quentin Carbonneaux <quentin@c9x.me>
Date: Tue, 9 May 2023 12:39:51 +0200
fix sub-word returns on arm64_apple
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arm64/abi.c b/arm64/abi.c
@@ -800,8 +800,8 @@ arm64_abi(Fn *fn)
}
/* abi0 for apple target; introduces
- * necessery sign extension for arg
- * passing & returns
+ * necessary sign extensions in calls
+ * and returns
*/
void
apple_extsb(Fn *fn)
@@ -819,6 +819,7 @@ apple_extsb(Fn *fn)
op = Oextsb + (j - Jretsb);
emit(op, Kw, r, b->jmp.arg, R);
b->jmp.arg = r;
+ b->jmp.type = Jretw;
}
for (i=&b->ins[b->nins]; i>b->ins;) {
emiti(*--i);
@@ -845,7 +846,7 @@ apple_extsb(Fn *fn)
}
if (debug['A']) {
- fprintf(stderr, "\n> After apple_extsb:\n");
+ fprintf(stderr, "\n> After Apple pre-ABI:\n");
printfn(fn, stderr);
}
}