Commit 9c61b594 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Do not pass -mmmx or -msse2 to the compiler

x86 GCC does not need those parameters to compile MMX or SSE assembly
or built-in intrinsics (contrary to ARM GCC w.r.t. NEON). They only
allow the compiler to issue MMX or SSE instructions for the plain C
code. We already rely on this tolerant compiler semantic for the CPU
detection code, and for some optionally accelerated filters (e.g.
deinterlace).

Disabling MMX and SSE for non-assembly code should have no or
negligible effects on the affected plugins. On the other hand, it
ensures that the plugin descriptor can be run by non-MMX/non-SSE CPUs.
parent 41346148
......@@ -1311,7 +1311,6 @@ AS_IF([test "${enable_mmx}" != "no"], [
AS_IF([test "${ac_cv_c_mmx_intrinsics}" != "no"], [
AC_DEFINE(HAVE_MMX_INTRINSICS, 1,
[Define to 1 if MMX intrinsics are available.])
MMX_CFLAGS="-mmmx"
])
AC_CACHE_CHECK([if $CC groks MMX inline assembly],
......@@ -1336,7 +1335,6 @@ AS_IF([test "${enable_mmx}" != "no"], [
have_mmxext="yes"
])
])
AC_SUBST(MMX_CFLAGS)
AM_CONDITIONAL([HAVE_MMX], [test "${have_mmx}" = "yes"])
AM_CONDITIONAL([HAVE_MMXEXT], [test "${have_mmxext}" = "yes"])
......@@ -1379,7 +1377,6 @@ AS_IF([test "${enable_sse}" != "no"], [
AS_IF([test "${ac_cv_c_sse2_intrinsics}" != "no"], [
AC_DEFINE(HAVE_SSE2_INTRINSICS, 1,
[Define to 1 if SSE2 intrinsics are available.])
SSE2_CFLAGS="-msse2"
])
AC_CACHE_CHECK([if $CC groks SSE inline assembly],
......@@ -1452,7 +1449,6 @@ AS_IF([test "${enable_sse}" != "no"], [
AC_DEFINE(CAN_COMPILE_SSE4A, 1,
[Define to 1 if SSE4A inline assembly is available.]) ])
])
AC_SUBST(SSE2_CFLAGS)
AM_CONDITIONAL([HAVE_SSE2], [test "$have_sse2" = "yes"])
have_3dnow="no"
......
AM_CFLAGS += $(MMX_CFLAGS)
libmemcpymmx_plugin_la_SOURCES = memcpy.c fastmemcpy.h
libmemcpymmx_plugin_la_CFLAGS = $(AM_CFLAGS)
libmemcpymmx_plugin_la_LIBADD = $(AM_LIBADD)
......
AM_CFLAGS += $(SSE2_CFLAGS)
libi420_rgb_sse2_plugin_la_SOURCES = \
../video_chroma/i420_rgb.c \
../video_chroma/i420_rgb.h \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment