Commits (1)
......@@ -26,9 +26,15 @@ Website: http://gf2x.gforge.inria.fr/
=== Patches ===
* no-undefined.patch: pass -no-undefined flag to libtool.
* improve-sse-2-check.patch: Use stricter sse-2 check from upstream
revision 160.
== Changelog ==
=== gf2x-1.1.p1 (Erik Massop, 15 June 2013) ===
* Trac #16481: Improved sse-2 check from upstream revision 160.
Revision 160 is before the switch to GPLv3.
=== gf2x-1.1.p0 (Jean-Pierre Flori, 6 August 2013) ===
* Trac #15014: Let gf2x build a shared library on Cygwin.
......
diff -u -r src/config/acinclude.m4 new/config/acinclude.m4
--- src/config/acinclude.m4 2012-05-31 22:53:47.000000000 +0200
+++ new/config/acinclude.m4 2014-06-15 20:40:54.465269861 +0200
@@ -74,8 +74,21 @@
AC_DEFUN([SSE2_EXAMPLE],[AC_LANG_SOURCE([
#include <emmintrin.h>
-__v2di x;
-int main() {}
+__v2di x; /* Our code currently uses these, but it should not */
+int main(int argc, char * argv) {
+ __m128i foo = _mm_setr_epi32(argc, argc + 1, argc + 2, argc + 3);
+ __m128i bar = _mm_setr_epi32(argc + 3, argc + 2, argc + 1, argc);
+ foo = _mm_mullo_epi16(foo, bar);
+ foo = _mm_slli_epi64(foo, 1);
+ foo = _mm_xor_si128(bar, _mm_unpacklo_epi32 (foo, bar));
+ foo = _mm_srli_epi64(foo, 1);
+ foo = _mm_mullo_epi16(foo, bar);
+ foo = _mm_shuffle_epi32(foo, 78);
+ foo = _mm_xor_si128(bar, _mm_unpacklo_epi32 (foo, bar));
+ foo = _mm_srli_si128(foo, 1);
+
+ return _mm_extract_epi16(foo, 0) & (argc - 1);
+}
])])
# Check whether we need some flag such as -msse2 in order to enable sse-2
diff -u -r src/configure new/configure
--- src/configure 2012-05-31 22:54:00.000000000 +0200
+++ new/configure 2014-06-15 20:39:51.590053902 +0200
@@ -16359,8 +16359,21 @@
/* end confdefs.h. */
#include <emmintrin.h>
-__v2di x;
-int main() {}
+__v2di x; /* Our code currently uses these, but it should not */
+int main(int argc, char * argv) {
+ __m128i foo = _mm_setr_epi32(argc, argc + 1, argc + 2, argc + 3);
+ __m128i bar = _mm_setr_epi32(argc + 3, argc + 2, argc + 1, argc);
+ foo = _mm_mullo_epi16(foo, bar);
+ foo = _mm_slli_epi64(foo, 1);
+ foo = _mm_xor_si128(bar, _mm_unpacklo_epi32 (foo, bar));
+ foo = _mm_srli_epi64(foo, 1);
+ foo = _mm_mullo_epi16(foo, bar);
+ foo = _mm_shuffle_epi32(foo, 78);
+ foo = _mm_xor_si128(bar, _mm_unpacklo_epi32 (foo, bar));
+ foo = _mm_srli_si128(foo, 1);
+
+ return _mm_extract_epi16(foo, 0) & (argc - 1);
+}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -16380,8 +16393,21 @@
/* end confdefs.h. */
#include <emmintrin.h>
-__v2di x;
-int main() {}
+__v2di x; /* Our code currently uses these, but it should not */
+int main(int argc, char * argv) {
+ __m128i foo = _mm_setr_epi32(argc, argc + 1, argc + 2, argc + 3);
+ __m128i bar = _mm_setr_epi32(argc + 3, argc + 2, argc + 1, argc);
+ foo = _mm_mullo_epi16(foo, bar);
+ foo = _mm_slli_epi64(foo, 1);
+ foo = _mm_xor_si128(bar, _mm_unpacklo_epi32 (foo, bar));
+ foo = _mm_srli_epi64(foo, 1);
+ foo = _mm_mullo_epi16(foo, bar);
+ foo = _mm_shuffle_epi32(foo, 78);
+ foo = _mm_xor_si128(bar, _mm_unpacklo_epi32 (foo, bar));
+ foo = _mm_srli_si128(foo, 1);
+
+ return _mm_extract_epi16(foo, 0) & (argc - 1);
+}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -16421,8 +16447,21 @@
/* end confdefs.h. */
#include <emmintrin.h>
-__v2di x;
-int main() {}
+__v2di x; /* Our code currently uses these, but it should not */
+int main(int argc, char * argv) {
+ __m128i foo = _mm_setr_epi32(argc, argc + 1, argc + 2, argc + 3);
+ __m128i bar = _mm_setr_epi32(argc + 3, argc + 2, argc + 1, argc);
+ foo = _mm_mullo_epi16(foo, bar);
+ foo = _mm_slli_epi64(foo, 1);
+ foo = _mm_xor_si128(bar, _mm_unpacklo_epi32 (foo, bar));
+ foo = _mm_srli_epi64(foo, 1);
+ foo = _mm_mullo_epi16(foo, bar);
+ foo = _mm_shuffle_epi32(foo, 78);
+ foo = _mm_xor_si128(bar, _mm_unpacklo_epi32 (foo, bar));
+ foo = _mm_srli_si128(foo, 1);
+
+ return _mm_extract_epi16(foo, 0) & (argc - 1);
+}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :
@@ -16436,8 +16475,21 @@
/* end confdefs.h. */
#include <emmintrin.h>
-__v2di x;
-int main() {}
+__v2di x; /* Our code currently uses these, but it should not */
+int main(int argc, char * argv) {
+ __m128i foo = _mm_setr_epi32(argc, argc + 1, argc + 2, argc + 3);
+ __m128i bar = _mm_setr_epi32(argc + 3, argc + 2, argc + 1, argc);
+ foo = _mm_mullo_epi16(foo, bar);
+ foo = _mm_slli_epi64(foo, 1);
+ foo = _mm_xor_si128(bar, _mm_unpacklo_epi32 (foo, bar));
+ foo = _mm_srli_epi64(foo, 1);
+ foo = _mm_mullo_epi16(foo, bar);
+ foo = _mm_shuffle_epi32(foo, 78);
+ foo = _mm_xor_si128(bar, _mm_unpacklo_epi32 (foo, bar));
+ foo = _mm_srli_si128(foo, 1);
+
+ return _mm_extract_epi16(foo, 0) & (argc - 1);
+}
_ACEOF
if ac_fn_c_try_cpp "$LINENO"; then :