summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2011-12-01 00:17:14 -0500
committerGabe Black <gblack@eecs.umich.edu>2011-12-01 00:17:14 -0500
commit93fb460faded99c640ff0d7273611932a9ebc46c (patch)
tree053ec5dbc70e6c5fa2cea30d412eeaabe90c968b /src/arch/x86
parente436d187e75c2861ed32a31d850021543c9c20fd (diff)
downloadgem5-93fb460faded99c640ff0d7273611932a9ebc46c.tar.xz
X86: Fix a bad segmentation check for the stack segment.
--HG-- extra : rebase_source : 755f4f6eae52f88ed516a1f1ac9e2565725d89c1
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/isa/microops/regop.isa11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa
index a6e0564ba..bc139a609 100644
--- a/src/arch/x86/isa/microops/regop.isa
+++ b/src/arch/x86/isa/microops/regop.isa
@@ -1335,16 +1335,15 @@ let {{
if (selector.si || selector.ti) {
if (!desc.p) {
fault = new StackFault(selector);
- }
- } else {
- if ((m5reg.submode != SixtyFourBitMode ||
- m5reg.cpl == 3) ||
- !(desc.s == 1 &&
- desc.type.codeOrData == 0 && desc.type.w) ||
+ } else if (!(desc.s == 1 && desc.type.codeOrData == 0 &&
+ desc.type.w) ||
(desc.dpl != m5reg.cpl) ||
(selector.rpl != m5reg.cpl)) {
fault = new GeneralProtection(selector);
}
+ } else if (m5reg.submode != SixtyFourBitMode ||
+ m5reg.cpl == 3) {
+ fault = new GeneralProtection(selector);
}
break;
case SegIretCheck: