* modules/video_chroma/*: use .p2align instead of .align for data alignment,
authorSam Hocevar <sam@videolan.org>
Thu, 26 Jan 2006 19:51:06 +0000 (19:51 +0000)
committerSam Hocevar <sam@videolan.org>
Thu, 26 Jan 2006 19:51:06 +0000 (19:51 +0000)
    because .align's behaviour changes across platforms: on Linux x86 ELF its
    argument is a byte count, on OS X x86 Mach-O it's a log2.

modules/video_chroma/i420_rgb16.c
modules/video_chroma/i420_ymga.c
modules/video_chroma/i420_yuy2.h
modules/video_chroma/i422_yuy2.c

index 9907902..fd830b3 100644 (file)
@@ -293,7 +293,7 @@ void E_(I420_RGB16)( vout_thread_t *p_vout, picture_t *p_src,
                 __asm__( MMX_INIT_16
                          : : "r" (p_y), "r" (p_u), "r" (p_v), "r" (p_buffer) );
 
-                __asm__( ".align 8"
+                __asm__( ".p2align 3"
                          MMX_YUV_MUL
                          MMX_YUV_ADD
                          MMX_UNPACK_15
@@ -322,7 +322,7 @@ void E_(I420_RGB16)( vout_thread_t *p_vout, picture_t *p_src,
                 __asm__( MMX_INIT_16
                          : : "r" (p_y), "r" (p_u), "r" (p_v), "r" (p_buffer) );
 
-                __asm__( ".align 8"
+                __asm__( ".p2align 3"
                          MMX_YUV_MUL
                          MMX_YUV_ADD
                          MMX_UNPACK_16
@@ -373,7 +373,7 @@ void E_(I420_RGB16)( vout_thread_t *p_vout, picture_t *p_src,
                 INTRINSICS_YUV_ADD
                 INTRINSICS_UNPACK_15
 #   else
-                __asm__( ".align 8"
+                __asm__( ".p2align 3"
                          MMX_YUV_MUL
                          MMX_YUV_ADD
                          MMX_UNPACK_15
@@ -388,7 +388,7 @@ void E_(I420_RGB16)( vout_thread_t *p_vout, picture_t *p_src,
                 INTRINSICS_UNPACK_16
 #   else
                 /* 16bpp 5/6/5 */
-                __asm__( ".align 8"
+                __asm__( ".p2align 3"
                          MMX_YUV_MUL
                          MMX_YUV_ADD
                          MMX_UNPACK_16
@@ -509,7 +509,7 @@ void E_(I420_RGB32)( vout_thread_t *p_vout, picture_t *p_src,
             __asm__( MMX_INIT_32
                      : : "r" (p_y), "r" (p_u), "r" (p_v), "r" (p_buffer) );
 
-            __asm__( ".align 8"
+            __asm__( ".p2align 3"
                      MMX_YUV_MUL
                      MMX_YUV_ADD
                      MMX_UNPACK_32
@@ -552,7 +552,7 @@ void E_(I420_RGB32)( vout_thread_t *p_vout, picture_t *p_src,
             __asm__( MMX_INIT_32
                      : : "r" (p_y), "r" (p_u), "r" (p_v), "r" (p_buffer) );
 
-            __asm__( ".align 8"
+            __asm__( ".p2align 3"
                      MMX_YUV_MUL
                      MMX_YUV_ADD
                      MMX_UNPACK_32
index 3cb937e..835fb38 100644 (file)
@@ -124,7 +124,7 @@ static void I420_YMGA( vout_thread_t *p_vout, picture_t *p_source,
         *p_uv++ = *p_u++; *p_uv++ = *p_v++; *p_uv++ = *p_u++; *p_uv++ = *p_v++;
         *p_uv++ = *p_u++; *p_uv++ = *p_v++; *p_uv++ = *p_u++; *p_uv++ = *p_v++;
 #else
-        __asm__( ".align 32 \n\
+        __asm__( ".p2align 5 \n\
         movd       (%0), %%mm0  # Load 4 Cr   00 00 00 00 v3 v2 v1 v0     \n\
         movd      4(%0), %%mm2  # Load 4 Cr   00 00 00 00 v3 v2 v1 v0     \n\
         movd      8(%0), %%mm4  # Load 4 Cr   00 00 00 00 v3 v2 v1 v0     \n\
index 98dda53..c0ad5a8 100644 (file)
@@ -26,7 +26,7 @@
 #define MMX_CALL(MMX_INSTRUCTIONS)                                          \
     do {                                                                    \
     __asm__ __volatile__(                                                   \
-        ".align 8 \n\t"                                                     \
+        ".p2align 3 \n\t"                                                   \
         MMX_INSTRUCTIONS                                                    \
         :                                                                   \
         : "r" (p_line1),  "r" (p_line2),  "r" (p_y1),  "r" (p_y2),          \
index beac1d1..c8888aa 100644 (file)
@@ -159,7 +159,7 @@ static void I422_YUY2( vout_thread_t *p_vout, picture_t *p_source,
             C_YUV422_YUYV( p_line, p_y, p_u, p_v );
             C_YUV422_YUYV( p_line, p_y, p_u, p_v );
 #else
-            __asm__( ".align 8" MMX_YUV422_YUYV
+            __asm__( ".p2align 3" MMX_YUV422_YUYV
                      : : "r" (p_line), "r" (p_y), "r" (p_u), "r" (p_v) ); 
 
             p_line += 16; p_y += 8; p_u += 4; p_v += 4;
@@ -191,7 +191,7 @@ static void I422_YVYU( vout_thread_t *p_vout, picture_t *p_source,
             C_YUV422_YVYU( p_line, p_y, p_u, p_v );
             C_YUV422_YVYU( p_line, p_y, p_u, p_v );
 #else
-            __asm__( ".align 8" MMX_YUV422_YVYU
+            __asm__( ".p2align 3" MMX_YUV422_YVYU
                      : : "r" (p_line), "r" (p_y), "r" (p_u), "r" (p_v) ); 
 
             p_line += 16; p_y += 8; p_u += 4; p_v += 4;
@@ -223,7 +223,7 @@ static void I422_UYVY( vout_thread_t *p_vout, picture_t *p_source,
             C_YUV422_UYVY( p_line, p_y, p_u, p_v );
             C_YUV422_UYVY( p_line, p_y, p_u, p_v );
 #else
-            __asm__( ".align 8" MMX_YUV422_UYVY
+            __asm__( ".p2align 3" MMX_YUV422_UYVY
                      : : "r" (p_line), "r" (p_y), "r" (p_u), "r" (p_v) ); 
 
             p_line += 16; p_y += 8; p_u += 4; p_v += 4;
@@ -267,7 +267,7 @@ static void I422_cyuv( vout_thread_t *p_vout, picture_t *p_source,
             C_YUV422_UYVY( p_line, p_y, p_u, p_v );
             C_YUV422_UYVY( p_line, p_y, p_u, p_v );
 #else
-            __asm__( ".align 8" MMX_YUV422_UYVY
+            __asm__( ".p2align 3" MMX_YUV422_UYVY
                      : : "r" (p_line), "r" (p_y), "r" (p_u), "r" (p_v) ); 
 
             p_line += 16; p_y += 8; p_u += 4; p_v += 4;