From 690ce8672c090709924b924af1e49ffc38d8f00c Mon Sep 17 00:00:00 2001 From: "Lijian.Zhang" Date: Tue, 18 Feb 2020 19:58:19 +0800 Subject: build: support arch-specific compiling for Neoverse N1 Enable arch-specific compiling and dynamic optimal function selection for Arm Neoverse-N1. Support for -march=armv8.2-a+crc+crypto -mtune=neoverse-n1 for Neoverse-N1 is added starting from gcc-9.2.0 without change with change improvement [L2 - 1x flows] 11.00 Mpps 11.46 Mpps 4% [L2 - 10Kx flows] 6.83 Mpps 7.17 Mpps 5% [L3 - 1x flows] 10.39 Mpps 10.78 Mpps 3.7% [L3 - 10Kx flows] 6.67 Mpps 7.19 Mpps 7.8% Type: feature Change-Id: I5d24d17820b3dd6909b913202e8c31fc7d48650f Signed-off-by: Lijian Zhang Reviewed-by: Jieqiang Wang Reviewed-by: Govindarajan Mohandoss --- src/cmake/cpu.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/cmake') diff --git a/src/cmake/cpu.cmake b/src/cmake/cpu.cmake index 916fe0d1ddd..0ce8bea31ec 100644 --- a/src/cmake/cpu.cmake +++ b/src/cmake/cpu.cmake @@ -107,6 +107,10 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)") if(compiler_flag_march_cortexa72) list(APPEND MARCH_VARIANTS "cortexa72\;-march=armv8-a+crc+crypto -mtune=cortex-a72 -DCLIB_N_PREFETCHES=6") endif() + check_c_compiler_flag("-march=armv8.2-a+crc+crypto -mtune=neoverse-n1" compiler_flag_march_neoversen1) + if(compiler_flag_march_neoversen1) + list(APPEND MARCH_VARIANTS "neoversen1\;-march=armv8.2-a+crc+crypto -mtune=neoverse-n1 -DCLIB_N_PREFETCHES=6") + endif() endif() macro(vpp_library_set_multiarch_sources lib) -- cgit 1.2.3-korg