fix(cpu): purposely overflow when calculating PC during branch
This commit is contained in:
parent
cc7e42efd8
commit
52e367d24a
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue