diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-02-25 10:17:54 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-02-25 10:17:54 -0800 |
commit | eec3f49a57aca83e492e72b9cf55a8c6c6ebae73 (patch) | |
tree | 18d1c232a86f0750fab461211c45533035dc79ba /src/arch/x86/isa/decoder | |
parent | 6325245e3ea7fae6609d0e9854c5ee7279140c02 (diff) | |
download | gem5-eec3f49a57aca83e492e72b9cf55a8c6c6ebae73.tar.xz |
X86: Implement the sysret instruction in long mode.
Diffstat (limited to 'src/arch/x86/isa/decoder')
-rw-r--r-- | src/arch/x86/isa/decoder/two_byte_opcodes.isa | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa index 887b5bb14..fa49c55d3 100644 --- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa @@ -265,9 +265,15 @@ 0x05: SyscallInst::syscall('xc->syscall(Rax)', IsSyscall); #endif 0x06: clts(); - //sandpile.org says (AMD) after sysret, so I might want to check - //if that means amd64 or AMD machines - 0x07: loadall_or_sysret(); + 0x07: decode MODE_SUBMODE { + 0x0: decode OPSIZE { + // Return to 64 bit mode. + 0x8: Inst::SYSRET_TO_64(); + // Return to compatibility mode. + default: Inst::SYSRET_TO_COMPAT(); + } + default: Inst::SYSRET_NON_64(); + } } 0x01: decode OPCODE_OP_BOTTOM3 { 0x0: invd(); |