summaryrefslogtreecommitdiff
path: root/libavcodec/ps2
diff options
context:
space:
mode:
authorDiego Pettenò <flameeyes@gmail.com>2008-10-16 13:34:09 +0000
committerDiego Pettenò <flameeyes@gmail.com>2008-10-16 13:34:09 +0000
commitbe449fca79a3b0394143f0a77c99784e65868d9f (patch)
tree5c5b2bbfe648467292b30cc501265e556acab101 /libavcodec/ps2
parenta14b362fc650a5e036d413033d9709a526662d89 (diff)
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. Originally committed as revision 15627 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ps2')
-rw-r--r--libavcodec/ps2/dsputil_mmi.c8
-rw-r--r--libavcodec/ps2/idct_mmi.c16
-rw-r--r--libavcodec/ps2/mmi.h70
-rw-r--r--libavcodec/ps2/mpegvideo_mmi.c2
4 files changed, 48 insertions, 48 deletions
diff --git a/libavcodec/ps2/dsputil_mmi.c b/libavcodec/ps2/dsputil_mmi.c
index 3b7aba2889..513d74d83d 100644
--- a/libavcodec/ps2/dsputil_mmi.c
+++ b/libavcodec/ps2/dsputil_mmi.c
@@ -31,7 +31,7 @@ void ff_mmi_idct(DCTELEM *block);
static void clear_blocks_mmi(DCTELEM * blocks)
{
- asm volatile(
+ __asm__ volatile(
".set noreorder \n"
"addiu $9, %0, 768 \n"
"nop \n"
@@ -51,7 +51,7 @@ static void clear_blocks_mmi(DCTELEM * blocks)
static void get_pixels_mmi(DCTELEM *block, const uint8_t *pixels, int line_size)
{
- asm volatile(
+ __asm__ volatile(
".set push \n\t"
".set mips3 \n\t"
"ld $8, 0(%0) \n\t"
@@ -92,7 +92,7 @@ static void get_pixels_mmi(DCTELEM *block, const uint8_t *pixels, int line_size)
static void put_pixels8_mmi(uint8_t *block, const uint8_t *pixels, int line_size, int h)
{
- asm volatile(
+ __asm__ volatile(
".set push \n\t"
".set mips3 \n\t"
"1: \n\t"
@@ -111,7 +111,7 @@ static void put_pixels8_mmi(uint8_t *block, const uint8_t *pixels, int line_size
static void put_pixels16_mmi(uint8_t *block, const uint8_t *pixels, int line_size, int h)
{
- asm volatile (
+ __asm__ volatile (
".set push \n\t"
".set mips3 \n\t"
"1: \n\t"
diff --git a/libavcodec/ps2/idct_mmi.c b/libavcodec/ps2/idct_mmi.c
index 8fac74f47b..bfe362a91d 100644
--- a/libavcodec/ps2/idct_mmi.c
+++ b/libavcodec/ps2/idct_mmi.c
@@ -257,7 +257,7 @@ static short consttable[] align16 = {
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 @@ static short consttable[] align16 = {
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 @@ static short consttable[] align16 = {
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 @@ void ff_mmi_idct(int16_t * block)
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 @@ void ff_mmi_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
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 @@ void ff_mmi_idct_add(uint8_t *dest, int line_size, DCTELEM *block)
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");
}
diff --git a/libavcodec/ps2/mmi.h b/libavcodec/ps2/mmi.h
index 81905e0dd6..0265456108 100644
--- a/libavcodec/ps2/mmi.h
+++ b/libavcodec/ps2/mmi.h
@@ -60,112 +60,112 @@
#define lq(base, off, reg) \
- asm volatile ("lq " #reg ", %0("#base ")" : : "i" (off) )
+ __asm__ volatile ("lq " #reg ", %0("#base ")" : : "i" (off) )
#define lq2(mem, reg) \
- asm volatile ("lq " #reg ", %0" : : "r" (mem))
+ __asm__ volatile ("lq " #reg ", %0" : : "r" (mem))
#define sq(reg, off, base) \
- asm volatile ("sq " #reg ", %0("#base ")" : : "i" (off) )
+ __asm__ volatile ("sq " #reg ", %0("#base ")" : : "i" (off) )
/*
#define ld(base, off, reg) \
- asm volatile ("ld " #reg ", " #off "("#base ")")
+ __asm__ volatile ("ld " #reg ", " #off "("#base ")")
*/
#define ld3(base, off, reg) \
- asm volatile (".word %0" : : "i" ( 0xdc000000 | (base<<21) | (reg<<16) | (off)))
+ __asm__ volatile (".word %0" : : "i" ( 0xdc000000 | (base<<21) | (reg<<16) | (off)))
#define ldr3(base, off, reg) \
- asm volatile (".word %0" : : "i" ( 0x6c000000 | (base<<21) | (reg<<16) | (off)))
+ __asm__ volatile (".word %0" : : "i" ( 0x6c000000 | (base<<21) | (reg<<16) | (off)))
#define ldl3(base, off, reg) \
- asm volatile (".word %0" : : "i" ( 0x68000000 | (base<<21) | (reg<<16) | (off)))
+ __asm__ volatile (".word %0" : : "i" ( 0x68000000 | (base<<21) | (reg<<16) | (off)))
/*
#define sd(reg, off, base) \
- asm volatile ("sd " #reg ", " #off "("#base ")")
+ __asm__ volatile ("sd " #reg ", " #off "("#base ")")
*/
//seems assembler has bug encoding mnemonic 'sd', so DIY
#define sd3(reg, off, base) \
- asm volatile (".word %0" : : "i" ( 0xfc000000 | (base<<21) | (reg<<16) | (off)))
+ __asm__ volatile (".word %0" : : "i" ( 0xfc000000 | (base<<21) | (reg<<16) | (off)))
#define sw(reg, off, base) \
- asm volatile ("sw " #reg ", " #off "("#base ")")
+ __asm__ volatile ("sw " #reg ", " #off "("#base ")")
#define sq2(reg, mem) \
- asm volatile ("sq " #reg ", %0" : : "m" (*(mem)))
+ __asm__ volatile ("sq " #reg ", %0" : : "m" (*(mem)))
#define pinth(rs, rt, rd) \
- asm volatile ("pinth " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("pinth " #rd ", " #rs ", " #rt )
#define phmadh(rs, rt, rd) \
- asm volatile ("phmadh " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("phmadh " #rd ", " #rs ", " #rt )
#define pcpyud(rs, rt, rd) \
- asm volatile ("pcpyud " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("pcpyud " #rd ", " #rs ", " #rt )
#define pcpyld(rs, rt, rd) \
- asm volatile ("pcpyld " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("pcpyld " #rd ", " #rs ", " #rt )
#define pcpyh(rt, rd) \
- asm volatile ("pcpyh " #rd ", " #rt )
+ __asm__ volatile ("pcpyh " #rd ", " #rt )
#define paddw(rs, rt, rd) \
- asm volatile ("paddw " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("paddw " #rd ", " #rs ", " #rt )
#define pextlw(rs, rt, rd) \
- asm volatile ("pextlw " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("pextlw " #rd ", " #rs ", " #rt )
#define pextuw(rs, rt, rd) \
- asm volatile ("pextuw " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("pextuw " #rd ", " #rs ", " #rt )
#define pextlh(rs, rt, rd) \
- asm volatile ("pextlh " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("pextlh " #rd ", " #rs ", " #rt )
#define pextuh(rs, rt, rd) \
- asm volatile ("pextuh " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("pextuh " #rd ", " #rs ", " #rt )
#define psubw(rs, rt, rd) \
- asm volatile ("psubw " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("psubw " #rd ", " #rs ", " #rt )
#define psraw(rt, sa, rd) \
- asm volatile ("psraw " #rd ", " #rt ", %0" : : "i"(sa) )
+ __asm__ volatile ("psraw " #rd ", " #rt ", %0" : : "i"(sa) )
#define ppach(rs, rt, rd) \
- asm volatile ("ppach " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("ppach " #rd ", " #rs ", " #rt )
#define ppacb(rs, rt, rd) \
- asm volatile ("ppacb " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("ppacb " #rd ", " #rs ", " #rt )
#define prevh(rt, rd) \
- asm volatile ("prevh " #rd ", " #rt )
+ __asm__ volatile ("prevh " #rd ", " #rt )
#define pmulth(rs, rt, rd) \
- asm volatile ("pmulth " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("pmulth " #rd ", " #rs ", " #rt )
#define pmaxh(rs, rt, rd) \
- asm volatile ("pmaxh " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("pmaxh " #rd ", " #rs ", " #rt )
#define pminh(rs, rt, rd) \
- asm volatile ("pminh " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("pminh " #rd ", " #rs ", " #rt )
#define pinteh(rs, rt, rd) \
- asm volatile ("pinteh " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("pinteh " #rd ", " #rs ", " #rt )
#define paddh(rs, rt, rd) \
- asm volatile ("paddh " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("paddh " #rd ", " #rs ", " #rt )
#define psubh(rs, rt, rd) \
- asm volatile ("psubh " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("psubh " #rd ", " #rs ", " #rt )
#define psrah(rt, sa, rd) \
- asm volatile ("psrah " #rd ", " #rt ", %0" : : "i"(sa) )
+ __asm__ volatile ("psrah " #rd ", " #rt ", %0" : : "i"(sa) )
#define pmfhl_uw(rd) \
- asm volatile ("pmfhl.uw " #rd)
+ __asm__ volatile ("pmfhl.uw " #rd)
#define pextlb(rs, rt, rd) \
- asm volatile ("pextlb " #rd ", " #rs ", " #rt )
+ __asm__ volatile ("pextlb " #rd ", " #rs ", " #rt )
#endif /* AVCODEC_PS2_MMI_H */
diff --git a/libavcodec/ps2/mpegvideo_mmi.c b/libavcodec/ps2/mpegvideo_mmi.c
index da764a2142..f3baf59c64 100644
--- a/libavcodec/ps2/mpegvideo_mmi.c
+++ b/libavcodec/ps2/mpegvideo_mmi.c
@@ -50,7 +50,7 @@ static void dct_unquantize_h263_mmi(MpegEncContext *s,
nCoeffs= s->intra_scantable.raster_end[ s->block_last_index[n] ];
}
- asm volatile(
+ __asm__ volatile(
"add $14, $0, %3 \n\t"
"pcpyld $8, %0, %0 \n\t"
"pcpyh $8, $8 \n\t" //r8 = qmul