[vlc-commits] Do not pass -mmmx or -msse2 to the compiler
Rémi Denis-Courmont
git at videolan.org
Mon May 9 18:01:10 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon May 9 18:40:32 2011 +0300| [9c61b594a9d8b9fd701b8716b5c783b45c4685c7] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9c61b594a9d8b9fd701b8716b5c783b45c4685c7
---
configure.ac | 4 ----
modules/mmx/Modules.am | 2 --
modules/sse2/Modules.am | 2 --
3 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6dbcfff..5ea921b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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"
diff --git a/modules/mmx/Modules.am b/modules/mmx/Modules.am
index b2d4b11..cfbf17d 100644
--- a/modules/mmx/Modules.am
+++ b/modules/mmx/Modules.am
@@ -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)
diff --git a/modules/sse2/Modules.am b/modules/sse2/Modules.am
index 899634b..ac9223f 100644
--- a/modules/sse2/Modules.am
+++ b/modules/sse2/Modules.am
@@ -1,5 +1,3 @@
-AM_CFLAGS += $(SSE2_CFLAGS)
-
libi420_rgb_sse2_plugin_la_SOURCES = \
../video_chroma/i420_rgb.c \
../video_chroma/i420_rgb.h \
More information about the vlc-commits
mailing list