Mercurial > libavcodec.hg
diff i386/vc1dsp_mmx.c @ 8031:eebc7209c47f libavcodec
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.
author | flameeyes |
---|---|
date | Thu, 16 Oct 2008 13:34:09 +0000 |
parents | d38acad6d4bb |
children |
line wrap: on
line diff
--- a/i386/vc1dsp_mmx.c Wed Oct 15 08:01:54 2008 +0000 +++ b/i386/vc1dsp_mmx.c Thu Oct 16 13:34:09 2008 +0000 @@ -74,7 +74,7 @@ const uint8_t *src, x86_reg stride, int rnd, int64_t shift) { - asm volatile( + __asm__ volatile( "mov $3, %%"REG_c" \n\t" LOAD_ROUNDER_MMX("%5") "movq "MANGLE(ff_pw_9)", %%mm6 \n\t" @@ -114,7 +114,7 @@ src -= 1; rnd -= (-1+9+9-1)*1024; /* Add -1024 bias */ - asm volatile( + __asm__ volatile( LOAD_ROUNDER_MMX("%4") "movq "MANGLE(ff_pw_128)", %%mm6\n\t" "movq "MANGLE(ff_pw_9)", %%mm5 \n\t" @@ -155,7 +155,7 @@ x86_reg stride, int rnd, x86_reg offset) { rnd = 8-rnd; - asm volatile( + __asm__ volatile( "mov $8, %%"REG_c" \n\t" LOAD_ROUNDER_MMX("%5") "movq "MANGLE(ff_pw_9)", %%mm6\n\t" @@ -264,7 +264,7 @@ { \ int h = 8; \ src -= src_stride; \ - asm volatile( \ + __asm__ volatile( \ LOAD_ROUNDER_MMX("%5") \ "movq "MANGLE(ff_pw_53)", %%mm5\n\t" \ "movq "MANGLE(ff_pw_18)", %%mm6\n\t" \ @@ -320,7 +320,7 @@ int h = 8; \ src -= 1; \ rnd -= (-4+58+13-3)*256; /* Add -256 bias */ \ - asm volatile( \ + __asm__ volatile( \ LOAD_ROUNDER_MMX("%4") \ "movq "MANGLE(ff_pw_18)", %%mm6 \n\t" \ "movq "MANGLE(ff_pw_53)", %%mm5 \n\t" \ @@ -358,7 +358,7 @@ int h = 8; \ src -= offset; \ rnd = 32-rnd; \ - asm volatile ( \ + __asm__ volatile ( \ LOAD_ROUNDER_MMX("%6") \ "movq "MANGLE(ff_pw_53)", %%mm5 \n\t" \ "movq "MANGLE(ff_pw_18)", %%mm6 \n\t" \ @@ -412,7 +412,7 @@ static const vc1_mspel_mc_filter_8bits vc1_put_shift_8bits[] = { NULL, vc1_put_shift1_mmx, vc1_put_shift2_mmx, vc1_put_shift3_mmx }; - asm volatile( + __asm__ volatile( "pxor %%mm0, %%mm0 \n\t" ::: "memory" );