View | Details | Raw Unified | Return to bug 22299
Collapse All | Expand All

(-)sysdeps/x86/cpu-features.c.orig (-4 / +5 lines)
Lines 332-338 Link Here
332
#endif
332
#endif
333
333
334
  /* Reuse dl_platform, dl_hwcap and dl_hwcap_mask for x86.  */
334
  /* Reuse dl_platform, dl_hwcap and dl_hwcap_mask for x86.  */
335
  GLRO(dl_platform) = NULL;
336
  GLRO(dl_hwcap) = 0;
335
  GLRO(dl_hwcap) = 0;
337
#if !HAVE_TUNABLES && defined SHARED
336
#if !HAVE_TUNABLES && defined SHARED
338
  /* The glibc.tune.hwcap_mask tunable is initialized already, so no need to do
337
  /* The glibc.tune.hwcap_mask tunable is initialized already, so no need to do
Lines 343-355 Link Here
343
#ifdef __x86_64__
342
#ifdef __x86_64__
344
  if (cpu_features->kind == arch_kind_intel)
343
  if (cpu_features->kind == arch_kind_intel)
345
    {
344
    {
345
      const char *platform = NULL;
346
      if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable)
346
      if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable)
347
	  && CPU_FEATURES_CPU_P (cpu_features, AVX512CD))
347
	  && CPU_FEATURES_CPU_P (cpu_features, AVX512CD))
348
	{
348
	{
349
	  if (CPU_FEATURES_CPU_P (cpu_features, AVX512ER))
349
	  if (CPU_FEATURES_CPU_P (cpu_features, AVX512ER))
350
	    {
350
	    {
351
	      if (CPU_FEATURES_CPU_P (cpu_features, AVX512PF))
351
	      if (CPU_FEATURES_CPU_P (cpu_features, AVX512PF))
352
		GLRO(dl_platform) = "xeon_phi";
352
		platform = "xeon_phi";
353
	    }
353
	    }
354
	  else
354
	  else
355
	    {
355
	    {
Lines 360-366 Link Here
360
	    }
360
	    }
361
	}
361
	}
362
362
363
      if (GLRO(dl_platform) == NULL
363
      if (platform == NULL
364
	  && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable)
364
	  && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable)
365
	  && CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
365
	  && CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
366
	  && CPU_FEATURES_CPU_P (cpu_features, BMI1)
366
	  && CPU_FEATURES_CPU_P (cpu_features, BMI1)
Lines 368-374 Link Here
368
	  && CPU_FEATURES_CPU_P (cpu_features, LZCNT)
368
	  && CPU_FEATURES_CPU_P (cpu_features, LZCNT)
369
	  && CPU_FEATURES_CPU_P (cpu_features, MOVBE)
369
	  && CPU_FEATURES_CPU_P (cpu_features, MOVBE)
370
	  && CPU_FEATURES_CPU_P (cpu_features, POPCNT))
370
	  && CPU_FEATURES_CPU_P (cpu_features, POPCNT))
371
	GLRO(dl_platform) = "haswell";
371
	platform = "haswell";
372
	if (platform) GLRO(dl_platform) = platform;
372
    }
373
    }
373
#else
374
#else
374
  if (CPU_FEATURES_CPU_P (cpu_features, SSE2))
375
  if (CPU_FEATURES_CPU_P (cpu_features, SSE2))

Return to bug 22299