From 75af6d9e197f3a71fac0bac42ba55ed958822fe1 Mon Sep 17 00:00:00 2001 From: iris Date: Tue, 31 Mar 2026 15:15:01 +0200 Subject: [PATCH] Emulator weird JALR behaviour --- src/backend/core/interpreter/instructions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/core/interpreter/instructions.cpp b/src/backend/core/interpreter/instructions.cpp index 94d5033..7f3e9d3 100644 --- a/src/backend/core/interpreter/instructions.cpp +++ b/src/backend/core/interpreter/instructions.cpp @@ -602,8 +602,9 @@ void Interpreter::jal(const Instruction instr) { } void Interpreter::jalr(const Instruction instr) { + const u64 address = regs.Read(instr.rs()); regs.Write(instr.rd(), regs.nextPC); - jr(instr); + branch(true, address); } void Interpreter::jr(const Instruction instr) {