projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cedc74
)
X86: Implement inUserMode for x86.
author
Gabe Black
<gblack@eecs.umich.edu>
Wed, 25 Feb 2009 18:18:06 +0000
(10:18 -0800)
committer
Gabe Black
<gblack@eecs.umich.edu>
Wed, 25 Feb 2009 18:18:06 +0000
(10:18 -0800)
src/arch/x86/utility.hh
patch
|
blob
|
history
diff --git
a/src/arch/x86/utility.hh
b/src/arch/x86/utility.hh
index 477a76e0b0febd723510c158b83043e4f947794f..6f0812a6ad2073ce9517770c4722147e45213ffa 100644
(file)
--- 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) {