Commit fc8e9bac authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ntdll: Report rdtsc processor feature if supported.

parent 9689d077
......@@ -1122,6 +1122,7 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
user_shared_data->ProcessorFeatures[PF_VIRT_FIRMWARE_ENABLED] = (regs2[2] >> 2) & 1;
user_shared_data->ProcessorFeatures[PF_NX_ENABLED] = (regs2[3] >> 20) & 1;
user_shared_data->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] = (regs2[3] >> 31) & 1;
user_shared_data->ProcessorFeatures[PF_RDTSC_INSTRUCTION_AVAILABLE] = (regs2[3] >> 27) & 1;
if (regs2[3] >> 31) info->FeatureSet |= CPU_FEATURE_3DNOW;
}
}
......@@ -1143,6 +1144,7 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
{
do_cpuid(0x80000001, regs2); /* get vendor features */
user_shared_data->ProcessorFeatures[PF_NX_ENABLED] = (regs2[3] >> 20) & 1;
user_shared_data->ProcessorFeatures[PF_RDTSC_INSTRUCTION_AVAILABLE] = (regs2[3] >> 27) & 1;
}
}
else
......
......@@ -523,6 +523,11 @@ static void test_user_shared_data(void)
ok(user_shared_data->NumberOfPhysicalPages == sbi.MmNumberOfPhysicalPages,
"Got number of physical pages %#x, expected %#x.\n",
user_shared_data->NumberOfPhysicalPages, sbi.MmNumberOfPhysicalPages);
#if defined(__i386__) || defined(__x86_64__)
ok(user_shared_data->ProcessorFeatures[PF_RDTSC_INSTRUCTION_AVAILABLE] /* Supported since Pentium CPUs. */,
"_RDTSC not available.\n");
#endif
}
START_TEST(virtual)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment