diff options
author | Diego Pettenò <flameeyes@gmail.com> | 2008-10-16 13:34:09 +0000 |
---|---|---|
committer | Diego Pettenò <flameeyes@gmail.com> | 2008-10-16 13:34:09 +0000 |
commit | be449fca79a3b0394143f0a77c99784e65868d9f (patch) | |
tree | 5c5b2bbfe648467292b30cc501265e556acab101 /libavcodec/armv4l/mathops.h | |
parent | a14b362fc650a5e036d413033d9709a526662d89 (diff) | |
download | ffmpeg-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/armv4l/mathops.h')
-rw-r--r-- | libavcodec/armv4l/mathops.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/armv4l/mathops.h b/libavcodec/armv4l/mathops.h index 9602cd4f9f..5364833b78 100644 --- a/libavcodec/armv4l/mathops.h +++ b/libavcodec/armv4l/mathops.h @@ -25,7 +25,7 @@ #ifdef FRAC_BITS # define MULL(a, b) \ ({ int lo, hi;\ - asm("smull %0, %1, %2, %3 \n\t"\ + __asm__("smull %0, %1, %2, %3 \n\t"\ "mov %0, %0, lsr %4\n\t"\ "add %1, %0, %1, lsl %5\n\t"\ : "=&r"(lo), "=&r"(hi)\ @@ -37,21 +37,21 @@ static inline av_const int MULH(int a, int b) { int r; - asm ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b)); + __asm__ ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b)); return r; } #define MULH MULH #else #define MULH(a, b) \ ({ int lo, hi;\ - asm ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));\ + __asm__ ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));\ hi; }) #endif static inline av_const int64_t MUL64(int a, int b) { union { uint64_t x; unsigned hl[2]; } x; - asm ("smull %0, %1, %2, %3" + __asm__ ("smull %0, %1, %2, %3" : "=r"(x.hl[0]), "=r"(x.hl[1]) : "r"(a), "r"(b)); return x.x; } @@ -60,7 +60,7 @@ static inline av_const int64_t MUL64(int a, int b) static inline av_const int64_t MAC64(int64_t d, int a, int b) { union { uint64_t x; unsigned hl[2]; } x = { d }; - asm ("smlal %0, %1, %2, %3" + __asm__ ("smlal %0, %1, %2, %3" : "+r"(x.hl[0]), "+r"(x.hl[1]) : "r"(a), "r"(b)); return x.x; } @@ -71,11 +71,11 @@ static inline av_const int64_t MAC64(int64_t d, int a, int b) /* signed 16x16 -> 32 multiply add accumulate */ # define MAC16(rt, ra, rb) \ - asm ("smlabb %0, %2, %3, %0" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb)); + __asm__ ("smlabb %0, %2, %3, %0" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb)); /* signed 16x16 -> 32 multiply */ # define MUL16(ra, rb) \ ({ int __rt; \ - asm ("smulbb %0, %1, %2" : "=r" (__rt) : "r" (ra), "r" (rb)); \ + __asm__ ("smulbb %0, %1, %2" : "=r" (__rt) : "r" (ra), "r" (rb)); \ __rt; }) #endif |