summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/log/config/x86-ext
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/log/config/x86-ext')
-rw-r--r--src/boost/libs/log/config/x86-ext/Jamfile.jam34
-rw-r--r--src/boost/libs/log/config/x86-ext/avx2.cpp20
-rw-r--r--src/boost/libs/log/config/x86-ext/ssse3.cpp19
3 files changed, 73 insertions, 0 deletions
diff --git a/src/boost/libs/log/config/x86-ext/Jamfile.jam b/src/boost/libs/log/config/x86-ext/Jamfile.jam
new file mode 100644
index 00000000..0e9695aa
--- /dev/null
+++ b/src/boost/libs/log/config/x86-ext/Jamfile.jam
@@ -0,0 +1,34 @@
+#
+# Copyright Andrey Semashev 2007 - 2015.
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+
+import project ;
+
+project /boost/log/x86-extensions
+ : source-location .
+ : requirements
+ <pch>off
+ ;
+
+obj ssse3 : ssse3.cpp
+ :
+ <toolset>gcc:<cxxflags>"-msse -msse2 -msse3 -mssse3"
+ <toolset>clang:<cxxflags>"-msse -msse2 -msse3 -mssse3"
+ <toolset>intel-linux:<cxxflags>"-xSSSE3"
+ <toolset>intel-darwin:<cxxflags>"-xSSSE3"
+ <toolset>intel-win:<cxxflags>"/QxSSSE3"
+ ;
+
+obj avx2 : avx2.cpp
+ :
+ <toolset>gcc:<cxxflags>"-mavx -mavx2 -fabi-version=0"
+ <toolset>clang:<cxxflags>"-mavx -mavx2"
+ <toolset>intel-linux:<cxxflags>"-xCORE-AVX2 -fabi-version=0"
+ <toolset>intel-darwin:<cxxflags>"-xCORE-AVX2 -fabi-version=0"
+ <toolset>intel-win:<cxxflags>"/arch:CORE-AVX2"
+ <toolset>msvc:<cxxflags>"/arch:AVX"
+ ;
+
diff --git a/src/boost/libs/log/config/x86-ext/avx2.cpp b/src/boost/libs/log/config/x86-ext/avx2.cpp
new file mode 100644
index 00000000..3ee051f1
--- /dev/null
+++ b/src/boost/libs/log/config/x86-ext/avx2.cpp
@@ -0,0 +1,20 @@
+/*
+ * Copyright Andrey Semashev 2007 - 2015.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#include <immintrin.h>
+
+void pretend_used(__m256i*);
+
+int main(int, char*[])
+{
+ __m256i mm = _mm256_setzero_si256();
+ pretend_used(&mm);
+ mm = _mm256_shuffle_epi8(_mm256_alignr_epi8(mm, mm, 10), mm);
+ pretend_used(&mm);
+ _mm256_zeroupper();
+ return 0;
+}
diff --git a/src/boost/libs/log/config/x86-ext/ssse3.cpp b/src/boost/libs/log/config/x86-ext/ssse3.cpp
new file mode 100644
index 00000000..4bcfe2bc
--- /dev/null
+++ b/src/boost/libs/log/config/x86-ext/ssse3.cpp
@@ -0,0 +1,19 @@
+/*
+ * Copyright Andrey Semashev 2007 - 2015.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+#include <tmmintrin.h>
+
+void pretend_used(__m128i*);
+
+int main(int, char*[])
+{
+ __m128i mm = _mm_setzero_si128();
+ pretend_used(&mm);
+ mm = _mm_shuffle_epi8(_mm_alignr_epi8(mm, mm, 10), mm);
+ pretend_used(&mm);
+ return 0;
+}