ref: e391b7ec8c0dc746a70725f3fc598def0419d1e6
parent: 6c7d0aeb7d937a3dcf924f1ef2952ee6c7aa9eb3
author: Jacob Moody <moody@posixcafe.org>
date: Mon May 20 20:24:50 EDT 2024
ja: add "CALL" and implicit use of R1 in "JAL"
--- a/sys/src/cmd/ja/a.y
+++ b/sys/src/cmd/ja/a.y
@@ -115,6 +115,14 @@
outcode($1, &nullgen, NREG, &nullgen);
}
+| LCALL addr
+ {
+ outcode($1, &nullgen, REGLINK, &$2);
+ }
+| LCALL rel
+ {
+ outcode($1, &nullgen, REGLINK, &$2);
+ }
| LCALL sreg ',' addr
{
outcode($1, &nullgen, $2, &$4);
--- a/sys/src/cmd/ja/lex.c
+++ b/sys/src/cmd/ja/lex.c
@@ -300,6 +300,7 @@
"JAL", LCALL, AJAL,
"JALR", LCALL, AJAL,
+ "CALL", LCALL, AJAL,
"MOVB", LMOVB, AMOVB,
"MOVH", LMOVB, AMOVH,