1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-04 09:11:33 +02:00

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.
This commit is contained in:
Rémi Denis-Courmont 2011-05-09 18:40:32 +03:00
parent 4134614892
commit 9c61b594a9
3 changed files with 0 additions and 8 deletions

View File

@ -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"

View File

@ -1,5 +1,3 @@
AM_CFLAGS += $(MMX_CFLAGS)
libmemcpymmx_plugin_la_SOURCES = memcpy.c fastmemcpy.h
libmemcpymmx_plugin_la_CFLAGS = $(AM_CFLAGS)
libmemcpymmx_plugin_la_LIBADD = $(AM_LIBADD)

View File

@ -1,5 +1,3 @@
AM_CFLAGS += $(SSE2_CFLAGS)
libi420_rgb_sse2_plugin_la_SOURCES = \
../video_chroma/i420_rgb.c \
../video_chroma/i420_rgb.h \