ntdll: Report 3dnow and sse features if the processor supports them.

Hans Leidekker hans at codeweavers.com
Mon Jul 9 04:07:05 CDT 2012


---
 dlls/ntdll/nt.c |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index b90672b..6d6e0b0 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -920,9 +920,9 @@ void fill_cpu_info(void)
 #else
 #error Unknown CPU
 #endif
-    cached_sci.Revision   	= 0;
-    cached_sci.Reserved         = 0;
-    cached_sci.FeatureSet       = 0x1fff; /* FIXME: set some sensible defaults out of ProcessFeatures[] */
+    cached_sci.Revision   = 0;
+    cached_sci.Reserved   = 0;
+    cached_sci.FeatureSet = 0x1fff;
 
     NtCurrentTeb()->Peb->NumberOfProcessors = 1;
 
@@ -1049,13 +1049,22 @@ void fill_cpu_info(void)
                 if (strstr(value, "tsc"))
                     user_shared_data->ProcessorFeatures[PF_RDTSC_INSTRUCTION_AVAILABLE] = TRUE;
                 if (strstr(value, "3dnow"))
+                {
                     user_shared_data->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] = TRUE;
+                    cached_sci.FeatureSet |= CPU_FEATURE_3DNOW;
+                }
                 /* This will also catch sse2, but we have sse itself
                  * if we have sse2, so no problem */
                 if (strstr(value, "sse"))
+                {
                     user_shared_data->ProcessorFeatures[PF_XMMI_INSTRUCTIONS_AVAILABLE] = TRUE;
+                    cached_sci.FeatureSet |= CPU_FEATURE_SSE;
+                }
                 if (strstr(value, "sse2"))
+                {
                     user_shared_data->ProcessorFeatures[PF_XMMI64_INSTRUCTIONS_AVAILABLE] = TRUE;
+                    cached_sci.FeatureSet |= CPU_FEATURE_SSE2;
+                }
                 if (strstr(value, "pni"))
                     user_shared_data->ProcessorFeatures[PF_SSE3_INSTRUCTIONS_AVAILABLE] = TRUE;
                 if (strstr(value, "pae"))
-- 
1.7.10.4







More information about the wine-patches mailing list