X86: Sometimes CPUID depends on ecx, so pass that in.
authorGabe Black <gblack@eecs.umich.edu>
Sun, 2 May 2010 07:40:17 +0000 (00:40 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Sun, 2 May 2010 07:40:17 +0000 (00:40 -0700)
src/arch/x86/cpuid.cc
src/arch/x86/cpuid.hh
src/arch/x86/isa/decoder/two_byte_opcodes.isa

index cbd1defee0c6ae0c72e8e48c462388c3b46b1276..6b686f38a6a26ca9b4613eb6634c61a14e21a00b 100644 (file)
@@ -79,7 +79,8 @@ namespace X86ISA {
     }
 
     bool
-    doCpuid(ThreadContext * tc, uint32_t function, CpuidResult &result)
+    doCpuid(ThreadContext * tc, uint32_t function,
+            uint32_t index, CpuidResult &result)
     {
         uint16_t family = bits(function, 31, 16);
         uint16_t funcNum = bits(function, 15, 0);
index d8b013ba1e04cb57592443f3ee5503dd81487e9e..8d318181922bb319d79d154a2207b16ee228d1ef 100644 (file)
@@ -55,7 +55,8 @@ namespace X86ISA
         {}
     };
 
-    bool doCpuid(ThreadContext * tc, uint32_t function, CpuidResult &result);
+    bool doCpuid(ThreadContext * tc, uint32_t function,
+            uint32_t index, CpuidResult &result);
 } // namespace X86ISA
 
 #endif
index 288c5e5a866db21fd27201d9f9ffb3a670faef1c..4b892cda27ac340b42e9c087d4e496e2cb724a93 100644 (file)
                 0x1: pop_fs();
                 0x2: CPUIDInst::CPUID({{
                     CpuidResult result;
-                    success = doCpuid(xc->tcBase(), bits(Rax, 31, 0), result);
+                    success = doCpuid(xc->tcBase(), bits(Rax, 31, 0),
+                        bits(Rcx, 31, 0), result);
                     Rax = result.rax;
                     Rbx = result.rbx;
                     Rcx = result.rcx;