File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ if (DYNAMIC_ARCH)
4646 if (ARM64)
4747 set (DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA55 CORTEXA57 CORTEXA72 CORTEXA73 FALKOR THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110)
4848 if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER 9.99)
49- set (DYNAMIC_CORE " ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2" )
49+ set (DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2)
5050 endif ()
5151 if (DYNAMIC_LIST)
5252 set (DYNAMIC_CORE ARMV8 ${DYNAMIC_LIST} )
Original file line number Diff line number Diff line change @@ -280,7 +280,29 @@ if (DEFINED TARGET)
280280 if (${TARGET} STREQUAL POWER8)
281281 set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math" )
282282 endif ()
283+
284+ if (${TARGET} STREQUAL NEOVERSEV1)
285+ execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION )
286+ if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
287+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sve -mtune=neoverse-v1" )
288+ else ()
289+ message (FATAL_ERROR "Compiler ${CMAKE_C_COMPILER} ${GCC_VERSION} does not support Neoverse V1." )
290+ endif ()
291+ endif ()
292+ if (${TARGET} STREQUAL NEOVERSEN2)
293+ execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION )
294+ if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4)
295+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2" )
296+ else ()
297+ message (FATAL_ERROR "Compiler $${CMAKE_C_COMPILER} {GCC_VERSION} does not support Neoverse N2." )
298+ endif ()
299+ endif ()
300+ if (${TARGET} STREQUAL ARMV8SVE)
301+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.2-a+sve" )
302+ endif ()
303+
283304endif ()
305+
284306if (DEFINED BINARY)
285307 message (STATUS "Compiling a ${BINARY} -bit binary." )
286308endif ()
You can’t perform that action at this time.
0 commit comments