summaryrefslogtreecommitdiff
path: root/libavcodec/alpha
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/alpha
parenta14b362fc650a5e036d413033d9709a526662d89 (diff)
downloadffmpeg-be449fca79a3b0394143f0a77c99784e65868d9f.tar.gz
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/alpha')
-rw-r--r--libavcodec/alpha/asm.h102
1 files changed, 51 insertions, 51 deletions
diff --git a/libavcodec/alpha/asm.h b/libavcodec/alpha/asm.h
index 6fef165de4..1877704e7b 100644
--- a/libavcodec/alpha/asm.h
+++ b/libavcodec/alpha/asm.h
@@ -105,21 +105,21 @@ struct unaligned_long { uint64_t l; } __attribute__((packed));
#define implver __builtin_alpha_implver
#define rpcc __builtin_alpha_rpcc
#else
-#define prefetch(p) asm volatile("ldl $31,%0" : : "m"(*(const char *) (p)) : "memory")
-#define prefetch_en(p) asm volatile("ldq $31,%0" : : "m"(*(const char *) (p)) : "memory")
-#define prefetch_m(p) asm volatile("lds $f31,%0" : : "m"(*(const char *) (p)) : "memory")
-#define prefetch_men(p) asm volatile("ldt $f31,%0" : : "m"(*(const char *) (p)) : "memory")
-#define cmpbge(a, b) ({ uint64_t __r; asm ("cmpbge %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; })
-#define extql(a, b) ({ uint64_t __r; asm ("extql %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; })
-#define extwl(a, b) ({ uint64_t __r; asm ("extwl %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; })
-#define extqh(a, b) ({ uint64_t __r; asm ("extqh %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; })
-#define zap(a, b) ({ uint64_t __r; asm ("zap %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; })
-#define zapnot(a, b) ({ uint64_t __r; asm ("zapnot %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; })
-#define amask(a) ({ uint64_t __r; asm ("amask %1,%0" : "=r" (__r) : "rI" (a)); __r; })
-#define implver() ({ uint64_t __r; asm ("implver %0" : "=r" (__r)); __r; })
-#define rpcc() ({ uint64_t __r; asm volatile ("rpcc %0" : "=r" (__r)); __r; })
+#define prefetch(p) __asm__ volatile("ldl $31,%0" : : "m"(*(const char *) (p)) : "memory")
+#define prefetch_en(p) __asm__ volatile("ldq $31,%0" : : "m"(*(const char *) (p)) : "memory")
+#define prefetch_m(p) __asm__ volatile("lds $f31,%0" : : "m"(*(const char *) (p)) : "memory")
+#define prefetch_men(p) __asm__ volatile("ldt $f31,%0" : : "m"(*(const char *) (p)) : "memory")
+#define cmpbge(a, b) ({ uint64_t __r; __asm__ ("cmpbge %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; })
+#define extql(a, b) ({ uint64_t __r; __asm__ ("extql %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; })
+#define extwl(a, b) ({ uint64_t __r; __asm__ ("extwl %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; })
+#define extqh(a, b) ({ uint64_t __r; __asm__ ("extqh %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; })
+#define zap(a, b) ({ uint64_t __r; __asm__ ("zap %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; })
+#define zapnot(a, b) ({ uint64_t __r; __asm__ ("zapnot %r1,%2,%0" : "=r" (__r) : "rJ" (a), "rI" (b)); __r; })
+#define amask(a) ({ uint64_t __r; __asm__ ("amask %1,%0" : "=r" (__r) : "rI" (a)); __r; })
+#define implver() ({ uint64_t __r; __asm__ ("implver %0" : "=r" (__r)); __r; })
+#define rpcc() ({ uint64_t __r; __asm__ volatile ("rpcc %0" : "=r" (__r)); __r; })
#endif
-#define wh64(p) asm volatile("wh64 (%0)" : : "r"(p) : "memory")
+#define wh64(p) __asm__ volatile("wh64 (%0)" : : "r"(p) : "memory")
#if GNUC_PREREQ(3,3) && defined(__alpha_max__)
#define minub8 __builtin_alpha_minub8
@@ -136,19 +136,19 @@ struct unaligned_long { uint64_t l; } __attribute__((packed));
#define unpkbl __builtin_alpha_unpkbl
#define unpkbw __builtin_alpha_unpkbw
#else
-#define minub8(a, b) ({ uint64_t __r; asm (".arch ev6; minub8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
-#define minsb8(a, b) ({ uint64_t __r; asm (".arch ev6; minsb8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
-#define minuw4(a, b) ({ uint64_t __r; asm (".arch ev6; minuw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
-#define minsw4(a, b) ({ uint64_t __r; asm (".arch ev6; minsw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
-#define maxub8(a, b) ({ uint64_t __r; asm (".arch ev6; maxub8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
-#define maxsb8(a, b) ({ uint64_t __r; asm (".arch ev6; maxsb8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
-#define maxuw4(a, b) ({ uint64_t __r; asm (".arch ev6; maxuw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
-#define maxsw4(a, b) ({ uint64_t __r; asm (".arch ev6; maxsw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
-#define perr(a, b) ({ uint64_t __r; asm (".arch ev6; perr %r1,%r2,%0" : "=r" (__r) : "%rJ" (a), "rJ" (b)); __r; })
-#define pklb(a) ({ uint64_t __r; asm (".arch ev6; pklb %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })
-#define pkwb(a) ({ uint64_t __r; asm (".arch ev6; pkwb %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })
-#define unpkbl(a) ({ uint64_t __r; asm (".arch ev6; unpkbl %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })
-#define unpkbw(a) ({ uint64_t __r; asm (".arch ev6; unpkbw %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })
+#define minub8(a, b) ({ uint64_t __r; __asm__ (".arch ev6; minub8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
+#define minsb8(a, b) ({ uint64_t __r; __asm__ (".arch ev6; minsb8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
+#define minuw4(a, b) ({ uint64_t __r; __asm__ (".arch ev6; minuw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
+#define minsw4(a, b) ({ uint64_t __r; __asm__ (".arch ev6; minsw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
+#define maxub8(a, b) ({ uint64_t __r; __asm__ (".arch ev6; maxub8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
+#define maxsb8(a, b) ({ uint64_t __r; __asm__ (".arch ev6; maxsb8 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
+#define maxuw4(a, b) ({ uint64_t __r; __asm__ (".arch ev6; maxuw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
+#define maxsw4(a, b) ({ uint64_t __r; __asm__ (".arch ev6; maxsw4 %r1,%2,%0" : "=r" (__r) : "%rJ" (a), "rI" (b)); __r; })
+#define perr(a, b) ({ uint64_t __r; __asm__ (".arch ev6; perr %r1,%r2,%0" : "=r" (__r) : "%rJ" (a), "rJ" (b)); __r; })
+#define pklb(a) ({ uint64_t __r; __asm__ (".arch ev6; pklb %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })
+#define pkwb(a) ({ uint64_t __r; __asm__ (".arch ev6; pkwb %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })
+#define unpkbl(a) ({ uint64_t __r; __asm__ (".arch ev6; unpkbl %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })
+#define unpkbw(a) ({ uint64_t __r; __asm__ (".arch ev6; unpkbw %r1,%0" : "=r" (__r) : "rJ" (a)); __r; })
#endif
#elif defined(__DECC) /* Digital/Compaq/hp "ccc" compiler */
@@ -158,31 +158,31 @@ struct unaligned_long { uint64_t l; } __attribute__((packed));
#define ldl(p) (*(const int32_t *) (p))
#define stq(l, p) do { *(uint64_t *) (p) = (l); } while (0)
#define stl(l, p) do { *(int32_t *) (p) = (l); } while (0)
-#define ldq_u(a) asm ("ldq_u %v0,0(%a0)", a)
+#define ldq_u(a) __asm__ ("ldq_u %v0,0(%a0)", a)
#define uldq(a) (*(const __unaligned uint64_t *) (a))
-#define cmpbge(a, b) asm ("cmpbge %a0,%a1,%v0", a, b)
-#define extql(a, b) asm ("extql %a0,%a1,%v0", a, b)
-#define extwl(a, b) asm ("extwl %a0,%a1,%v0", a, b)
-#define extqh(a, b) asm ("extqh %a0,%a1,%v0", a, b)
-#define zap(a, b) asm ("zap %a0,%a1,%v0", a, b)
-#define zapnot(a, b) asm ("zapnot %a0,%a1,%v0", a, b)
-#define amask(a) asm ("amask %a0,%v0", a)
-#define implver() asm ("implver %v0")
-#define rpcc() asm ("rpcc %v0")
-#define minub8(a, b) asm ("minub8 %a0,%a1,%v0", a, b)
-#define minsb8(a, b) asm ("minsb8 %a0,%a1,%v0", a, b)
-#define minuw4(a, b) asm ("minuw4 %a0,%a1,%v0", a, b)
-#define minsw4(a, b) asm ("minsw4 %a0,%a1,%v0", a, b)
-#define maxub8(a, b) asm ("maxub8 %a0,%a1,%v0", a, b)
-#define maxsb8(a, b) asm ("maxsb8 %a0,%a1,%v0", a, b)
-#define maxuw4(a, b) asm ("maxuw4 %a0,%a1,%v0", a, b)
-#define maxsw4(a, b) asm ("maxsw4 %a0,%a1,%v0", a, b)
-#define perr(a, b) asm ("perr %a0,%a1,%v0", a, b)
-#define pklb(a) asm ("pklb %a0,%v0", a)
-#define pkwb(a) asm ("pkwb %a0,%v0", a)
-#define unpkbl(a) asm ("unpkbl %a0,%v0", a)
-#define unpkbw(a) asm ("unpkbw %a0,%v0", a)
-#define wh64(a) asm ("wh64 %a0", a)
+#define cmpbge(a, b) __asm__ ("cmpbge %a0,%a1,%v0", a, b)
+#define extql(a, b) __asm__ ("extql %a0,%a1,%v0", a, b)
+#define extwl(a, b) __asm__ ("extwl %a0,%a1,%v0", a, b)
+#define extqh(a, b) __asm__ ("extqh %a0,%a1,%v0", a, b)
+#define zap(a, b) __asm__ ("zap %a0,%a1,%v0", a, b)
+#define zapnot(a, b) __asm__ ("zapnot %a0,%a1,%v0", a, b)
+#define amask(a) __asm__ ("amask %a0,%v0", a)
+#define implver() __asm__ ("implver %v0")
+#define rpcc() __asm__ ("rpcc %v0")
+#define minub8(a, b) __asm__ ("minub8 %a0,%a1,%v0", a, b)
+#define minsb8(a, b) __asm__ ("minsb8 %a0,%a1,%v0", a, b)
+#define minuw4(a, b) __asm__ ("minuw4 %a0,%a1,%v0", a, b)
+#define minsw4(a, b) __asm__ ("minsw4 %a0,%a1,%v0", a, b)
+#define maxub8(a, b) __asm__ ("maxub8 %a0,%a1,%v0", a, b)
+#define maxsb8(a, b) __asm__ ("maxsb8 %a0,%a1,%v0", a, b)
+#define maxuw4(a, b) __asm__ ("maxuw4 %a0,%a1,%v0", a, b)
+#define maxsw4(a, b) __asm__ ("maxsw4 %a0,%a1,%v0", a, b)
+#define perr(a, b) __asm__ ("perr %a0,%a1,%v0", a, b)
+#define pklb(a) __asm__ ("pklb %a0,%v0", a)
+#define pkwb(a) __asm__ ("pkwb %a0,%v0", a)
+#define unpkbl(a) __asm__ ("unpkbl %a0,%v0", a)
+#define unpkbw(a) __asm__ ("unpkbw %a0,%v0", a)
+#define wh64(a) __asm__ ("wh64 %a0", a)
#else
#error "Unknown compiler!"