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

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-01-01 21:57:52 -06:00
parent cc7e42efd8
commit 52e367d24a
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[15] = cpu.fakePC() + util.u32SignExtend(24, opcode << 2);
cpu.r[15] = cpu.fakePC() +% util.u32SignExtend(24, opcode << 2);
}
}.branch;
}