The CPU is in kernel mode when EXL or ERL is on.

This would fix the User and Supervisor modes entering an exception and being unable to service it as they have no way to return to Kernel mode.
The CPU would get stuck in a coprocessor unusable exception loop servicing or exiting it.

See VR4300 user manual #6.4.1, or #6.3.5, Operating Modes.
master
Nabile Rahmani 2018-12-22 00:28:05 +01:00
parent 68f65d01b8
commit 124567fd71
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ namespace DotN64.CPU
/// </summary>
public Mode KSU
{
get => (Mode)this[ksu];
get => (EXL | ERL) ? Mode.Kernel : (Mode)this[ksu];
set => this[ksu] = (int)value;
}