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/ppc | |
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/ppc')
-rw-r--r-- | libavcodec/ppc/check_altivec.c | 2 | ||||
-rw-r--r-- | libavcodec/ppc/dsputil_ppc.c | 8 | ||||
-rw-r--r-- | libavcodec/ppc/dsputil_ppc.h | 24 | ||||
-rw-r--r-- | libavcodec/ppc/gcc_fixes.h | 2 | ||||
-rw-r--r-- | libavcodec/ppc/mathops.h | 4 |
5 files changed, 20 insertions, 20 deletions
diff --git a/libavcodec/ppc/check_altivec.c b/libavcodec/ppc/check_altivec.c index bc36ad3e36..417c768df4 100644 --- a/libavcodec/ppc/check_altivec.c +++ b/libavcodec/ppc/check_altivec.c @@ -66,7 +66,7 @@ int has_altivec(void) #elif defined(RUNTIME_CPUDETECT) int proc_ver; // Support of mfspr PVR emulation added in Linux 2.6.17. - asm volatile("mfspr %0, 287" : "=r" (proc_ver)); + __asm__ volatile("mfspr %0, 287" : "=r" (proc_ver)); proc_ver >>= 16; if (proc_ver & 0x8000 || proc_ver == 0x000c || diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c index bc569bf284..1b83b0219d 100644 --- a/libavcodec/ppc/dsputil_ppc.c +++ b/libavcodec/ppc/dsputil_ppc.c @@ -148,7 +148,7 @@ POWERPC_PERF_START_COUNT(powerpc_clear_blocks_dcbz32, 1); 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 @@ POWERPC_PERF_START_COUNT(powerpc_clear_blocks_dcbz128, 1); } 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 @@ long check_dcbzl_effect(void) /* 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 @@ static void prefetch_ppc(void *mem, int stride, int h) { 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); } diff --git a/libavcodec/ppc/dsputil_ppc.h b/libavcodec/ppc/dsputil_ppc.h index 0fc8b3c377..578c96120f 100644 --- a/libavcodec/ppc/dsputil_ppc.h +++ b/libavcodec/ppc/dsputil_ppc.h @@ -70,36 +70,36 @@ extern unsigned long long perfdata[POWERPC_NUM_PMC_ENABLED][powerpc_perf_total][ #ifndef HAVE_PPC64 #define POWERP_PMC_DATATYPE unsigned long -#define POWERPC_GET_PMC1(a) asm volatile("mfspr %0, 937" : "=r" (a)) -#define POWERPC_GET_PMC2(a) asm volatile("mfspr %0, 938" : "=r" (a)) +#define POWERPC_GET_PMC1(a) __asm__ volatile("mfspr %0, 937" : "=r" (a)) +#define POWERPC_GET_PMC2(a) __asm__ volatile("mfspr %0, 938" : "=r" (a)) #if (POWERPC_NUM_PMC_ENABLED > 2) -#define POWERPC_GET_PMC3(a) asm volatile("mfspr %0, 941" : "=r" (a)) -#define POWERPC_GET_PMC4(a) asm volatile("mfspr %0, 942" : "=r" (a)) +#define POWERPC_GET_PMC3(a) __asm__ volatile("mfspr %0, 941" : "=r" (a)) +#define POWERPC_GET_PMC4(a) __asm__ volatile("mfspr %0, 942" : "=r" (a)) #else #define POWERPC_GET_PMC3(a) do {} while (0) #define POWERPC_GET_PMC4(a) do {} while (0) #endif #if (POWERPC_NUM_PMC_ENABLED > 4) -#define POWERPC_GET_PMC5(a) asm volatile("mfspr %0, 929" : "=r" (a)) -#define POWERPC_GET_PMC6(a) asm volatile("mfspr %0, 930" : "=r" (a)) +#define POWERPC_GET_PMC5(a) __asm__ volatile("mfspr %0, 929" : "=r" (a)) +#define POWERPC_GET_PMC6(a) __asm__ volatile("mfspr %0, 930" : "=r" (a)) #else #define POWERPC_GET_PMC5(a) do {} while (0) #define POWERPC_GET_PMC6(a) do {} while (0) #endif #else /* HAVE_PPC64 */ #define POWERP_PMC_DATATYPE unsigned long long -#define POWERPC_GET_PMC1(a) asm volatile("mfspr %0, 771" : "=r" (a)) -#define POWERPC_GET_PMC2(a) asm volatile("mfspr %0, 772" : "=r" (a)) +#define POWERPC_GET_PMC1(a) __asm__ volatile("mfspr %0, 771" : "=r" (a)) +#define POWERPC_GET_PMC2(a) __asm__ volatile("mfspr %0, 772" : "=r" (a)) #if (POWERPC_NUM_PMC_ENABLED > 2) -#define POWERPC_GET_PMC3(a) asm volatile("mfspr %0, 773" : "=r" (a)) -#define POWERPC_GET_PMC4(a) asm volatile("mfspr %0, 774" : "=r" (a)) +#define POWERPC_GET_PMC3(a) __asm__ volatile("mfspr %0, 773" : "=r" (a)) +#define POWERPC_GET_PMC4(a) __asm__ volatile("mfspr %0, 774" : "=r" (a)) #else #define POWERPC_GET_PMC3(a) do {} while (0) #define POWERPC_GET_PMC4(a) do {} while (0) #endif #if (POWERPC_NUM_PMC_ENABLED > 4) -#define POWERPC_GET_PMC5(a) asm volatile("mfspr %0, 775" : "=r" (a)) -#define POWERPC_GET_PMC6(a) asm volatile("mfspr %0, 776" : "=r" (a)) +#define POWERPC_GET_PMC5(a) __asm__ volatile("mfspr %0, 775" : "=r" (a)) +#define POWERPC_GET_PMC6(a) __asm__ volatile("mfspr %0, 776" : "=r" (a)) #else #define POWERPC_GET_PMC5(a) do {} while (0) #define POWERPC_GET_PMC6(a) do {} while (0) diff --git a/libavcodec/ppc/gcc_fixes.h b/libavcodec/ppc/gcc_fixes.h index 01b1c18567..efa7a576cc 100644 --- a/libavcodec/ppc/gcc_fixes.h +++ b/libavcodec/ppc/gcc_fixes.h @@ -32,7 +32,7 @@ #if (__GNUC__ < 4) # define REG_v(a) #else -# define REG_v(a) asm ( #a ) +# define REG_v(a) __asm__ ( #a ) #endif #if (__GNUC__ == 3 && __GNUC_MINOR__ < 3) diff --git a/libavcodec/ppc/mathops.h b/libavcodec/ppc/mathops.h index b530ce5523..776ee62eca 100644 --- a/libavcodec/ppc/mathops.h +++ b/libavcodec/ppc/mathops.h @@ -26,12 +26,12 @@ #if defined(ARCH_POWERPC_405) /* signed 16x16 -> 32 multiply add accumulate */ #define MAC16(rt, ra, rb) \ - asm ("maclhw %0, %2, %3" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb)); + __asm__ ("maclhw %0, %2, %3" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb)); /* signed 16x16 -> 32 multiply */ #define MUL16(ra, rb) \ ({ int __rt; \ - asm ("mullhw %0, %1, %2" : "=r" (__rt) : "r" (ra), "r" (rb)); \ + __asm__ ("mullhw %0, %1, %2" : "=r" (__rt) : "r" (ra), "r" (rb)); \ __rt; }) #endif |