summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorEll <ell_se@yahoo.com>2019-07-24 23:21:01 +0300
committerEll <ell_se@yahoo.com>2019-07-24 23:41:03 +0300
commit385f0b545727262f58d3cfcf5523f69ace0e0166 (patch)
tree47725808e420d1efe0199b9334f8aa2e91bae572 /meson.build
parent04efa1f93a704f3d22f12692964ea0c8ce0e3c77 (diff)
configure.ac, meson, cpu-accel: add AVX2 detection
Detect AVX2 support during configuration and runtime, in preperation for next commit.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 10 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index b17db52..c72688e 100644
--- a/meson.build
+++ b/meson.build
@@ -216,6 +216,16 @@ if cc.has_argument('-mmmx') and get_option('enable-mmx')
conf.set('USE_SSE4_1', 1, description:
'Define to 1 if sse4.1 assembly is available.')
endif
+
+ # avx2 assembly
+ if cc.has_argument('-mavx2') and get_option('enable-avx2')
+ if cc.compiles('asm ("vpgatherdd %ymm0,(%rax,%ymm1,4),%ymm2");')
+ message('avx2 assembly available')
+ avx2_cflags = '-mavx2'
+ conf.set('USE_AVX2', 1, description:
+ 'Define to 1 if avx2 assembly is available.')
+ endif
+ endif
endif
endif
endif