PowerPC: Set SRR1 correctly for program exceptions

This commit is contained in:
JosJuice
2021-08-16 17:22:12 +02:00
parent 4541abd1c0
commit 83c6df1965
10 changed files with 40 additions and 23 deletions

View File

@@ -483,8 +483,8 @@ void CheckExceptions()
else if (exceptions & EXCEPTION_PROGRAM)
{
SRR0 = PC;
// say that it's a trap exception
SRR1 = (MSR.Hex & 0x87C0FFFF) | 0x20000;
// SRR1 was partially set by GenerateProgramException, so bitwise or is used here
SRR1 |= MSR.Hex & 0x87C0FFFF;
MSR.LE = MSR.ILE;
MSR.Hex &= ~0x04EF36;
PC = NPC = 0x00000700;