diff options
author | Arisotura <thetotalworm@gmail.com> | 2021-10-28 19:47:26 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2021-10-28 19:47:26 +0200 |
commit | bfe50e41b42383245790d31d0c12e5f65b3b7dae (patch) | |
tree | a5b5534066c648ec9914bfeb6e4cc9d43498965c /src/ARMInterpreter.cpp | |
parent | 9d82826cdb84aa5e261d6a55e42812652e6ab13f (diff) |
MCR/MRC aren't available in user mode
Diffstat (limited to 'src/ARMInterpreter.cpp')
-rw-r--r-- | src/ARMInterpreter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ARMInterpreter.cpp b/src/ARMInterpreter.cpp index 3b8408a..dfcb801 100644 --- a/src/ARMInterpreter.cpp +++ b/src/ARMInterpreter.cpp @@ -196,6 +196,9 @@ void A_MRS(ARM* cpu) void A_MCR(ARM* cpu) { + if ((cpu->CPSR & 0x1F) == 0x10) + return A_UNK(cpu); + u32 cp = (cpu->CurInstr >> 8) & 0xF; //u32 op = (cpu->CurInstr >> 21) & 0x7; u32 cn = (cpu->CurInstr >> 16) & 0xF; @@ -221,6 +224,9 @@ void A_MCR(ARM* cpu) void A_MRC(ARM* cpu) { + if ((cpu->CPSR & 0x1F) == 0x10) + return A_UNK(cpu); + u32 cp = (cpu->CurInstr >> 8) & 0xF; //u32 op = (cpu->CurInstr >> 21) & 0x7; u32 cn = (cpu->CurInstr >> 16) & 0xF; |