diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-02-25 10:18:06 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-02-25 10:18:06 -0800 |
commit | 710b43dfbdbbaf0588d182ce0bc82a0b7db0b550 (patch) | |
tree | 7e9e705cec9ed869f38a05dc70e7d47f981fe895 /src/arch/x86 | |
parent | 1cedc748d413513c1bb98a454cc035f35b30f0f9 (diff) | |
download | gem5-710b43dfbdbbaf0588d182ce0bc82a0b7db0b550.tar.xz |
X86: Implement inUserMode for x86.
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/utility.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/x86/utility.hh b/src/arch/x86/utility.hh index 477a76e0b..6f0812a6a 100644 --- a/src/arch/x86/utility.hh +++ b/src/arch/x86/utility.hh @@ -93,7 +93,12 @@ namespace X86ISA static inline bool inUserMode(ThreadContext *tc) { - return false; +#if FULL_SYSTEM + HandyM5Reg m5reg = tc->readMiscRegNoEffect(MISCREG_M5_REG); + return m5reg.cpl == 3; +#else + return true; +#endif } inline bool isCallerSaveIntegerRegister(unsigned int reg) { |