Fix branch likely setting branch flag unconditionally (instead, should only be set if the condition is true)

This commit is contained in:
Simone
2023-03-13 10:49:12 +01:00
committed by GitHub
parent 8ac5386fd2
commit 8b29b442ca
2 changed files with 3 additions and 2 deletions

3
.gitignore vendored
View File

@@ -16,4 +16,5 @@ log.txt
.vs/
CMakeSettings.json
out/
settings.json
settings.json
.vscode/

View File

@@ -159,8 +159,8 @@ void Interpreter::branch(bool cond, s64 address) {
}
void Interpreter::branch_likely(bool cond, s64 address) {
regs.delaySlot = true;
if (cond) {
regs.delaySlot = true;
regs.nextPC = address;
} else {
regs.SetPC64(regs.nextPC);