diff i386/mpegvideo_mmx.c @ 8031:eebc7209c47f libavcodec

Convert asm keyword into __asm__. Neither the asm() nor the __asm__() keyword is part of the C99 standard, but while GCC accepts the former in C89 syntax, it is not accepted in C99 unless GNU extensions are turned on (with -fasm). The latter form is accepted in any syntax as an extension (without requiring further command-line options). Sun Studio C99 compiler also does not accept asm() while accepting __asm__(), albeit reporting warnings that it's not valid C99 syntax.
author flameeyes
date Thu, 16 Oct 2008 13:34:09 +0000
parents c4e4df98b703
children 0d108ec85620
line wrap: on
line diff
--- a/i386/mpegvideo_mmx.c	Wed Oct 15 08:01:54 2008 +0000
+++ b/i386/mpegvideo_mmx.c	Thu Oct 16 13:34:09 2008 +0000
@@ -55,7 +55,7 @@
     else
         nCoeffs= s->inter_scantable.raster_end[ s->block_last_index[n] ];
 //printf("%d %d  ", qmul, qadd);
-asm volatile(
+__asm__ volatile(
                 "movd %1, %%mm6                 \n\t" //qmul
                 "packssdw %%mm6, %%mm6          \n\t"
                 "packssdw %%mm6, %%mm6          \n\t"
@@ -118,7 +118,7 @@
 
     nCoeffs= s->inter_scantable.raster_end[ s->block_last_index[n] ];
 //printf("%d %d  ", qmul, qadd);
-asm volatile(
+__asm__ volatile(
                 "movd %1, %%mm6                 \n\t" //qmul
                 "packssdw %%mm6, %%mm6          \n\t"
                 "packssdw %%mm6, %%mm6          \n\t"
@@ -214,7 +214,7 @@
         block0 = block[0] * s->c_dc_scale;
     /* XXX: only mpeg1 */
     quant_matrix = s->intra_matrix;
-asm volatile(
+__asm__ volatile(
                 "pcmpeqw %%mm7, %%mm7           \n\t"
                 "psrlw $15, %%mm7               \n\t"
                 "movd %2, %%mm6                 \n\t"
@@ -277,7 +277,7 @@
     nCoeffs= s->intra_scantable.raster_end[ s->block_last_index[n] ]+1;
 
         quant_matrix = s->inter_matrix;
-asm volatile(
+__asm__ volatile(
                 "pcmpeqw %%mm7, %%mm7           \n\t"
                 "psrlw $15, %%mm7               \n\t"
                 "movd %2, %%mm6                 \n\t"
@@ -349,7 +349,7 @@
     else
         block0 = block[0] * s->c_dc_scale;
     quant_matrix = s->intra_matrix;
-asm volatile(
+__asm__ volatile(
                 "pcmpeqw %%mm7, %%mm7           \n\t"
                 "psrlw $15, %%mm7               \n\t"
                 "movd %2, %%mm6                 \n\t"
@@ -410,7 +410,7 @@
     else nCoeffs= s->intra_scantable.raster_end[ s->block_last_index[n] ];
 
         quant_matrix = s->inter_matrix;
-asm volatile(
+__asm__ volatile(
                 "pcmpeqw %%mm7, %%mm7           \n\t"
                 "psrlq $48, %%mm7               \n\t"
                 "movd %2, %%mm6                 \n\t"
@@ -482,7 +482,7 @@
 
     s->dct_count[intra]++;
 
-    asm volatile(
+    __asm__ volatile(
         "pxor %%mm7, %%mm7                      \n\t"
         "1:                                     \n\t"
         "pxor %%mm0, %%mm0                      \n\t"
@@ -536,7 +536,7 @@
 
     s->dct_count[intra]++;
 
-    asm volatile(
+    __asm__ volatile(
         "pxor %%xmm7, %%xmm7                    \n\t"
         "1:                                     \n\t"
         "pxor %%xmm0, %%xmm0                    \n\t"