Add gcc options for Neoverse cpus
@@ -155,6 +155,39 @@ if (${CORE} STREQUAL A64FX)
endif ()
endif ()
+if (${CORE} STREQUAL NEOVERSEN2)
+ if (NOT DYNAMIC_ARCH)
+ execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+ if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
+ set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2")
+ else ()
+ set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
+ endif()
+ endif ()
+endif ()
+
+if (${CORE} STREQUAL NEOVERSEV1)
+ if (NOT DYNAMIC_ARCH)
+ execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+ if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
+ set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve -mtune=neoverse-v1")
+ else ()
+ set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
+ endif()
+ endif ()
+endif ()
+
+if (${CORE} STREQUAL NEOVERSEN1)
+ if (NOT DYNAMIC_ARCH)
+ execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+ if (${GCC_VERSION} VERSION_GREATER 9.4 OR ${GCC_VERSION} VERSION_EQUAL 9.4)
+ set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve -mtune=neoverse-n1")
+ else ()
+ set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve")
+ endif()
+ endif ()
+endif ()
+
if (${CORE} STREQUAL ARMV8SVE)
if (NOT DYNAMIC_ARCH)
set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8-a+sve")
