fix(cpu): purposely overflow when calculating PC during branch

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-10-21 05:11:44 -03:00
parent cb06c20864
commit d660babecd
1 changed files with 1 additions and 1 deletions

View File

@ -213,7 +213,7 @@ fn comptimeBranch(comptime L: bool) InstrFn {
cpu.r[14] = cpu.r[15] - 4; cpu.r[14] = cpu.r[15] - 4;
} }
cpu.r[15] = cpu.fakePC() + util.u32SignExtend(24, opcode << 2); cpu.r[15] = cpu.fakePC() +% util.u32SignExtend(24, opcode << 2);
} }
}.branch; }.branch;
} }