AC_COMPILE_IFELSE([
#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2))
-#error "Need GCC >= 4.2 for SSE2 intrinsics"
+# if !defined(__amd64__) && !defined(__x86_64__)
+# error "Need GCC >= 4.2 for SSE2 intrinsics on x86"
+# endif
#endif
#include <mmintrin.h>
#include <xmmintrin.h>
}
-#if defined(USE_SSE2) && defined (__GNUC__)
+#if defined(USE_SSE2) && defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__)
/*
* Work around GCC bug causing crashes in Mozilla with SSE2
* The __force_align_arg_pointer__ makes gcc generate a prologue that
* realigns the stack pointer to 16 bytes.
*
+ * On x86-64 this is not necessary because the standard ABI already
+ * calls for a 16 byte aligned stack.
+ *
* See https://bugs.freedesktop.org/show_bug.cgi?id=15693
*/