diff options
Diffstat (limited to 'src/arch/sparc/utility.hh')
-rw-r--r-- | src/arch/sparc/utility.hh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/arch/sparc/utility.hh b/src/arch/sparc/utility.hh index ee94ef29a..b8e3b3f0e 100644 --- a/src/arch/sparc/utility.hh +++ b/src/arch/sparc/utility.hh @@ -58,8 +58,9 @@ uint64_t getArgument(ThreadContext *tc, int &number, uint16_t size, bool fp); static inline bool inUserMode(ThreadContext *tc) { - return !((tc->readMiscRegNoEffect(MISCREG_PSTATE) & (1 << 2)) || - (tc->readMiscRegNoEffect(MISCREG_HPSTATE) & (1 << 2))); + PSTATE pstate = tc->readMiscRegNoEffect(MISCREG_PSTATE); + HPSTATE hpstate = tc->readMiscRegNoEffect(MISCREG_HPSTATE); + return !(pstate.priv || hpstate.hpriv); } /** |