diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index bc40d4e2766..b89602cee84 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -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 diff --git a/dlls/ntdll/tests/virtual.c b/dlls/ntdll/tests/virtual.c index 683a5e7bdf6..3b0d74daeb2 100644 --- a/dlls/ntdll/tests/virtual.c +++ b/dlls/ntdll/tests/virtual.c @@ -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)