summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/microops/regop.isa
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/isa/microops/regop.isa')
-rw-r--r--src/arch/x86/isa/microops/regop.isa7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa
index 35227a4fb..6935c780d 100644
--- a/src/arch/x86/isa/microops/regop.isa
+++ b/src/arch/x86/isa/microops/regop.isa
@@ -1102,7 +1102,12 @@ let {{
case SegNoCheck:
break;
case SegCSCheck:
- panic("CS checks for far calls/jumps not implemented.\\n");
+ // Make sure it's the right type
+ if (desc.s == 0 || desc.type.codeOrData != 1) {
+ fault = new GeneralProtection(0);
+ } else if (m5reg.cpl != desc.dpl) {
+ fault = new GeneralProtection(0);
+ }
break;
case SegCallGateCheck:
panic("CS checks for far calls/jumps through call gates"