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 /libavutil/common.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 'libavutil/common.h')
-rw-r--r-- | libavutil/common.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavutil/common.h b/libavutil/common.h index 9c78804273..7ceaf33890 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -154,7 +154,7 @@ static inline av_const int mid_pred(int a, int b, int c) { #ifdef HAVE_CMOV int i=b; - asm volatile( + __asm__ volatile( "cmp %2, %1 \n\t" "cmovg %1, %0 \n\t" "cmovg %2, %1 \n\t" @@ -327,7 +327,7 @@ static inline av_pure int ff_get_fourcc(const char *s){ static inline uint64_t read_time(void) { uint64_t a, d; - asm volatile("rdtsc\n\t" + __asm__ volatile("rdtsc\n\t" : "=a" (a), "=d" (d)); return (d << 32) | (a & 0xffffffff); } @@ -335,7 +335,7 @@ static inline uint64_t read_time(void) static inline long long read_time(void) { long long l; - asm volatile("rdtsc\n\t" + __asm__ volatile("rdtsc\n\t" : "=A" (l)); return l; } @@ -349,7 +349,7 @@ static inline uint64_t read_time(void) } p; unsigned long long c; } t; - asm volatile ("%0=cycles; %1=cycles2;" : "=d" (t.p.lo), "=d" (t.p.hi)); + __asm__ volatile ("%0=cycles; %1=cycles2;" : "=d" (t.p.lo), "=d" (t.p.hi)); return t.c; } #else //FIXME check ppc64 @@ -358,7 +358,7 @@ static inline uint64_t read_time(void) uint32_t tbu, tbl, temp; /* from section 2.2.1 of the 32-bit PowerPC PEM */ - asm volatile( + __asm__ volatile( "1:\n" "mftbu %2\n" "mftb %0\n" |