goom: Fix MMX assembly compilation with clang
authorSebastian Dröge <slomo@circular-chaos.org>
Sat, 21 Sep 2013 16:46:29 +0000 (18:46 +0200)
committerSebastian Dröge <slomo@circular-chaos.org>
Sat, 21 Sep 2013 16:48:19 +0000 (18:48 +0200)
clang does not want or need a clobber list for emms:
error: clobbers must be last on the x87 stack

Patch taken from the FreeBSD ports, provided by
Dan McGregor <dan.mcgregor@usask.ca>

gst/goom/mmx.h

index 3fae26b..2649e10 100644 (file)
@@ -711,17 +711,29 @@ void zoom_filter_xmmx (int prevX, int prevY, Pixel *expix1, Pixel *expix2,
 */
 #ifdef MMX_TRACE
 
+#ifdef __clang__
+#define emms() \
+       { \
+               printf("emms()\n"); \
+               __asm__ __volatile__ ("emms"); \
+       }
+#else
 #define        emms() \
        { \
                printf("emms()\n"); \
                __asm__ __volatile__ ("emms" \
                         "st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)"); \
        }
+#endif
 
 #else
 
+#ifdef __clang__
+#define        emms() __asm__ __volatile__ ("emms")
+#else
 #define        emms() __asm__ __volatile__ ("emms"::: \
                       "st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)")
+#endif
 
 #endif