Emulate weird JALR behaviour

This commit is contained in:
2026-03-31 15:15:01 +02:00
parent 4b4c32f4b1
commit c1a705e864
@@ -602,8 +602,9 @@ void Interpreter::jal(const Instruction instr) {
} }
void Interpreter::jalr(const Instruction instr) { void Interpreter::jalr(const Instruction instr) {
const u64 address = regs.Read<s64>(instr.rs());
regs.Write(instr.rd(), regs.nextPC); regs.Write(instr.rd(), regs.nextPC);
jr(instr); branch(true, address);
} }
void Interpreter::jr(const Instruction instr) { void Interpreter::jr(const Instruction instr) {