summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/microops/regop.isa
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-04-19 03:42:41 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-04-19 03:42:41 -0700
commit038225a6cae8ce1d8fc5246440b7f697eeb3c90a (patch)
tree6130b37812c98e1c7413acee8a8ca45b5469d0dc /src/arch/x86/isa/microops/regop.isa
parent3b1b21cb159c0368d50aa0dedd39a8874d91e735 (diff)
downloadgem5-038225a6cae8ce1d8fc5246440b7f697eeb3c90a.tar.xz
X86: Implement far jmp.
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"