summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/microops
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-02-01 17:08:32 -0800
committerGabe Black <gblack@eecs.umich.edu>2009-02-01 17:08:32 -0800
commit923a14dde749ad6b1887ccea764439a167555772 (patch)
tree8084a71550fe2916f010f6252f3fc0e47fe0094e /src/arch/x86/isa/microops
parent2f8cec849d49d2692665aec20a1cd441e743dae7 (diff)
downloadgem5-923a14dde749ad6b1887ccea764439a167555772.tar.xz
X86: Make the fault classes handle error codes better.
Diffstat (limited to 'src/arch/x86/isa/microops')
-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 2e6160ec6..202bfc7f5 100644
--- a/src/arch/x86/isa/microops/regop.isa
+++ b/src/arch/x86/isa/microops/regop.isa
@@ -1069,7 +1069,7 @@ let {{
case SegSoftIntGateCheck:
// Check permissions.
if (desc.dpl < m5reg.cpl) {
- fault = new GeneralProtection((uint16_t)selector);
+ fault = new GeneralProtection(selector);
}
// Fall through on purpose
case SegIntGateCheck:
@@ -1082,8 +1082,7 @@ let {{
case SegSSCheck:
if (selector.si || selector.ti) {
if (!desc.p) {
- //FIXME This needs to also push the selector.
- fault = new StackFault;
+ fault = new StackFault(selector);
}
} else {
if ((m5reg.submode != SixtyFourBitMode ||
@@ -1092,7 +1091,7 @@ let {{
desc.type.codeOrData == 0 && desc.type.w) ||
(desc.dpl != m5reg.cpl) ||
(selector.rpl != m5reg.cpl)) {
- fault = new GeneralProtection(psrc1 & 0xFFFF);
+ fault = new GeneralProtection(selector);
}
}
break;
@@ -1103,9 +1102,9 @@ let {{
!(desc.s == 1 && desc.type.codeOrData == 1) ||
(!desc.type.c && desc.dpl != selector.rpl) ||
(desc.type.c && desc.dpl > selector.rpl)) {
- fault = new GeneralProtection(psrc1 & 0xFFFF);
+ fault = new GeneralProtection(selector);
} else if (!desc.p) {
- fault = new SegmentNotPresent;
+ fault = new SegmentNotPresent(selector);
}
break;
}