diff options
author | Damjan Marion <damarion@cisco.com> | 2020-04-29 21:28:15 +0200 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2020-04-30 13:25:29 +0200 |
commit | 162330f25aeec09694fffaaa31ba9b318620eb9c (patch) | |
tree | 4c7a10aae7b2e5d54ef21260d08ad3671d44b061 /src/vppinfra/cpu.h | |
parent | dc0ded7dd7a6b8ee68df25cd56666de804e55e64 (diff) |
build: rework x86 CPU variants
Type: improvement
Change-Id: Ief243f88e654e578ef9b8060fcf535b364aececb
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/cpu.h')
-rw-r--r-- | src/vppinfra/cpu.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/vppinfra/cpu.h b/src/vppinfra/cpu.h index 7bd5dfe9722..dc73c90ca34 100644 --- a/src/vppinfra/cpu.h +++ b/src/vppinfra/cpu.h @@ -132,6 +132,9 @@ _ (x86_aes, 1, ecx, 25) \ _ (sha, 7, ebx, 29) \ _ (vaes, 7, ecx, 9) \ _ (vpclmulqdq, 7, ecx, 10) \ +_ (avx512_vnni, 7, ecx, 11) \ +_ (avx512_bitalg, 7, ecx, 12) \ +_ (avx512_vpopcntdq, 7, ecx, 14) \ _ (invariant_tsc, 0x80000007, edx, 8) @@ -245,15 +248,23 @@ clib_cpu_supports_aes () } static inline int -clib_cpu_march_priority_avx512 () +clib_cpu_march_priority_icl () +{ + if (clib_cpu_supports_avx512_bitalg ()) + return 200; + return -1; +} + +static inline int +clib_cpu_march_priority_skx () { if (clib_cpu_supports_avx512f ()) - return 20; + return 100; return -1; } static inline int -clib_cpu_march_priority_avx2 () +clib_cpu_march_priority_hsw () { if (clib_cpu_supports_avx2 ()) return 50; |