diff --git a/gen/archs.xml b/gen/archs.xml index 7f9713692..3a138c5ef 100644 --- a/gen/archs.xml +++ b/gen/archs.xml @@ -105,6 +105,20 @@ at the top, as a last resort. + + -march=armv8-a+sve + -march=armv8-a+sve + 16 + + + + + -march=armv8-a+sve2 + -march=armv8-a+sve2 + 16 + + + -msse3 diff --git a/gen/machines.xml b/gen/machines.xml index 64e1bbd81..2ab1efbc2 100644 --- a/gen/machines.xml +++ b/gen/machines.xml @@ -16,6 +16,14 @@ generic neon neonv8 orc| + +generic neon neonv8 sve orc| + + + +generic neon neonv8 sve sve2 orc| + + generic 32|64| mmx| sse sse2 orc| diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 588db44f1..8a85d8696 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -219,6 +219,8 @@ if(NOT CPU_IS_x86) overrule_arch(sse4_1 "Architecture is not x86 or x86_64") overrule_arch(sse4_2 "Architecture is not x86 or x86_64") overrule_arch(avx "Architecture is not x86 or x86_64") + overrule_arch(avx2 "Architecture is not x86 or x86_64") + overrule_arch(fma "Architecture is not x86 or x86_64") overrule_arch(avx512f "Architecture is not x86 or x86_64") overrule_arch(avx512cd "Architecture is not x86 or x86_64") endif(NOT CPU_IS_x86) @@ -255,6 +257,8 @@ else(neon_compile_result) overrule_arch(neon "Compiler doesn't support NEON") overrule_arch(neonv7 "Compiler doesn't support NEON") overrule_arch(neonv8 "Compiler doesn't support NEON") + overrule_arch(sve "Compiler doesn't support SVE") + overrule_arch(sve2 "Compiler doesn't support SVE2") endif(neon_compile_result) ######################################################################## diff --git a/tmpl/volk_cpu.tmpl.c b/tmpl/volk_cpu.tmpl.c index 2cf2fa34d..ab2476111 100644 --- a/tmpl/volk_cpu.tmpl.c +++ b/tmpl/volk_cpu.tmpl.c @@ -44,6 +44,10 @@ static int i_can_has_${arch.name} (void) { %if "neon" in arch.name: #if defined(CPU_FEATURES_ARCH_ARM) if (GetArmInfo().features.${check} == 0){ return 0; } +#endif + %elif "neon" in arch.name or "sve" in arch.name: +#if defined(CPU_FEATURES_ARCH_AARCH64) + if (GetAarch64Info().features.${check} == 0){ return 0; } #endif %elif "mips" in arch.name: #if defined(CPU_FEATURES_ARCH_MIPS)