summaryrefslogtreecommitdiffstats
path: root/extras/emacs/plugin-am-skel.el
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-08-10 16:22:48 -0400
committerDave Barach <openvpp@barachs.net>2018-08-11 00:07:10 +0000
commitd7a37a75625dd5f09cdb99e0de6e40b49dd9a0d0 (patch)
treee2a4c5cd4aa7b90b90cb5bd28099731bbca11017 /extras/emacs/plugin-am-skel.el
parent7eb9d9608b5b47b95f4860b2c470411658f7cdac (diff)
emacs skeletons: add quad/single, avx2/avx512 support
Change-Id: Ib8095ad69620308d6199ab030a754ee45f92e59b Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'extras/emacs/plugin-am-skel.el')
-rw-r--r--extras/emacs/plugin-am-skel.el30
1 files changed, 29 insertions, 1 deletions
diff --git a/extras/emacs/plugin-am-skel.el b/extras/emacs/plugin-am-skel.el
index 0a218e2f00e..650d27c5e0f 100644
--- a/extras/emacs/plugin-am-skel.el
+++ b/extras/emacs/plugin-am-skel.el
@@ -37,6 +37,7 @@ nil
vppapitestplugins_LTLIBRARIES += " plugin-name "_test_plugin.la
vppplugins_LTLIBRARIES += " plugin-name "_plugin.la
+" plugin-name "_plugin_la_LIBADD =
" plugin-name "_plugin_la_SOURCES = \\
" plugin-name "/node.c \\
@@ -57,5 +58,32 @@ nobase_apiinclude_HEADERS += \\
" plugin-name "/" plugin-name "_test.c \\
" plugin-name "/" plugin-name ".api.h
-# vi:syntax=automake
+if CPU_X86_64
+ " plugin-name "_multiversioning_sources = \\
+ " plugin-name "/node.c
+
+if CC_SUPPORTS_AVX2
+###############################################################
+# AVX2
+###############################################################
+lib" plugin-name "_plugin_avx2_la_SOURCES = $(" plugin-name "_multiversioning_sources)
+lib" plugin-name "_plugin_avx2_la_CFLAGS = \\
+ $(AM_CFLAGS) @CPU_AVX2_FLAGS@ \\
+ -DCLIB_MARCH_VARIANT=avx2
+noinst_LTLIBRARIES += lib" plugin-name "_plugin_avx2.la
+" plugin-name "_plugin_la_LIBADD += lib" plugin-name "_plugin_avx2.la
+endif
+
+if CC_SUPPORTS_AVX512
+###############################################################
+# AVX512
+###############################################################
+lib" plugin-name "_plugin_avx512_la_SOURCES = $(" plugin-name "_multiversioning_sources)
+lib" plugin-name "_plugin_avx512_la_CFLAGS = \\
+ $(AM_CFLAGS) @CPU_AVX512_FLAGS@ \\
+ -DCLIB_MARCH_VARIANT=avx512
+noinst_LTLIBRARIES += lib" plugin-name "_plugin_avx512.la
+" plugin-name "_plugin_la_LIBADD += lib" plugin-name "_plugin_avx512.la
+endif
+endif
")