This commit is contained in:
Robert Sayre 2009-12-15 22:30:41 -05:00
commit 051734a3d2
2 changed files with 28 additions and 25 deletions

View File

@ -2478,35 +2478,38 @@ fi
dnl Configure SSE2 support
HAVE_SSE2=
MUST_DETECT_SSE2=
dnl Enable SSE2 support in the compiler if available.
dnl ========================================================
case "$target" in
i?86-*)
HAVE_SSE2=1
case "$target_os" in
darwin*)
;;
*)
MUST_DETECT_SSE2=1
;;
esac
;;
x86_64*-*)e
HAVE_SSE2=1
;;
esac
if test "$HAVE_SSE2"; then
AC_DEFINE(HAVE_SSE2)
i?86-*|x86_64*-*)
if test "$GNU_CC"; then
CFLAGS="$CFLAGS -msse2"
fi
if test "$GNU_CXX"; then
CXXFLAGS="$CXXFLAGS -msse2"
fi
if test "$MUST_DETECT_SSE2"; then
AC_DEFINE(MUST_DETECT_SSE2)
fi
;;
esac
dnl If we have the proper include file, enable SSE2 support.
dnl ========================================================
HAVE_SSE2=
AC_CHECK_HEADER(xmmintrin.h, HAVE_SSE2=1)
AC_CHECK_HEADER(emmintrin.h, HAVE_SSE2=1 && AC_DEFINE(USE_EMM_INTRIN))
if test "$HAVE_SSE2"; then
AC_DEFINE(HAVE_SSE2)
case "$target_os" in
darwin*)
;;
*)
case "$target" in
i?86-*)
AC_DEFINE(MUST_DETECT_SSE2)
;;
esac
;;
esac
fi
dnl Configure JIT support

View File

@ -48,10 +48,10 @@
#include <ieeefp.h>
#endif
#ifdef HAVE_SSE2
#ifdef __GNUC__
#include <xmmintrin.h>
#else
#ifdef USE_EMM_INTRIN
#include <emmintrin.h>
#else
#include <xmmintrin.h>
#endif
#endif