X86: Only use %eax to select a function and look like we support sse2.
authorGabe Black <gblack@eecs.umich.edu>
Sun, 19 Apr 2009 10:11:24 +0000 (03:11 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Sun, 19 Apr 2009 10:11:24 +0000 (03:11 -0700)
src/arch/x86/cpuid.cc
src/arch/x86/isa/decoder/two_byte_opcodes.isa

index f06ba04d87deda6d95cc1cde5b1d49d26bf1f324..4ac7a5d190b8c61d6725fa2a7fe713d4bc19e548 100644 (file)
@@ -89,7 +89,7 @@ namespace X86ISA {
               case VendorAndLargestExtFunc:
                 assert(vendorStringSize >= 12);
                 result = CpuidResult(
-                        NumExtendedCpuidFuncs - 1,
+                        0x80000000 + NumExtendedCpuidFuncs - 1,
                         stringToRegister(vendorString),
                         stringToRegister(vendorString + 4),
                         stringToRegister(vendorString + 8));
@@ -149,7 +149,7 @@ namespace X86ISA {
                 break;
               case FamilyModelStepping:
                 result = CpuidResult(0x00020f51, 0000000405,
-                                     0xe3d3fbff, 0x00000001);
+                                     0xe7d3fbff, 0x00000001);
                 break;
               default:
                 return false;
index 1ee62142a2a63dd36b9762f3797ad0319e76cbbb..0f6d59f3d8b6be6c8f35b4ec496873998dcc86cb 100644 (file)
                 0x1: pop_fs();
                 0x2: CPUIDInst::CPUID({{
                     CpuidResult result;
-                    success = doCpuid(xc->tcBase(), Rax, result);
+                    success = doCpuid(xc->tcBase(), bits(Rax, 31, 0), result);
                     Rax = result.rax;
                     Rbx = result.rbx;
                     Rcx = result.rcx;