VERY experimental Nintendo Switch 2 emulator
C++
dyncom: Migrate InAPrivilegedMode to armsupp
Lioncashde6eba02885f
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cppindex 2765cb36e3..1fc342d029 100644--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp@@ -3690,10 +3690,6 @@ static int clz(unsigned int x) {return n;}-static bool InAPrivilegedMode(ARMul_State* core) {- return (core->Mode != USER32MODE);-}-unsigned InterpreterMainLoop(ARMul_State* state) {Common::Profiling::ScopeTimer timer_execute(profile_execute);diff --git a/src/core/arm/interpreter/armsupp.cpp b/src/core/arm/interpreter/armsupp.cppindex aca2bfbbd5..f826ccb2df 100644--- a/src/core/arm/interpreter/armsupp.cpp+++ b/src/core/arm/interpreter/armsupp.cpp@@ -207,3 +207,9 @@ bool InBigEndianMode(ARMul_State* cpu){return (cpu->Cpsr & (1 << 9)) != 0;}++// Whether or not the given CPU is in a mode other than user mode.+bool InAPrivilegedMode(ARMul_State* cpu)+{+ return (cpu->Mode != USER32MODE);+}diff --git a/src/core/arm/skyeye_common/armdefs.h b/src/core/arm/skyeye_common/armdefs.hindex c1a19fecc4..633649d3ec 100644--- a/src/core/arm/skyeye_common/armdefs.h+++ b/src/core/arm/skyeye_common/armdefs.h@@ -357,3 +357,4 @@ extern u32 ARMul_SignedSatQ(s32, u8, bool*);extern u32 ARMul_UnsignedSatQ(s32, u8, bool*);extern bool InBigEndianMode(ARMul_State*);+extern bool InAPrivilegedMode(ARMul_State*);