Emulate weird JALR behaviour
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user