File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -439,25 +439,33 @@ void GetSysInfo()
439439
440440void SetPOPCNT ()
441441 {
442+ #ifndef WINDOWS
443+ POPCNT = & __builtin_popcountll ;
444+
445+ Send ("Using GCC builtin POPCNT\n" );
446+
447+ #else
442448 int CPUInfo [4 ] = {-1 };
443449 __cpuid (CPUInfo , 0x00000001 );
444450 HasPopcnt = (CPUInfo [2 ] >> 23 ) & 1 ;
445451 if (HasPopcnt )
446452 {
447453 POPCNT = & PopcntHard ;
448- Send ("Hardware POPCNT supported\n\n" );
454+
455+ Send ("Hardware POPCNT supported\n" );
449456
450457#ifdef Log
451458 if (WriteLog )
452459 {
453460 log_file = fopen (log_filename , "a" );
454- fprintf (log_file , "Hardware POPCNT supported\n\n " );
461+ fprintf (log_file , "Hardware POPCNT supported\n" );
455462 close_log ();
456463 }
457464#endif
458465 }
459466 else
460467 POPCNT = & PopcntEmul ;
468+ #endif
461469 }
462470
463471#ifdef Log
You can’t perform that action at this time.
0 commit comments