diff options
author | Diego Pettenò <flameeyes@gmail.com> | 2008-10-16 17:34:09 +0400 |
---|---|---|
committer | Diego Pettenò <flameeyes@gmail.com> | 2008-10-16 17:34:09 +0400 |
commit | be449fca79a3b0394143f0a77c99784e65868d9f (patch) | |
tree | 5c5b2bbfe648467292b30cc501265e556acab101 /libavcodec/ps2/mmi.h | |
parent | a14b362fc650a5e036d413033d9709a526662d89 (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/mmi.h')
-rw-r--r-- | libavcodec/ps2/mmi.h | 70 |
1 files changed, 35 insertions, 35 deletions
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 */ |