Define VLC_MMX and VLC_SSE function attribute macros
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 19 Nov 2011 10:18:34 +0000 (12:18 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 24 Nov 2011 20:41:12 +0000 (22:41 +0200)
include/vlc_cpu.h

index 932dc68..107e7d5 100644 (file)
 #  define CPU_CAPABILITY_SSE4_1  (1<<10)
 #  define CPU_CAPABILITY_SSE4_2  (1<<11)
 #  define CPU_CAPABILITY_SSE4A   (1<<12)
+
+# if defined (__MMX__)
+#  define VLC_MMX
+# elif VLC_GCC_VERSION(4, 4)
+#  define VLC_MMX __attribute__ ((__target__ ("mmx")))
+# else
+#  define VLC_MMX VLC_MMX_is_not_implemented_on_this_compiler
+# endif
+
+# if defined (__SSE__)
+#  define VLC_SSE
+# elif VLC_GCC_VERSION(4, 4)
+#  define VLC_SSE __attribute__ ((__target__ ("sse")))
+# else
+#  define VLC_SSE VLC_SSE_is_not_implemented_on_this_compiler
+# endif
+
 # else
 #  define CPU_CAPABILITY_MMX     (0)
 #  define CPU_CAPABILITY_3DNOW   (0)