attempting more serious idle skipping

This commit is contained in:
2026-05-29 14:32:07 +02:00
parent 2147195774
commit 24fb2898e9
5 changed files with 40 additions and 10 deletions
@@ -1,4 +1,5 @@
#include <Core.hpp>
#include <Scheduler.hpp>
#define check_signed_overflow(op1, op2, res) (((~((op1) ^ (op2)) & ((op1) ^ (res))) >> ((sizeof(res) * 8) - 1)) & 1)
#define check_signed_underflow(op1, op2, res) (((((op1) ^ (op2)) & ((op1) ^ (res))) >> ((sizeof(res) * 8) - 1)) & 1)
@@ -144,12 +145,13 @@ void Interpreter::branch(const bool cond, const s64 address) {
}
void Interpreter::branch_likely(const bool cond, const s64 address) {
if (cond) {
regs.delaySlot = true;
regs.nextPC = address;
} else {
if (!cond) {
regs.SetPC64(regs.nextPC);
return;
}
regs.delaySlot = true;
regs.nextPC = address;
}
void Interpreter::b(const Instruction instr, const bool cond) {