ntdll: Report rdtsc processor feature if supported.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48386 Signed-off-by: Paul Gofman <gofmanp@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9689d07740
commit
fc8e9bac5f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue