summaryrefslogtreecommitdiff
path: root/src/arch/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/alpha')
-rw-r--r--src/arch/alpha/utility.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/alpha/utility.hh b/src/arch/alpha/utility.hh
index cb86c7e9e..100736555 100644
--- a/src/arch/alpha/utility.hh
+++ b/src/arch/alpha/utility.hh
@@ -42,6 +42,12 @@
namespace AlphaISA
{
+ static inline bool
+ inUserMode(ThreadContext *tc)
+ {
+ return (tc->readMiscReg(AlphaISA::IPR_DTB_CM) & 0x18) != 0;
+ }
+
static inline ExtMachInst
makeExtMI(MachInst inst, Addr pc) {
#if FULL_SYSTEM