]> git.sesse.net Git - vlc/commitdiff
Do not pass -mmmx or -msse2 to the compiler
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 9 May 2011 15:40:32 +0000 (18:40 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 9 May 2011 16:00:51 +0000 (19:00 +0300)
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.

configure.ac
modules/mmx/Modules.am
modules/sse2/Modules.am

index 6dbcfff7ea9c0f38613e994f0c749879d91bcf98..5ea921b97de4c66e93af16c21c71b4ca421ad138 100644 (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"
index b2d4b11d9891b552b68d5f967f2e6efae0c56428..cfbf17d8867ce45c84768829fb4a09dadd23cdcd 100644 (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)
index 899634ba66c7393171edf590e7211ef30d0da19e..ac9223fb8e559a06e07c5e4873e70f24e0224279 100644 (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 \