aboutsummaryrefslogtreecommitdiff
path: root/src/ARMInterpreter.cpp
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2021-10-28 19:47:26 +0200
committerArisotura <thetotalworm@gmail.com>2021-10-28 19:47:26 +0200
commitbfe50e41b42383245790d31d0c12e5f65b3b7dae (patch)
treea5b5534066c648ec9914bfeb6e4cc9d43498965c /src/ARMInterpreter.cpp
parent9d82826cdb84aa5e261d6a55e42812652e6ab13f (diff)
MCR/MRC aren't available in user mode
Diffstat (limited to 'src/ARMInterpreter.cpp')
-rw-r--r--src/ARMInterpreter.cpp6
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;