diff options
author | Damjan Marion <damarion@cisco.com> | 2023-03-14 13:34:59 +0100 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2023-03-14 16:01:08 +0000 |
commit | 1552228350bb73db281aee43d90bcb068189d5ba (patch) | |
tree | cfdc61899bbb921d13b272116c6a7ab44f31b4f8 /src/vppinfra/cpu.h | |
parent | 8ade308e1724ac87a9d57f97152cf3f9a91c6373 (diff) |
build: add support for intel alderlake and sapphirerapids
Disabled by default..
Type: improvement
Change-Id: I36176c009e0873c048874ae38a7ea0a91449235c
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/cpu.h')
-rw-r--r-- | src/vppinfra/cpu.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/vppinfra/cpu.h b/src/vppinfra/cpu.h index 769bdb56e82..efa85ad1af1 100644 --- a/src/vppinfra/cpu.h +++ b/src/vppinfra/cpu.h @@ -138,6 +138,7 @@ _CLIB_MARCH_FN_REGISTRATION(fn) _ (avx512_vpopcntdq, 7, ecx, 14) \ _ (movdiri, 7, ecx, 27) \ _ (movdir64b, 7, ecx, 28) \ + _ (enqcmd, 7, ecx, 29) \ _ (avx512_fp16, 7, edx, 23) \ _ (invariant_tsc, 0x80000007, edx, 8) @@ -239,6 +240,14 @@ clib_cpu_supports_aes () } static inline int +clib_cpu_march_priority_spr () +{ + if (clib_cpu_supports_enqcmd ()) + return 300; + return -1; +} + +static inline int clib_cpu_march_priority_icl () { if (clib_cpu_supports_avx512_bitalg ()) @@ -247,6 +256,14 @@ clib_cpu_march_priority_icl () } static inline int +clib_cpu_march_priority_adl () +{ + if (clib_cpu_supports_movdiri () && clib_cpu_supports_avx2 ()) + return 150; + return -1; +} + +static inline int clib_cpu_march_priority_skx () { if (clib_cpu_supports_avx512f ()) @@ -258,7 +275,7 @@ static inline int clib_cpu_march_priority_trm () { if (clib_cpu_supports_movdiri ()) - return 60; + return 40; return -1; } |