79c2a6c7a1
Changes: * Many changes to Matrix classes for AVX and SSE. * FXHash hash-table improvements. * FXHash, FXPtrList needlessly had virtual destructors. * API's equalElms() added to FXElement.h. * Problems with initial list fixed in FXFileList and FXDirList. * Dropped default parameter value for FXString::mid() API. * Signed/unsigned warning issues fixed in FXArray.h. * FXArray and FXHash now use FXival to allow truly large arrays and dictionaries. * Fixed some warnings compiling synchronization classes. * Use FXuval for fxmalloc() and ilk. * Minor additional tweaks to CPU identification. * FXRefPtr moved into the Atomic Age:- use atomic swap when changing pointer value. * Add overloads for long, unsigned long in FXElement.h. * FXArray now consists of single (never NULL) pointer, same as FXString. This means FXArray takes up only a pointer's worth of space when empty. * Sign-extend macro added to fxdefs.h.
21 lines
849 B
C++
21 lines
849 B
C++
--- lib/FXAtomic.cpp.orig 2013-07-26 16:35:43.000000000 +0200
|
|
+++ lib/FXAtomic.cpp 2013-08-29 09:24:35.000000000 +0200
|
|
@@ -71,6 +71,9 @@
|
|
#if defined( __INTEL_COMPILER ) && !defined( __ia64__ )
|
|
#undef HAVE_BUILTIN_SYNC
|
|
#endif
|
|
+#if defined(__FreeBSD__) && defined(__amd64__) && __FreeBSD_version < 900000
|
|
+#undef HAVE_BUILTIN_SYNC
|
|
+#endif
|
|
#endif
|
|
|
|
|
|
@@ -393,7 +396,7 @@
|
|
"andl $1, %%eax\n\t" : "=a"(ret) : "D"(ptr), "a"(cmpa), "d"(cmpb), "b"(a), "c"(b) : "memory", "cc");
|
|
return ret;
|
|
#endif
|
|
-#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER)) && defined(__x86_64__))
|
|
+#elif ((defined(__GNUC__) || defined(__INTEL_COMPILER)) && defined(__x86_64__)) && (!defined(__FreeBSD__) || __FreeBSD_version > 900000)
|
|
register FXbool ret;
|
|
__asm__ __volatile__ ("lock\n\t"
|
|
"cmpxchg16b (%1)\n\t"
|