summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/decoder
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2008-10-12 15:31:28 -0700
committerGabe Black <gblack@eecs.umich.edu>2008-10-12 15:31:28 -0700
commita76c4b8ca101c0c89659a536da6271d4116850de (patch)
tree3dc57ad774f0bb768c58b50540a6b08a7530aec8 /src/arch/x86/isa/decoder
parentd0a43ce2b29da1640248a756dcd07f0f28561df0 (diff)
downloadgem5-a76c4b8ca101c0c89659a536da6271d4116850de.tar.xz
X86: Implement CPUID with a magical function instead of microcode.
Diffstat (limited to 'src/arch/x86/isa/decoder')
-rw-r--r--src/arch/x86/isa/decoder/two_byte_opcodes.isa11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
index 5ada6fd4f..bceb0595e 100644
--- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa
+++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
@@ -168,7 +168,7 @@
#if FULL_SYSTEM
0x05: syscall();
#else
- 0x05: SyscallInst::syscall('xc->syscall(rax)', IsSyscall);
+ 0x05: SyscallInst::syscall('xc->syscall(Rax)', IsSyscall);
#endif
0x06: clts();
//sandpile.org says (AMD) after sysret, so I might want to check
@@ -707,7 +707,14 @@
0x14: decode OPCODE_OP_BOTTOM3 {
0x0: push_fs();
0x1: pop_fs();
- 0x2: Inst::CPUID(rAd);
+ 0x2: CPUIDInst::CPUID({{
+ CpuidResult result;
+ success = doCpuid(xc->tcBase(), Rax, result);
+ Rax = result.rax;
+ Rbx = result.rbx;
+ Rcx = result.rcx;
+ Rdx = result.rdx;
+ }});
0x3: Inst::BT(Ev,Gv);
0x4: shld_Ev_Gv_Ib();
0x5: shld_Ev_Gv_rCl();