summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-10-01 18:21:38 -0400
committerFreya Murphy <freya@freyacat.org>2024-10-01 18:21:38 -0400
commit16ebc059d92ff1f59c97a4d8cc877fd5554ae652 (patch)
tree4ad189d74537d8f2b18aedfb4740f344ee5e0391
parentmake test script look nicer on failure (diff)
downloadmips-16ebc059d92ff1f59c97a4d8cc877fd5554ae652.tar.gz
mips-16ebc059d92ff1f59c97a4d8cc877fd5554ae652.tar.bz2
mips-16ebc059d92ff1f59c97a4d8cc877fd5554ae652.zip
dont hardcode RA in JALR
-rw-r--r--include/mips.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mips.h b/include/mips.h
index cf17935..9a1b204 100644
--- a/include/mips.h
+++ b/include/mips.h
@@ -304,7 +304,8 @@ MIPS_INS(JAL, .op = MIPS_OP_JAL)
/* JALR - jump and link register */
#define MIPS_FUNCT_JALR 0b001001
-MIPS_INS(JALR, .op = MIPS_OP_SPECIAL, .funct = MIPS_FUNCT_JALR)
+MIPS_INS(JALR, .rd = MIPS_REG_RA, .op = MIPS_OP_SPECIAL,
+ .funct = MIPS_FUNCT_JALR)
/* JALX - jump and link exchange */
#define MIPS_OP_JALX 0b011101