diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-10-16 18:59:27 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-10-16 18:59:27 +0000 |
commit | 6b52a2e974ba3c3065d13a16cc2fa69f96745d0d (patch) | |
tree | dac114864d767dcc442978838b4b3449af30010b | |
parent | 629db77d89d6bdead91fd18faa6445632a750e94 (diff) | |
download | mpv-6b52a2e974ba3c3065d13a16cc2fa69f96745d0d.tar.bz2 mpv-6b52a2e974ba3c3065d13a16cc2fa69f96745d0d.tar.xz |
Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg.
Neither variant is valid C99 syntax, but __asm__ is the most portable variant.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27788 b3059339-0415-0410-9bf9-f77b7e298cf2
43 files changed, 238 insertions, 243 deletions
diff --git a/TOOLS/fastmemcpybench.c b/TOOLS/fastmemcpybench.c index 1e3cc14ce3..1ce5434bb8 100644 --- a/TOOLS/fastmemcpybench.c +++ b/TOOLS/fastmemcpybench.c @@ -86,7 +86,7 @@ static unsigned int GetTimer(){ static inline unsigned long long int read_tsc( void ) { unsigned long long int retval; - __asm __volatile ("rdtsc":"=A"(retval)::"memory"); + __asm__ __volatile ("rdtsc":"=A"(retval)::"memory"); return retval; } @@ -2124,8 +2124,8 @@ EOF cat > $TMPC << EOF int main(void) { unsigned long ver, mask; - asm ("implver %0" : "=r" (ver)); - asm ("amask %1, %0" : "=r" (mask) : "r" (-1)); + __asm__ ("implver %0" : "=r" (ver)); + __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1)); printf("%ld-%x\n", ver, ~mask); return 0; } @@ -2374,7 +2374,7 @@ echocheck ".align is a power of two" if test "$_asmalign_pot" = auto ; then _asmalign_pot=no cat > $TMPC << EOF -int main(void) { asm (".align 3"); return 0; } +int main(void) { __asm__ (".align 3"); return 0; } EOF cc_check && _asmalign_pot=yes fi diff --git a/cpudetect.c b/cpudetect.c index 6d18212662..488061cd85 100644 --- a/cpudetect.c +++ b/cpudetect.c @@ -85,14 +85,14 @@ static void do_cpuid(unsigned int ax, unsigned int *p) { #if 0 - __asm __volatile( + __asm__ __volatile( "cpuid;" : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) : "0" (ax) ); #else // code from libavcodec: - __asm __volatile + __asm__ __volatile__ ("mov %%"REG_b", %%"REG_S"\n\t" "cpuid\n\t" "xchg %%"REG_b", %%"REG_S @@ -400,7 +400,7 @@ static void check_os_katmai_support( void ) if ( gCpuCaps.hasSSE ) { mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " ); exc_fil = SetUnhandledExceptionFilter(win32_sig_handler_sse); - __asm __volatile ("xorps %xmm0, %xmm0"); + __asm__ __volatile ("xorps %xmm0, %xmm0"); SetUnhandledExceptionFilter(exc_fil); mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" ); } @@ -409,7 +409,7 @@ static void check_os_katmai_support( void ) if ( gCpuCaps.hasSSE ) { mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " ); DosSetExceptionHandler( &RegRec ); - __asm __volatile ("xorps %xmm0, %xmm0"); + __asm__ __volatile ("xorps %xmm0, %xmm0"); DosUnsetExceptionHandler( &RegRec ); mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" ); } @@ -432,8 +432,8 @@ static void check_os_katmai_support( void ) if ( gCpuCaps.hasSSE ) { mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " ); -// __asm __volatile ("xorps %%xmm0, %%xmm0"); - __asm __volatile ("xorps %xmm0, %xmm0"); +// __asm__ __volatile ("xorps %%xmm0, %%xmm0"); + __asm__ __volatile ("xorps %xmm0, %xmm0"); mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" ); } @@ -532,7 +532,7 @@ void GetCpuCaps( CpuCaps *caps) } else { canjump = 1; - asm volatile ("mtspr 256, %0\n\t" + __asm__ volatile ("mtspr 256, %0\n\t" "vand %%v0, %%v0, %%v0" : : "r" (-1)); @@ -49,9 +49,9 @@ cpuid(int func) { cpuid_regs_t regs; #define CPUID ".byte 0x0f, 0xa2; " #ifdef __x86_64__ - asm("mov %%rbx, %%rsi\n\t" + __asm__("mov %%rbx, %%rsi\n\t" #else - asm("mov %%ebx, %%esi\n\t" + __asm__("mov %%ebx, %%esi\n\t" #endif CPUID"\n\t" #ifdef __x86_64__ @@ -70,7 +70,7 @@ rdtsc(void) { uint64_t i; #define RDTSC ".byte 0x0f, 0x31; " - asm volatile (RDTSC : "=A"(i) : ); + __asm__ volatile (RDTSC : "=A"(i) : ); return i; } diff --git a/drivers/radeon_vid.c b/drivers/radeon_vid.c index 5a6bafd7dc..f07b7bbeb6 100644 --- a/drivers/radeon_vid.c +++ b/drivers/radeon_vid.c @@ -129,7 +129,7 @@ static int swap_fourcc __initdata = 0; static inline double FastSin(double x) { register double res; - __asm __volatile("fsin":"=t"(res):"0"(x)); + __asm__ __volatile("fsin":"=t"(res):"0"(x)); return res; } #undef sin @@ -138,7 +138,7 @@ static inline double FastSin(double x) static inline double FastCos(double x) { register double res; - __asm __volatile("fcos":"=t"(res):"0"(x)); + __asm__ __volatile("fcos":"=t"(res):"0"(x)); return res; } #undef cos diff --git a/liba52/downmix.c b/liba52/downmix.c index 13220db719..ffb149b760 100644 --- a/liba52/downmix.c +++ b/liba52/downmix.c @@ -689,7 +689,7 @@ void upmix_C (sample_t * samples, int acmod, int output) #if defined(ARCH_X86) || defined(ARCH_X86_64) static void mix2to1_SSE (sample_t * dest, sample_t * src, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %2, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -712,7 +712,7 @@ static void mix2to1_SSE (sample_t * dest, sample_t * src, sample_t bias) static void mix3to1_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -733,7 +733,7 @@ static void mix3to1_SSE (sample_t * samples, sample_t bias) static void mix4to1_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -755,7 +755,7 @@ static void mix4to1_SSE (sample_t * samples, sample_t bias) static void mix5to1_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -778,7 +778,7 @@ static void mix5to1_SSE (sample_t * samples, sample_t bias) static void mix3to2_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -801,7 +801,7 @@ static void mix3to2_SSE (sample_t * samples, sample_t bias) static void mix21to2_SSE (sample_t * left, sample_t * right, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %2, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -824,7 +824,7 @@ static void mix21to2_SSE (sample_t * left, sample_t * right, sample_t bias) static void mix21toS_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -848,7 +848,7 @@ static void mix21toS_SSE (sample_t * samples, sample_t bias) static void mix31to2_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -872,7 +872,7 @@ static void mix31to2_SSE (sample_t * samples, sample_t bias) static void mix31toS_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -898,7 +898,7 @@ static void mix31toS_SSE (sample_t * samples, sample_t bias) static void mix22toS_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -923,7 +923,7 @@ static void mix22toS_SSE (sample_t * samples, sample_t bias) static void mix32to2_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -947,7 +947,7 @@ static void mix32to2_SSE (sample_t * samples, sample_t bias) static void mix32toS_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -974,7 +974,7 @@ static void mix32toS_SSE (sample_t * samples, sample_t bias) static void move2to1_SSE (sample_t * src, sample_t * dest, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %2, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -997,7 +997,7 @@ static void move2to1_SSE (sample_t * src, sample_t * dest, sample_t bias) static void zero_MMX(sample_t * samples) { - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" "pxor %%mm0, %%mm0 \n\t" ASMALIGN(4) @@ -1223,7 +1223,7 @@ static void upmix_MMX (sample_t * samples, int acmod, int output) static void mix2to1_3dnow (sample_t * dest, sample_t * src, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %2, %%mm7 \n\t" "punpckldq %2, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1254,7 +1254,7 @@ static void mix2to1_3dnow (sample_t * dest, sample_t * src, sample_t bias) static void mix3to1_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1281,7 +1281,7 @@ static void mix3to1_3dnow (sample_t * samples, sample_t bias) static void mix4to1_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1310,7 +1310,7 @@ static void mix4to1_3dnow (sample_t * samples, sample_t bias) static void mix5to1_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1341,7 +1341,7 @@ static void mix5to1_3dnow (sample_t * samples, sample_t bias) static void mix3to2_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1372,7 +1372,7 @@ static void mix3to2_3dnow (sample_t * samples, sample_t bias) static void mix21to2_3dnow (sample_t * left, sample_t * right, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %2, %%mm7 \n\t" "punpckldq %2, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1403,7 +1403,7 @@ static void mix21to2_3dnow (sample_t * left, sample_t * right, sample_t bias) static void mix21toS_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1436,7 +1436,7 @@ static void mix21toS_3dnow (sample_t * samples, sample_t bias) static void mix31to2_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1469,7 +1469,7 @@ static void mix31to2_3dnow (sample_t * samples, sample_t bias) static void mix31toS_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1506,7 +1506,7 @@ static void mix31toS_3dnow (sample_t * samples, sample_t bias) static void mix22toS_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1541,7 +1541,7 @@ static void mix22toS_3dnow (sample_t * samples, sample_t bias) static void mix32to2_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1575,7 +1575,7 @@ static void mix32to2_3dnow (sample_t * samples, sample_t bias) /* todo: should be optimized better */ static void mix32toS_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" ASMALIGN(4) "1: \n\t" @@ -1614,7 +1614,7 @@ static void mix32toS_3dnow (sample_t * samples, sample_t bias) static void move2to1_3dnow (sample_t * src, sample_t * dest, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %2, %%mm7 \n\t" "punpckldq %2, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1782,7 +1782,7 @@ static void downmix_3dnow (sample_t * samples, int acmod, int output, sample_t b memcpy (samples + 1024, samples + 768, 256 * sizeof (sample_t)); break; } - __asm __volatile("femms":::"memory"); + __asm__ volatile("femms":::"memory"); } #endif // ARCH_X86 || ARCH_X86_64 diff --git a/liba52/imdct.c b/liba52/imdct.c index 49e695a066..325461c6fd 100644 --- a/liba52/imdct.c +++ b/liba52/imdct.c @@ -750,7 +750,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) /* Pre IFFT complex multiply plus IFFT cmplx conjugate */ /* Bit reversed shuffling */ - asm volatile( + __asm__ volatile( "xor %%"REG_S", %%"REG_S" \n\t" "lea "MANGLE(bit_reverse_512)", %%"REG_a"\n\t" "mov $1008, %%"REG_D" \n\t" @@ -810,7 +810,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) /* 1. iteration */ // Note w[0][0]={1,0} - asm volatile( + __asm__ volatile( "xorps %%xmm1, %%xmm1 \n\t" "xorps %%xmm2, %%xmm2 \n\t" "mov %0, %%"REG_S" \n\t" @@ -832,7 +832,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) /* 2. iteration */ // Note w[1]={{1,0}, {0,-1}} - asm volatile( + __asm__ volatile( "movaps "MANGLE(ps111_1)", %%xmm7\n\t" // 1,1,1,-1 "mov %0, %%"REG_S" \n\t" ASMALIGN(4) @@ -860,7 +860,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) Note sseW2+32={0,0,-sqrt(2),-sqrt(2)) Note sseW2+48={1,-1,sqrt(2),-sqrt(2)) */ - asm volatile( + __asm__ volatile( "movaps 48+"MANGLE(sseW2)", %%xmm6\n\t" "movaps 16+"MANGLE(sseW2)", %%xmm7\n\t" "xorps %%xmm5, %%xmm5 \n\t" @@ -905,7 +905,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) two_m_plus_one = two_m<<1; two_m_plus_one_shl3 = (two_m_plus_one<<3); buf_offset = buf+128; - asm volatile( + __asm__ volatile( "mov %0, %%"REG_S" \n\t" ASMALIGN(4) "1: \n\t" @@ -937,7 +937,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) } /* Post IFFT complex multiply plus IFFT complex conjugate*/ - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" ASMALIGN(4) "1: \n\t" @@ -960,7 +960,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) window_ptr = a52_imdct_window; /* Window and convert to real valued signal */ - asm volatile( + __asm__ volatile( "xor %%"REG_D", %%"REG_D" \n\t" // 0 "xor %%"REG_S", %%"REG_S" \n\t" // 0 "movss %3, %%xmm2 \n\t" // bias @@ -987,7 +987,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) delay_ptr+=128; // window_ptr+=128; - asm volatile( + __asm__ volatile( "mov $1024, %%"REG_D" \n\t" // 512 "xor %%"REG_S", %%"REG_S" \n\t" // 0 "movss %3, %%xmm2 \n\t" // bias @@ -1016,7 +1016,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) /* The trailing edge of the window goes into the delay line */ delay_ptr = delay; - asm volatile( + __asm__ volatile( "xor %%"REG_D", %%"REG_D" \n\t" // 0 "xor %%"REG_S", %%"REG_S" \n\t" // 0 ASMALIGN(4) @@ -1038,7 +1038,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) delay_ptr+=128; // window_ptr-=128; - asm volatile( + __asm__ volatile( "mov $1024, %%"REG_D" \n\t" // 1024 "xor %%"REG_S", %%"REG_S" \n\t" // 0 ASMALIGN(4) diff --git a/liba52/imdct_3dnow.h b/liba52/imdct_3dnow.h index c53aeb08fd..4a54fde26e 100644 --- a/liba52/imdct_3dnow.h +++ b/liba52/imdct_3dnow.h @@ -431,7 +431,7 @@ imdct_do_512_3dnow */ FFT_128P_3DNOW (&buf[0]); -// asm volatile ("femms \n\t":::"memory"); +// __asm__ volatile ("femms \n\t":::"memory"); /* Post IFFT complex multiply plus IFFT complex conjugate*/ #if 1 @@ -489,7 +489,7 @@ imdct_do_512_3dnow /* Window and convert to real valued signal */ #if 1 - asm volatile ( + __asm__ volatile ( "movd (%0), %%mm3 \n\t" "punpckldq %%mm3, %%mm3 \n\t" :: "r" (&bias) diff --git a/liba52/liba52_changes.diff b/liba52/liba52_changes.diff index 542424ba83..e5008a77cc 100644 --- a/liba52/liba52_changes.diff +++ b/liba52/liba52_changes.diff @@ -1,6 +1,6 @@ --- include/a52.h 2006-06-12 15:04:57.000000000 +0200 +++ liba52/a52.h 2006-06-05 02:23:02.000000000 +0200 -@@ -59,4 +63,9 @@ +@@ -63,4 +63,9 @@ int a52_block (a52_state_t * state); void a52_free (a52_state_t * state); @@ -12,7 +12,7 @@ #endif /* A52_H */ --- liba52/a52_internal.h 2006-06-12 15:05:07.000000000 +0200 +++ liba52/a52_internal.h 2006-06-05 02:23:02.000000000 +0200 -@@ -103,18 +107,34 @@ +@@ -107,18 +107,34 @@ #define DELTA_BIT_NONE (2) #define DELTA_BIT_RESERVED (3) @@ -52,7 +52,7 @@ +void imdct_do_512 (sample_t * data, sample_t * delay, sample_t bias); --- liba52/bitstream.c 2006-06-12 15:05:07.000000000 +0200 +++ liba52/bitstream.c 2006-06-05 02:23:02.000000000 +0200 -@@ -31,6 +35,10 @@ +@@ -35,6 +35,10 @@ #define BUFFER_SIZE 4096 @@ -63,7 +63,7 @@ void a52_bitstream_set_ptr (a52_state_t * state, uint8_t * buf) { int align; -@@ -38,6 +46,9 @@ +@@ -42,6 +46,9 @@ align = (long)buf & 3; state->buffer_start = (uint32_t *) (buf - align); state->bits_left = 0; @@ -75,7 +75,7 @@ --- liba52/bitstream.h 2006-06-12 15:05:07.000000000 +0200 +++ liba52/bitstream.h 2006-06-05 02:23:02.000000000 +0200 -@@ -21,6 +25,42 @@ +@@ -25,6 +25,42 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -118,7 +118,7 @@ /* (stolen from the kernel) */ #ifdef WORDS_BIGENDIAN -@@ -28,7 +74,7 @@ +@@ -32,7 +74,7 @@ #else @@ -127,7 +127,7 @@ # define swab32(x) __i386_swab32(x) static inline const uint32_t __i386_swab32(uint32_t x) -@@ -39,19 +85,34 @@ +@@ -43,19 +85,34 @@ # else @@ -166,7 +166,7 @@ uint32_t result; if (num_bits < state->bits_left) { -@@ -61,10 +122,29 @@ +@@ -65,10 +122,29 @@ } return a52_bitstream_get_bh (state, num_bits); @@ -196,7 +196,7 @@ int32_t result; if (num_bits < state->bits_left) { -@@ -74,4 +154,5 @@ +@@ -78,4 +154,5 @@ } return a52_bitstream_get_bh_2 (state, num_bits); @@ -204,7 +204,7 @@ } --- liba52/downmix.c 2006-06-12 15:17:53.000000000 +0200 +++ liba52/downmix.c 2006-06-05 02:23:02.000000000 +0200 -@@ -19,18 +23,46 @@ +@@ -23,18 +23,46 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -251,7 +251,7 @@ int a52_downmix_init (int input, int flags, sample_t * level, sample_t clev, sample_t slev) { -@@ -447,7 +479,7 @@ +@@ -451,7 +479,7 @@ samples[i] = 0; } @@ -260,7 +260,7 @@ sample_t clev, sample_t slev) { switch (CONVERT (acmod, output & A52_CHANNEL_MASK)) { -@@ -559,7 +591,7 @@ +@@ -563,7 +591,7 @@ break; case CONVERT (A52_3F2R, A52_2F1R): @@ -269,7 +269,7 @@ move2to1 (samples + 768, samples + 512, bias); break; -@@ -583,12 +615,12 @@ +@@ -587,12 +615,12 @@ break; case CONVERT (A52_3F1R, A52_3F2R): @@ -284,7 +284,7 @@ { switch (CONVERT (acmod, output & A52_CHANNEL_MASK)) { -@@ -653,3 +685,1104 @@ +@@ -657,3 +685,1104 @@ goto mix_31to21; } } @@ -292,7 +292,7 @@ +#if defined(ARCH_X86) || defined(ARCH_X86_64) +static void mix2to1_SSE (sample_t * dest, sample_t * src, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %2, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -315,7 +315,7 @@ + +static void mix3to1_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -336,7 +336,7 @@ + +static void mix4to1_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -358,7 +358,7 @@ + +static void mix5to1_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -381,7 +381,7 @@ + +static void mix3to2_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -404,7 +404,7 @@ + +static void mix21to2_SSE (sample_t * left, sample_t * right, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %2, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -427,7 +427,7 @@ + +static void mix21toS_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -451,7 +451,7 @@ + +static void mix31to2_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -475,7 +475,7 @@ + +static void mix31toS_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -501,7 +501,7 @@ + +static void mix22toS_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -526,7 +526,7 @@ + +static void mix32to2_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" |