diff options
Diffstat (limited to 'ARMInterpreter.cpp')
-rw-r--r-- | ARMInterpreter.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ARMInterpreter.cpp b/ARMInterpreter.cpp index f486d88..6bed690 100644 --- a/ARMInterpreter.cpp +++ b/ARMInterpreter.cpp @@ -67,11 +67,14 @@ s32 A_MSR_IMM(ARM* cpu) u32 oldpsr = *psr; u32 mask = 0; - if (cpu->CurInstr & (1<<16)) mask |= 0x000000DF; + if (cpu->CurInstr & (1<<16)) mask |= 0x000000FF; if (cpu->CurInstr & (1<<17)) mask |= 0x0000FF00; if (cpu->CurInstr & (1<<18)) mask |= 0x00FF0000; if (cpu->CurInstr & (1<<19)) mask |= 0xFF000000; + if (!(cpu->CurInstr & (1<<22))) + mask &= 0xFFFFFFDF; + if ((cpu->CPSR & 0x1F) == 0x10) mask &= 0xFFFFFF00; u32 val = ROR((cpu->CurInstr & 0xFF), ((cpu->CurInstr >> 7) & 0x1E)); |