diff --git a/gen/archs.xml b/gen/archs.xml index 164c7bb4..ef8590b3 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 887f9794..9cf4f815 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 2c160b2f..685ad7ea 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -203,6 +203,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) @@ -239,6 +241,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 a4a06b0f..b539202b 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)