@@ -143,7 +143,7 @@ XRCORE_API u64 qpc_freq = 0;
143143XRCORE_API u64 qpc_overhead = 0 ;
144144XRCORE_API u32 qpc_counter = 0 ;
145145
146- XRCORE_API _processor_info ID;
146+ XRCORE_API processor_info ID;
147147
148148XRCORE_API u64 QPC ()
149149{
@@ -164,7 +164,7 @@ u64 __fastcall GetCLK(void)
164164void Detect ()
165165{
166166 // General CPU identification
167- if (!_cpuid (&ID))
167+ if (!query_processor_info (&ID))
168168 {
169169 // Core.Fatal ("Fatal error: can't detect CPU/FPU.");
170170 abort ();
@@ -234,43 +234,46 @@ bool g_initialize_cpu_called = false;
234234// ------------------------------------------------------------------------------------
235235void _initialize_cpu (void )
236236{
237- Msg (" * Detected CPU: %s [%s], F%d/M%d/S%d, %.2f mhz, %d-clk 'rdtsc'" , CPU::ID.model_name , CPU::ID.v_name ,
238- CPU::ID.family , CPU::ID.model , CPU::ID.stepping , float (CPU::clk_per_second / u64 (1000000 )),
239- u32 (CPU::clk_overhead));
237+ Msg (" * Detected CPU: %s [%s], F%d/M%d/S%d, %.2f mhz, %d-clk 'rdtsc'" ,
238+ CPU::ID.modelName , CPU::ID.vendor ,
239+ CPU::ID.family , CPU::ID.model , CPU::ID.stepping ,
240+ float (CPU::clk_per_second / u64 (1000000 )),
241+ u32 (CPU::clk_overhead)
242+ );
240243
241244 // DUMP_PHASE;
242245
243246 if (strstr (Core.Params , " -x86" ))
244247 {
245- CPU::ID.feature &= ~_CPU_FEATURE_MMX ;
246- CPU::ID.feature &= ~_CPU_FEATURE_3DNOW ;
247- CPU::ID.feature &= ~_CPU_FEATURE_SSE ;
248- CPU::ID.feature &= ~_CPU_FEATURE_SSE2 ;
249- CPU::ID.feature &= ~_CPU_FEATURE_SSE3 ;
250- CPU::ID.feature &= ~_CPU_FEATURE_SSSE3 ;
251- CPU::ID.feature &= ~_CPU_FEATURE_SSE4_1 ;
252- CPU::ID.feature &= ~_CPU_FEATURE_SSE4_2 ;
248+ CPU::ID.hasFeature (CpuFeature::FEATURE_MMX) ;
249+ CPU::ID.hasFeature (CpuFeature::FEATURE_3DNOW) ;
250+ CPU::ID.hasFeature (CpuFeature::FEATURE_SSE) ;
251+ CPU::ID.hasFeature (CpuFeature::FEATURE_SSE2) ;
252+ CPU::ID.hasFeature (CpuFeature::FEATURE_SSE3) ;
253+ CPU::ID.hasFeature (CpuFeature::FEATURE_SSSE3) ;
254+ CPU::ID.hasFeature (CpuFeature::FEATURE_SSE41) ;
255+ CPU::ID.hasFeature (CpuFeature::FEATURE_SSE41) ;
253256 };
254257
255258 string256 features;
256259 xr_strcpy (features, sizeof (features), " RDTSC" );
257- if (CPU::ID.feature & _CPU_FEATURE_MMX )
260+ if (CPU::ID.hasFeature (CpuFeature::FEATURE_MMX) )
258261 xr_strcat (features, " , MMX" );
259- if (CPU::ID.feature & _CPU_FEATURE_3DNOW )
262+ if (CPU::ID.hasFeature (CpuFeature::FEATURE_3DNOW) )
260263 xr_strcat (features, " , 3DNow!" );
261- if (CPU::ID.feature & _CPU_FEATURE_SSE )
264+ if (CPU::ID.hasFeature (CpuFeature::FEATURE_SSE) )
262265 xr_strcat (features, " , SSE" );
263- if (CPU::ID.feature & _CPU_FEATURE_SSE2 )
266+ if (CPU::ID.hasFeature (CpuFeature::FEATURE_SSE2) )
264267 xr_strcat (features, " , SSE2" );
265- if (CPU::ID.feature & _CPU_FEATURE_SSE3 )
268+ if (CPU::ID.hasFeature (CpuFeature::FEATURE_SSE3) )
266269 xr_strcat (features, " , SSE3" );
267- if (CPU::ID.feature & _CPU_FEATURE_SSSE3 )
270+ if (CPU::ID.hasFeature (CpuFeature::FEATURE_SSSE3) )
268271 xr_strcat (features, " , SSSE3" );
269- if (CPU::ID.feature & _CPU_FEATURE_SSE4_1 )
272+ if (CPU::ID.hasFeature (CpuFeature::FEATURE_SSE41) )
270273 xr_strcat (features, " , SSE4.1" );
271- if (CPU::ID.feature & _CPU_FEATURE_SSE4_2 )
274+ if (CPU::ID.hasFeature (CpuFeature::FEATURE_SSE42) )
272275 xr_strcat (features, " , SSE4.2" );
273- if (CPU::ID.feature & _CPU_FEATURE_HTT )
276+ if (CPU::ID.hasFeature (CpuFeature::FEATURE_HT) )
274277 xr_strcat (features, " , HTT" );
275278
276279 Msg (" * CPU features: %s" , features);
@@ -304,7 +307,7 @@ void _initialize_cpu_thread()
304307 xrDebug::OnThreadSpawn ();
305308 if (!Core.PluginMode )
306309 FPU::m24r ();
307- if (CPU::ID.feature & _CPU_FEATURE_SSE )
310+ if (CPU::ID.hasFeature (CpuFeature::FEATURE_SSE) )
308311 {
309312 // _mm_setcsr ( _mm_getcsr() | (_MM_FLUSH_ZERO_ON+_MM_DENORMALS_ZERO_ON) );
310313 _MM_SET_FLUSH_ZERO_MODE (_MM_FLUSH_ZERO_ON);
0 commit comments