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/i386/fft_sse.c | |
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/i386/fft_sse.c')
-rw-r--r-- | libavcodec/i386/fft_sse.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/i386/fft_sse.c b/libavcodec/i386/fft_sse.c index 924677008c..deced3b929 100644 --- a/libavcodec/i386/fft_sse.c +++ b/libavcodec/i386/fft_sse.c @@ -36,7 +36,7 @@ void ff_fft_calc_sse(FFTContext *s, FFTComplex *z) if(n <= 16) { x86_reg i = -8*n; - asm volatile( + __asm__ volatile( "1: \n" "movaps (%0,%1), %%xmm0 \n" "movaps %%xmm0, %%xmm1 \n" @@ -58,7 +58,7 @@ void ff_fft_permute_sse(FFTContext *s, FFTComplex *z) int n = 1 << s->nbits; int i; for(i=0; i<n; i+=2) { - asm volatile( + __asm__ volatile( "movaps %2, %%xmm0 \n" "movlps %%xmm0, %0 \n" "movhps %%xmm0, %1 \n" @@ -84,7 +84,7 @@ void ff_imdct_half_sse(MDCTContext *s, FFTSample *output, const FFTSample *input /* pre rotation */ for(k=n8-2; k>=0; k-=2) { - asm volatile( + __asm__ volatile( "movaps (%2,%1,2), %%xmm0 \n" // { z[k].re, z[k].im, z[k+1].re, z[k+1].im } "movaps -16(%2,%0,2), %%xmm1 \n" // { z[-k-2].re, z[-k-2].im, z[-k-1].re, z[-k-1].im } "movaps %%xmm0, %%xmm2 \n" @@ -111,7 +111,7 @@ void ff_imdct_half_sse(MDCTContext *s, FFTSample *output, const FFTSample *input #ifdef ARCH_X86_64 // if we have enough regs, don't let gcc make the luts latency-bound // but if not, latency is faster than spilling - asm("movlps %%xmm0, %0 \n" + __asm__("movlps %%xmm0, %0 \n" "movhps %%xmm0, %1 \n" "movlps %%xmm1, %2 \n" "movhps %%xmm1, %3 \n" @@ -121,10 +121,10 @@ void ff_imdct_half_sse(MDCTContext *s, FFTSample *output, const FFTSample *input "=m"(z[revtab[ k+1]]) ); #else - asm("movlps %%xmm0, %0" :"=m"(z[revtab[-k-2]])); - asm("movhps %%xmm0, %0" :"=m"(z[revtab[-k-1]])); - asm("movlps %%xmm1, %0" :"=m"(z[revtab[ k ]])); - asm("movhps %%xmm1, %0" :"=m"(z[revtab[ k+1]])); + __asm__("movlps %%xmm0, %0" :"=m"(z[revtab[-k-2]])); + __asm__("movhps %%xmm0, %0" :"=m"(z[revtab[-k-1]])); + __asm__("movlps %%xmm1, %0" :"=m"(z[revtab[ k ]])); + __asm__("movhps %%xmm1, %0" :"=m"(z[revtab[ k+1]])); #endif } @@ -146,7 +146,7 @@ void ff_imdct_half_sse(MDCTContext *s, FFTSample *output, const FFTSample *input j = -n2; k = n2-16; - asm volatile( + __asm__ volatile( "1: \n" CMUL(%0, %%xmm0, %%xmm1) CMUL(%1, %%xmm4, %%xmm5) @@ -181,7 +181,7 @@ void ff_imdct_calc_sse(MDCTContext *s, FFTSample *output, const FFTSample *input j = -n; k = n-16; - asm volatile( + __asm__ volatile( "movaps %4, %%xmm7 \n" "1: \n" "movaps (%2,%1), %%xmm0 \n" |