[Bug dynamic-link/24080] New: Definition of "haswell" platform is inconsistent with GCC

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug dynamic-link/24080] New: Definition of "haswell" platform is inconsistent with GCC

glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=24080

            Bug ID: 24080
           Summary: Definition of "haswell" platform is inconsistent with
                    GCC
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---

"haswell" is currently defined as:

      if (platform == NULL
          && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable)
          && CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
          && CPU_FEATURES_CPU_P (cpu_features, BMI1)
          && CPU_FEATURES_CPU_P (cpu_features, BMI2)
          && CPU_FEATURES_CPU_P (cpu_features, LZCNT)
          && CPU_FEATURES_CPU_P (cpu_features, MOVBE)
          && CPU_FEATURES_CPU_P (cpu_features, POPCNT))
        platform = "haswell";

XSAVE, FXSR, MMX, SSE2 are probably implied.

On the GCC side, -march=haswell also has AES, RDRND, PCLMUL, XSAVEOPT, SSE3,
SSE4_1, SSE4_2, SSSE3, HLE, F16C, FSGSBASE, CMPXCHG16B.

I think the glibc and GCC definitions need to be consistent.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug dynamic-link/24080] Definition of "haswell" platform is inconsistent with GCC

glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=24080

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
IMHO adding "haswell" was a mistake (with this particular name).  Do we really
want to have gazillions of $arch directories to be searched, and in what
particular order if an "exact match" (define that!) is not found?  That's
especially difficult with Intels segmentation of SKUs where there's not
a clear ordering of architectures is possible if an exact match is not found.

I agree that "haswell" suggests you can put in -march=haswell binaries
(which you can't as you point out).

The directory should have been named avx2_fma_bmi12_lzcnt_movbe_popcnt.

Or rather binaries/libraries should use ifunc relocations because x86 is a
mess.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug dynamic-link/24080] Definition of "haswell" platform is inconsistent with GCC

Sourceware - glibc-bugs mailing list
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=24080

Paul Menzel <pmenzel+sourceware.org-bugzilla at molgen dot mpg.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pmenzel+sourceware.org-bugz
                   |                            |illa at molgen dot mpg.de

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug dynamic-link/24080] Definition of "haswell" platform is inconsistent with GCC

Sourceware - glibc-bugs mailing list
In reply to this post by glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=24080

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Somewhat relevant discussion:
<https://sourceware.org/pipermail/libc-alpha/2020-May/113757.html>

Fixes to "haswell" (under whatever name) would probably come under that new
umbrella, with the existing selection remaining unchanged (until it is
deprecated and then removed).

--
You are receiving this mail because:
You are on the CC list for the bug.