From 16ebc059d92ff1f59c97a4d8cc877fd5554ae652 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 1 Oct 2024 18:21:38 -0400 Subject: [PATCH] dont hardcode RA in JALR --- include/mips.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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