summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2008-10-12 22:24:06 -0700
committerGabe Black <gblack@eecs.umich.edu>2008-10-12 22:24:06 -0700
commitf813a4be4954bfedb95747b4635b38b1a13ee8a6 (patch)
tree424cc7190a1c139cfae62eba30017c1c2244344b /src/arch
parent961b40cdb537382f6463479e3707e7d04a223f38 (diff)
downloadgem5-f813a4be4954bfedb95747b4635b38b1a13ee8a6.tar.xz
X86: Make sure register microops set fault rather than returning one.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/isa/microops/regop.isa17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa
index d7d1e3063..439116145 100644
--- a/src/arch/x86/isa/microops/regop.isa
+++ b/src/arch/x86/isa/microops/regop.isa
@@ -1052,14 +1052,14 @@ let {{
break;
case SegIntGateCheck:
if (desc.dpl < m5reg.cpl) {
- return new GeneralProtection((uint16_t)selector);
+ fault = new GeneralProtection((uint16_t)selector);
}
break;
case SegSSCheck:
if (selector.si || selector.ti) {
if (!desc.p) {
//FIXME This needs to also push the selector.
- return new StackFault;
+ fault = new StackFault;
}
} else {
if ((m5reg.submode != SixtyFourBitMode ||
@@ -1068,7 +1068,7 @@ let {{
desc.type.codeOrData == 0 && desc.type.w) ||
(desc.dpl != m5reg.cpl) ||
(selector.rpl != m5reg.cpl)) {
- return new GeneralProtection(psrc1 & 0xFFFF);
+ fault = new GeneralProtection(psrc1 & 0xFFFF);
}
}
break;
@@ -1078,16 +1078,17 @@ let {{
(selector.rpl < m5reg.cpl) ||
!(desc.s == 1 && desc.type.codeOrData == 1) ||
(!desc.type.c && desc.dpl != selector.rpl) ||
- (desc.type.c && desc.dpl > selector.rpl))
- return new GeneralProtection(psrc1 & 0xFFFF);
- if (!desc.p)
- return new SegmentNotPresent;
+ (desc.type.c && desc.dpl > selector.rpl)) {
+ fault = new GeneralProtection(psrc1 & 0xFFFF);
+ } else if (!desc.p) {
+ fault = new SegmentNotPresent;
+ }
break;
}
case SegIntCSCheck:
if (m5reg.mode == LongMode) {
if (desc.l != 1 || desc.d != 0) {
- return new GeneralProtection(selector);
+ fault = new GeneralProtection(selector);
}
} else {
panic("Interrupt CS checks not implemented "