From de6eba02885fe12af1b28bb87433310363fac20a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 26 Mar 2015 09:21:24 -0400 Subject: dyncom: Migrate InAPrivilegedMode to armsupp It's a generic helper function, so it should be here anyway. --- src/core/arm/interpreter/armsupp.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/arm/interpreter/armsupp.cpp') diff --git a/src/core/arm/interpreter/armsupp.cpp b/src/core/arm/interpreter/armsupp.cpp index aca2bfbb..f826ccb2 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); +} -- cgit v1.2.3