diff ps2/idct_mmi.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 f7cbb7733146
children
line wrap: on
line diff
--- a/ps2/idct_mmi.c	Wed Oct 15 08:01:54 2008 +0000
+++ b/ps2/idct_mmi.c	Thu Oct 16 13:34:09 2008 +0000
@@ -257,7 +257,7 @@
         pmaxh($2, $0, $2);      \
         ppacb($0, $2, $2);      \
         sd3(2, 0, 4);           \
-        asm volatile ("add $4, $5, $4");
+        __asm__ volatile ("add $4, $5, $4");
 
 #define DCT_8_INV_COL8_PUT() \
         PUT($16);        \
@@ -277,7 +277,7 @@
         pmaxh($2, $0, $2);   \
         ppacb($0, $2, $2);   \
         sd3(2, 0, 4); \
-        asm volatile ("add $4, $5, $4");
+        __asm__ volatile ("add $4, $5, $4");
 
 /*fixme: schedule*/
 #define DCT_8_INV_COL8_ADD() \
@@ -294,7 +294,7 @@
 void ff_mmi_idct(int16_t * block)
 {
         /* $4 = block */
-        asm volatile("la $24, %0"::"m"(consttable[0]));
+        __asm__ volatile("la $24, %0"::"m"(consttable[0]));
         lq($24, ROUNDER_0, $8);
         lq($24, ROUNDER_1, $7);
         DCT_8_INV_ROW1($4, 0, TAB_i_04, $8, $8);
@@ -309,14 +309,14 @@
         DCT_8_INV_COL8_STORE($4);
 
         //let savedtemp regs be saved
-        asm volatile(" ":::"$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23");
+        __asm__ volatile(" ":::"$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23");
 }
 
 
 void ff_mmi_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
 {
         /* $4 = dest, $5 = line_size, $6 = block */
-        asm volatile("la $24, %0"::"m"(consttable[0]));
+        __asm__ volatile("la $24, %0"::"m"(consttable[0]));
         lq($24, ROUNDER_0, $8);
         lq($24, ROUNDER_1, $7);
         DCT_8_INV_ROW1($6, 0, TAB_i_04, $8, $8);
@@ -333,14 +333,14 @@
         DCT_8_INV_COL8_PUT();
 
         //let savedtemp regs be saved
-        asm volatile(" ":::"$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23");
+        __asm__ volatile(" ":::"$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23");
 }
 
 
 void ff_mmi_idct_add(uint8_t *dest, int line_size, DCTELEM *block)
 {
         /* $4 = dest, $5 = line_size, $6 = block */
-        asm volatile("la $24, %0"::"m"(consttable[0]));
+        __asm__ volatile("la $24, %0"::"m"(consttable[0]));
         lq($24, ROUNDER_0, $8);
         lq($24, ROUNDER_1, $7);
         DCT_8_INV_ROW1($6, 0, TAB_i_04, $8, $8);
@@ -357,6 +357,6 @@
         DCT_8_INV_COL8_ADD();
 
         //let savedtemp regs be saved
-        asm volatile(" ":::"$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23");
+        __asm__ volatile(" ":::"$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23");
 }