Mercurial > libavcodec.hg
diff ppc/dsputil_ppc.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 | 3a93377e8b76 |
children | 0d108ec85620 |
line wrap: on
line diff
--- a/ppc/dsputil_ppc.c Wed Oct 15 08:01:54 2008 +0000 +++ b/ppc/dsputil_ppc.c Thu Oct 16 13:34:09 2008 +0000 @@ -148,7 +148,7 @@ i += 16; } for ( ; i < sizeof(DCTELEM)*6*64-31 ; i += 32) { - asm volatile("dcbz %0,%1" : : "b" (blocks), "r" (i) : "memory"); + __asm__ volatile("dcbz %0,%1" : : "b" (blocks), "r" (i) : "memory"); } if (misal) { ((unsigned long*)blocks)[188] = 0L; @@ -181,7 +181,7 @@ } else for ( ; i < sizeof(DCTELEM)*6*64 ; i += 128) { - asm volatile("dcbzl %0,%1" : : "b" (blocks), "r" (i) : "memory"); + __asm__ volatile("dcbzl %0,%1" : : "b" (blocks), "r" (i) : "memory"); } #else memset(blocks, 0, sizeof(DCTELEM)*6*64); @@ -219,7 +219,7 @@ /* below the constraint "b" seems to mean "Address base register" in gcc-3.3 / RS/6000 speaks. seems to avoid using r0, so.... */ - asm volatile("dcbzl %0, %1" : : "b" (fakedata_middle), "r" (zero)); + __asm__ volatile("dcbzl %0, %1" : : "b" (fakedata_middle), "r" (zero)); for (i = 0; i < 1024 ; i ++) { if (fakedata[i] == (char)0) @@ -241,7 +241,7 @@ { register const uint8_t *p = mem; do { - asm volatile ("dcbt 0,%0" : : "r" (p)); + __asm__ volatile ("dcbt 0,%0" : : "r" (p)); p+= stride; } while(--h); }