• Re: [gentoo-dev] [COMMITTED] profiles: sync cpu_flags_x86 with cpuid2cp

    From Sam James@21:1/5 to Ulrich Mueller on Sat Oct 12 07:00:02 2024
    Ulrich Mueller <ulm@gentoo.org> writes:

    On Fri, 11 Oct 2024, Sam James wrote:

    From: Paul Zander <negril.nx+gentoo@gmail.com>
    Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/38695
    Signed-off-by: Sam James <sam@gentoo.org>
    ---
    profiles/arch/amd64/use.mask | 23 +++++++++++++++++++++++
    profiles/arch/base/use.mask | 23 +++++++++++++++++++++++
    profiles/arch/x86/use.mask | 23 +++++++++++++++++++++++
    profiles/desc/cpu_flags_x86.desc | 5 +++++
    4 files changed, 74 insertions(+)

    diff --git a/profiles/arch/amd64/use.mask b/profiles/arch/amd64/use.mask
    index 445c840781e21..2a1f8b7949057 100644
    --- a/profiles/arch/amd64/use.mask
    +++ b/profiles/arch/amd64/use.mask
    @@ -157,12 +157,34 @@
    -cpu_flags_x86_aes
    -cpu_flags_x86_avx
    -cpu_flags_x86_avx2
    +-cpu_flags_x86_avx512_4fmaps
    +-cpu_flags_x86_avx512_4vnniw
    +-cpu_flags_x86_avx512_bf16
    +-cpu_flags_x86_avx512_bitalg
    +-cpu_flags_x86_avx512_fp16
    +-cpu_flags_x86_avx512_vbmi2
    +-cpu_flags_x86_avx512_vnni
    +-cpu_flags_x86_avx512_vp2intersect
    +-cpu_flags_x86_avx512_vpopcntdq
    +-cpu_flags_x86_avx512bw
    +-cpu_flags_x86_avx512cd
    +-cpu_flags_x86_avx512dq
    +-cpu_flags_x86_avx512er
    +-cpu_flags_x86_avx512f
    +-cpu_flags_x86_avx512ifma
    +-cpu_flags_x86_avx512pf
    +-cpu_flags_x86_avx512vbmi
    +-cpu_flags_x86_avx512vl
    +-cpu_flags_x86_f16c
    -cpu_flags_x86_fma3
    -cpu_flags_x86_fma4
    -cpu_flags_x86_mmx
    -cpu_flags_x86_mmxext
    -cpu_flags_x86_padlock
    +-cpu_flags_x86_pclmul
    -cpu_flags_x86_popcnt
    +-cpu_flags_x86_rdrand
    +-cpu_flags_x86_sha
    -cpu_flags_x86_sse
    -cpu_flags_x86_sse2
    -cpu_flags_x86_sse3
    @@ -170,6 +192,7 @@
    -cpu_flags_x86_sse4_2
    -cpu_flags_x86_sse4a
    -cpu_flags_x86_ssse3
    +-cpu_flags_x86_vpclmulqdq
    -cpu_flags_x86_xop

    # Robert Buchholz <rbu@gentoo.org> (2007-06-03)
    diff --git a/profiles/arch/base/use.mask b/profiles/arch/base/use.mask
    index a9616ebb25879..d511d85784005 100644
    --- a/profiles/arch/base/use.mask
    +++ b/profiles/arch/base/use.mask
    @@ -83,12 +83,34 @@ cpu_flags_x86_3dnowext
    cpu_flags_x86_aes
    cpu_flags_x86_avx
    cpu_flags_x86_avx2
    +cpu_flags_x86_avx512_4fmaps
    +cpu_flags_x86_avx512_4vnniw
    +cpu_flags_x86_avx512_bf16
    +cpu_flags_x86_avx512_bitalg
    +cpu_flags_x86_avx512_fp16
    +cpu_flags_x86_avx512_vbmi2
    +cpu_flags_x86_avx512_vnni
    +cpu_flags_x86_avx512_vp2intersect
    +cpu_flags_x86_avx512_vpopcntdq
    +cpu_flags_x86_avx512bw
    +cpu_flags_x86_avx512cd
    +cpu_flags_x86_avx512dq
    +cpu_flags_x86_avx512er
    +cpu_flags_x86_avx512f
    +cpu_flags_x86_avx512ifma
    +cpu_flags_x86_avx512pf
    +cpu_flags_x86_avx512vbmi
    +cpu_flags_x86_avx512vl
    +cpu_flags_x86_f16c
    cpu_flags_x86_fma3
    cpu_flags_x86_fma4
    cpu_flags_x86_mmx
    cpu_flags_x86_mmxext
    cpu_flags_x86_padlock
    +cpu_flags_x86_pclmul
    cpu_flags_x86_popcnt
    +cpu_flags_x86_rdrand
    +cpu_flags_x86_sha
    cpu_flags_x86_sse
    cpu_flags_x86_sse2
    cpu_flags_x86_sse3
    @@ -96,6 +118,7 @@ cpu_flags_x86_sse4_1
    cpu_flags_x86_sse4_2
    cpu_flags_x86_sse4a
    cpu_flags_x86_ssse3
    +cpu_flags_x86_vpclmulqdq
    cpu_flags_x86_xop

    # ppc arch specific USE flags
    diff --git a/profiles/arch/x86/use.mask b/profiles/arch/x86/use.mask
    index 2157622d2e3cb..a3438e1c9a159 100644
    --- a/profiles/arch/x86/use.mask
    +++ b/profiles/arch/x86/use.mask
    @@ -130,12 +130,34 @@ webengine
    -cpu_flags_x86_aes
    -cpu_flags_x86_avx
    -cpu_flags_x86_avx2
    +-cpu_flags_x86_avx512_4fmaps
    +-cpu_flags_x86_avx512_4vnniw
    +-cpu_flags_x86_avx512_bf16
    +-cpu_flags_x86_avx512_bitalg
    +-cpu_flags_x86_avx512_fp16
    +-cpu_flags_x86_avx512_vbmi2
    +-cpu_flags_x86_avx512_vnni
    +-cpu_flags_x86_avx512_vp2intersect
    +-cpu_flags_x86_avx512_vpopcntdq
    +-cpu_flags_x86_avx512bw
    +-cpu_flags_x86_avx512cd
    +-cpu_flags_x86_avx512dq
    +-cpu_flags_x86_avx512er
    +-cpu_flags_x86_avx512f
    +-cpu_flags_x86_avx512ifma
    +-cpu_flags_x86_avx512pf
    +-cpu_flags_x86_avx512vbmi
    +-cpu_flags_x86_avx512vl
    +-cpu_flags_x86_f16c
    -cpu_flags_x86_fma3
    -cpu_flags_x86_fma4
    -cpu_flags_x86_mmx
    -cpu_flags_x86_mmxext
    -cpu_flags_x86_padlock
    +-cpu_flags_x86_pclmul
    -cpu_flags_x86_popcnt
    +-cpu_flags_x86_rdrand
    +-cpu_flags_x86_sha
    -cpu_flags_x86_sse
    -cpu_flags_x86_sse2
    -cpu_flags_x86_sse3
    @@ -143,6 +165,7 @@ webengine
    -cpu_flags_x86_sse4_2
    -cpu_flags_x86_sse4a
    -cpu_flags_x86_ssse3
    +-cpu_flags_x86_vpclmulqdq
    -cpu_flags_x86_xop

    # Modular X: unmask for architectures on which they are available
    diff --git a/profiles/desc/cpu_flags_x86.desc b/profiles/desc/cpu_flags_x86.desc
    index d7dee6227a71e..6324e4a540e25 100644
    --- a/profiles/desc/cpu_flags_x86.desc
    +++ b/profiles/desc/cpu_flags_x86.desc
    @@ -19,9 +19,14 @@ avx512_vbmi2 - Use AVX-512 Vector Bit Manipulation Instructions 2
    avx512_vnni - Use vector neural network instructions for 8- and 16-bit multiply-add operations
    avx512_vp2intersect - Use AVX-512 Intersect instruction set
    avx512_vpopcntdq - Use AVX-512 Vector Population Count Doubleword and Quadword instruction set
    +avx512bw - Use AVX-512 byte- and word instructions
    +avx512cd - Use AVX-512 conflict detection instructions
    avx512dq - Use AVX-512 double- and quad-word instructions
    +avx512er - Use AVX-512 exponential and reciprocal instructions
    avx512f - Adds support for AVX-512 Foundation instructions
    avx512ifma - Use AVX-512 Integer Fused Multiply-Add instruction set
    +avx512pf - Use AVX-512 prefetch instructions
    +avx512vbmi - Use AVX-512 vector byte manipulation instructions
    avx512vl - Use AVX-512 vector-length instructions
    f16c - Adds support for F16C instruction set for converting between half-precision and single-precision floats
    fma3 - Use the Fused Multiply Add 3 instruction set ([fma] in cpuinfo)
    --

    2.47.0

    This adds 20-ish flags to use.mask but only 5 to use.desc. Why are these numbers different?

    The SHA flag, for example, isn't new, but wasn't masked before on most arches as it
    should be (in 32ee755a00526ed167ab6826eb1572b83f078558).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ulrich Mueller@21:1/5 to All on Sat Oct 12 06:50:01 2024
    On Fri, 11 Oct 2024, Sam James wrote:

    From: Paul Zander <negril.nx+gentoo@gmail.com>
    Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/38695
    Signed-off-by: Sam James <sam@gentoo.org>
    ---
    profiles/arch/amd64/use.mask | 23 +++++++++++++++++++++++
    profiles/arch/base/use.mask | 23 +++++++++++++++++++++++
    profiles/arch/x86/use.mask | 23 +++++++++++++++++++++++
    profiles/desc/cpu_flags_x86.desc | 5 +++++
    4 files changed, 74 insertions(+)

    diff --git a/profiles/arch/amd64/use.mask b/profiles/arch/amd64/use.mask index 445c840781e21..2a1f8b7949057 100644
    --- a/profiles/arch/amd64/use.mask
    +++ b/profiles/arch/amd64/use.mask
    @@ -157,12 +157,34 @@
    -cpu_flags_x86_aes
    -cpu_flags_x86_avx
    -cpu_flags_x86_avx2
    +-cpu_flags_x86_avx512_4fmaps
    +-cpu_flags_x86_avx512_4vnniw
    +-cpu_flags_x86_avx512_bf16
    +-cpu_flags_x86_avx512_bitalg
    +-cpu_flags_x86_avx512_fp16
    +-cpu_flags_x86_avx512_vbmi2
    +-cpu_flags_x86_avx512_vnni
    +-cpu_flags_x86_avx512_vp2intersect
    +-cpu_flags_x86_avx512_vpopcntdq
    +-cpu_flags_x86_avx512bw
    +-cpu_flags_x86_avx512cd
    +-cpu_flags_x86_avx512dq
    +-cpu_flags_x86_avx512er
    +-cpu_flags_x86_avx512f
    +-cpu_flags_x86_avx512ifma
    +-cpu_flags_x86_avx512pf
    +-cpu_flags_x86_avx512vbmi
    +-cpu_flags_x86_avx512vl
    +-cpu_flags_x86_f16c
    -cpu_flags_x86_fma3
    -cpu_flags_x86_fma4
    -cpu_flags_x86_mmx
    -cpu_flags_x86_mmxext
    -cpu_flags_x86_padlock
    +-cpu_flags_x86_pclmul
    -cpu_flags_x86_popcnt
    +-cpu_flags_x86_rdrand
    +-cpu_flags_x86_sha
    -cpu_flags_x86_sse
    -cpu_flags_x86_sse2
    -cpu_flags_x86_sse3
    @@ -170,6 +192,7 @@
    -cpu_flags_x86_sse4_2
    -cpu_flags_x86_sse4a
    -cpu_flags_x86_ssse3
    +-cpu_flags_x86_vpclmulqdq
    -cpu_flags_x86_xop

    # Robert Buchholz <rbu@gentoo.org> (2007-06-03)
    diff --git a/profiles/arch/base/use.mask b/profiles/arch/base/use.mask
    index a9616ebb25879..d511d85784005 100644
    --- a/profiles/arch/base/use.mask
    +++ b/profiles/arch/base/use.mask
    @@ -83,12 +83,34 @@ cpu_flags_x86_3dnowext
    cpu_flags_x86_aes
    cpu_flags_x86_avx
    cpu_flags_x86_avx2
    +cpu_flags_x86_avx512_4fmaps
    +cpu_flags_x86_avx512_4vnniw
    +cpu_flags_x86_avx512_bf16
    +cpu_flags_x86_avx512_bitalg
    +cpu_flags_x86_avx512_fp16
    +cpu_flags_x86_avx512_vbmi2
    +cpu_flags_x86_avx512_vnni
    +cpu_flags_x86_avx512_vp2intersect
    +cpu_flags_x86_avx512_vpopcntdq
    +cpu_flags_x86_avx512bw
    +cpu_flags_x86_avx512cd
    +cpu_flags_x86_avx512dq
    +cpu_flags_x86_avx512er
    +cpu_flags_x86_avx512f
    +cpu_flags_x86_avx512ifma
    +cpu_flags_x86_avx512pf
    +cpu_flags_x86_avx512vbmi
    +cpu_flags_x86_avx512vl
    +cpu_flags_x86_f16c
    cpu_flags_x86_fma3
    cpu_flags_x86_fma4
    cpu_flags_x86_mmx
    cpu_flags_x86_mmxext
    cpu_flags_x86_padlock
    +cpu_flags_x86_pclmul
    cpu_flags_x86_popcnt
    +cpu_flags_x86_rdrand
    +cpu_flags_x86_sha
    cpu_flags_x86_sse
    cpu_flags_x86_sse2
    cpu_flags_x86_sse3
    @@ -96,6 +118,7 @@ cpu_flags_x86_sse4_1
    cpu_flags_x86_sse4_2
    cpu_flags_x86_sse4a
    cpu_flags_x86_ssse3
    +cpu_flags_x86_vpclmulqdq
    cpu_flags_x86_xop

    # ppc arch specific USE flags
    diff --git a/profiles/arch/x86/use.mask b/profiles/arch/x86/use.mask
    index 2157622d2e3cb..a3438e1c9a159 100644
    --- a/profiles/arch/x86/use.mask
    +++ b/profiles/arch/x86/use.mask
    @@ -130,12 +130,34 @@ webengine
    -cpu_flags_x86_aes
    -cpu_flags_x86_avx
    -cpu_flags_x86_avx2
    +-cpu_flags_x86_avx512_4fmaps
    +-cpu_flags_x86_avx512_4vnniw
    +-cpu_flags_x86_avx512_bf16
    +-cpu_flags_x86_avx512_bitalg
    +-cpu_flags_x86_avx512_fp16
    +-cpu_flags_x86_avx512_vbmi2
    +-cpu_flags_x86_avx512_vnni
    +-cpu_flags_x86_avx512_vp2intersect
    +-cpu_flags_x86_avx512_vpopcntdq
    +-cpu_flags_x86_avx512bw
    +-cpu_flags_x86_avx512cd
    +-cpu_flags_x86_avx512dq
    +-cpu_flags_x86_avx512er
    +-cpu_flags_x86_avx512f
    +-cpu_flags_x86_avx512ifma
    +-cpu_flags_x86_avx512pf
    +-cpu_flags_x86_avx512vbmi
    +-cpu_flags_x86_avx512vl
    +-cpu_flags_x86_f16c
    -cpu_flags_x86_fma3
    -cpu_flags_x86_fma4
    -cpu_flags_x86_mmx
    -cpu_flags_x86_mmxext
    -cpu_flags_x86_padlock
    +-cpu_flags_x86_pclmul
    -cpu_flags_x86_popcnt
    +-cpu_flags_x86_rdrand
    +-cpu_flags_x86_sha
    -cpu_flags_x86_sse
    -cpu_flags_x86_sse2
    -cpu_flags_x86_sse3
    @@ -143,6 +165,7 @@ webengine
    -cpu_flags_x86_sse4_2
    -cpu_flags_x86_sse4a
    -cpu_flags_x86_ssse3
    +-cpu_flags_x86_vpclmulqdq
    -cpu_flags_x86_xop

    # Modular X: unmask for architectures on which they are available
    diff --git a/profiles/desc/cpu_flags_x86.desc b/profiles/desc/cpu_flags_x86.desc
    index d7dee6227a71e..6324e4a540e25 100644
    --- a/profiles/desc/cpu_flags_x86.desc
    +++ b/profiles/desc/cpu_flags_x86.desc
    @@ -19,9 +19,14 @@ avx512_vbmi2 - Use AVX-512 Vector Bit Manipulation Instructions 2
    avx512_vnni - Use vector neural network instructions for 8- and 16-bit multiply-add operations
    avx512_vp2intersect - Use AVX-512 Intersect instruction set
    avx512_vpopcntdq - Use AVX-512 Vector Population Count Doubleword and Quadword instruction set
    +avx512bw - Use AVX-512 byte- and word instructions
    +avx512cd - Use AVX-512 conflict detection instructions
    avx512dq - Use AVX-512 double- and quad-word instructions
    +avx512er - Use AVX-512 exponential and reciprocal instructions
    avx512f - Adds support for AVX-512 Foundation instructions
    avx512ifma - Use AVX-512 Integer Fused Multiply-Add instruction set +avx512pf - Use AVX-512 prefetch instructions
    +avx512vbmi - Use AVX-512 vector byte manipulation instructions
    avx512vl - Use AVX-512 vector-length instructions
    f16c - Adds support for F16C instruction set for converting between half-precision and single-precision floats
    fma3 - Use the Fused Multiply Add 3 instruction set ([fma] in cpuinfo)
    --

    2.47.0

    This adds 20-ish flags to use.mask but only 5 to use.desc. Why are these numbers different?

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmcJ/10PHHVsbUBnZW50 b28ub3JnAAoJEFGIM1CIQV4u5u8IANCv/q4PT9AU3qoQSEsUFG2ir9lddcSBq0a6 BiHsTtxgUCsLwo7uE8h69wHtXGsoNJyycMSU/oA9UB7uXmHSdHG0KkbrGliRSpKS oib2sxjhLmsEsppmXnf04VyRjuQN2W4GcbBoJAJaIdL6ETnp+1+6PdRKGV7zDUj5 6Nf13Bfl9gKUtXrkl4TaGKCAXTbkgEI4UgDHk1ID8sWFWUXE1QWM8jpBV06D8GB+ QsNQhRJ3Lt7Tl//9UDJOpxWt1n8i6LLxt+h2cXZyS54i+OffYjXl69VPnOHIjcat bn7IXJ/+C4jnCdhr6a8eKWV7myol431t0OkrYgthDwtdsXwj+z0=BtV4
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)