Fix branch likely setting branch flag unconditionally (instead, should only be set if the condition is true)
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -16,4 +16,5 @@ log.txt
|
|||||||
.vs/
|
.vs/
|
||||||
CMakeSettings.json
|
CMakeSettings.json
|
||||||
out/
|
out/
|
||||||
settings.json
|
settings.json
|
||||||
|
.vscode/
|
||||||
@@ -159,8 +159,8 @@ void Interpreter::branch(bool cond, s64 address) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Interpreter::branch_likely(bool cond, s64 address) {
|
void Interpreter::branch_likely(bool cond, s64 address) {
|
||||||
regs.delaySlot = true;
|
|
||||||
if (cond) {
|
if (cond) {
|
||||||
|
regs.delaySlot = true;
|
||||||
regs.nextPC = address;
|
regs.nextPC = address;
|
||||||
} else {
|
} else {
|
||||||
regs.SetPC64(regs.nextPC);
|
regs.SetPC64(regs.nextPC);
|
||||||
|
|||||||
Reference in New Issue
Block a user