changeset 4247:2dbd637ffe05

mangle for win32 in liba52 (includes dummy mangle.h pointing to the one in main)
author atmos4
date Sat, 19 Jan 2002 05:12:34 +0000
parents 3f677202418b
children 3cdb86beebce
files liba52/imdct.c liba52/mangle.h liba52/resample.c liba52/resample_mmx.c
diffstat 4 files changed, 32 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/liba52/imdct.c	Sat Jan 19 04:47:32 2002 +0000
+++ b/liba52/imdct.c	Sat Jan 19 05:12:34 2002 +0000
@@ -37,6 +37,7 @@
 #include "a52.h"
 #include "a52_internal.h"
 #include "mm_accel.h"
+#include "mangle.h"
 
 #ifdef RUNTIME_CPUDETECT
 #undef HAVE_3DNOWEX
@@ -660,7 +661,7 @@
     /* Bit reversed shuffling */
 	asm volatile(
 		"xorl %%esi, %%esi			\n\t"
-		"leal bit_reverse_512, %%eax		\n\t"
+		"leal "MANGLE(bit_reverse_512)", %%eax	\n\t"
 		"movl $1008, %%edi			\n\t"
 		"pushl %%ebp				\n\t" //use ebp without telling gcc
 		".balign 16				\n\t"
@@ -670,10 +671,10 @@
 		"movlps 8(%0, %%esi), %%xmm1		\n\t" // XXXi
 		"movhps (%0, %%edi), %%xmm1		\n\t" // rXXi
 		"shufps $0x33, %%xmm1, %%xmm0		\n\t" // irIR
-		"movaps sseSinCos1c(%%esi), %%xmm2	\n\t"
+		"movaps "MANGLE(sseSinCos1c)"(%%esi), %%xmm2\n\t"
 		"mulps %%xmm0, %%xmm2			\n\t"
 		"shufps $0xB1, %%xmm0, %%xmm0		\n\t" // riRI
-		"mulps sseSinCos1d(%%esi), %%xmm0	\n\t"
+		"mulps "MANGLE(sseSinCos1d)"(%%esi), %%xmm0\n\t"
 		"subps %%xmm0, %%xmm2			\n\t"
 		"movzbl (%%eax), %%edx			\n\t"
 		"movzbl 1(%%eax), %%ebp			\n\t"
@@ -741,7 +742,7 @@
     /* 2. iteration */
 	// Note w[1]={{1,0}, {0,-1}}
 	asm volatile(
-		"movaps ps111_1, %%xmm7		\n\t" // 1,1,1,-1
+		"movaps "MANGLE(ps111_1)", %%xmm7\n\t" // 1,1,1,-1
 		"movl %0, %%esi			\n\t"
 		".balign 16				\n\t"
 		"1:				\n\t"
@@ -769,8 +770,8 @@
  Note sseW2+48={1,-1,sqrt(2),-sqrt(2))
 */
 	asm volatile(
-		"movaps 48+sseW2, %%xmm6	\n\t" 
-		"movaps 16+sseW2, %%xmm7	\n\t" 
+		"movaps 48+"MANGLE(sseW2)", %%xmm6\n\t" 
+		"movaps 16+"MANGLE(sseW2)", %%xmm7\n\t" 
 		"xorps %%xmm5, %%xmm5		\n\t"
 		"xorps %%xmm2, %%xmm2		\n\t"
 		"movl %0, %%esi			\n\t"
@@ -778,8 +779,8 @@
 		"1:				\n\t"
 		"movaps 32(%%esi), %%xmm2	\n\t" //r4,i4,r5,i5
 		"movaps 48(%%esi), %%xmm3	\n\t" //r6,i6,r7,i7
-		"movaps sseW2, %%xmm4		\n\t" //r4,i4,r5,i5
-		"movaps 32+sseW2, %%xmm5	\n\t" //r6,i6,r7,i7
+		"movaps "MANGLE(sseW2)", %%xmm4	\n\t" //r4,i4,r5,i5
+		"movaps 32+"MANGLE(sseW2)", %%xmm5\n\t" //r6,i6,r7,i7
 		"mulps %%xmm2, %%xmm4		\n\t"
 		"mulps %%xmm3, %%xmm5		\n\t"
 		"shufps $0xB1, %%xmm2, %%xmm2	\n\t" //i4,r4,i5,r5
@@ -844,14 +845,14 @@
 
     /* Post IFFT complex multiply  plus IFFT complex conjugate*/
 	asm volatile(
-		"movl $-1024, %%esi				\n\t"
+		"movl $-1024, %%esi			\n\t"
 		".balign 16				\n\t"
 		"1:					\n\t"
 		"movaps (%0, %%esi), %%xmm0		\n\t"
 		"movaps (%0, %%esi), %%xmm1		\n\t"
 		"shufps $0xB1, %%xmm0, %%xmm0		\n\t"
-		"mulps 1024+sseSinCos1c(%%esi), %%xmm1	\n\t"
-		"mulps 1024+sseSinCos1d(%%esi), %%xmm0	\n\t"
+		"mulps 1024+"MANGLE(sseSinCos1c)"(%%esi), %%xmm1\n\t"
+		"mulps 1024+"MANGLE(sseSinCos1d)"(%%esi), %%xmm0\n\t"
 		"addps %%xmm1, %%xmm0			\n\t"
 		"movaps %%xmm0, (%0, %%esi)		\n\t"
 		"addl $16, %%esi			\n\t"
@@ -878,7 +879,7 @@
 		"movhps -16(%0, %%edi), %%xmm1		\n\t" // ? D C ?
 		"movhps -8(%0, %%edi), %%xmm0		\n\t" // ? B A ?
 		"shufps $0x99, %%xmm1, %%xmm0		\n\t" // D C B A
-		"mulps sseWindow(%%esi), %%xmm0		\n\t"
+		"mulps "MANGLE(sseWindow)"(%%esi), %%xmm0\n\t"
 		"addps (%2, %%esi), %%xmm0		\n\t"
 		"addps %%xmm2, %%xmm0			\n\t"
 		"movaps %%xmm0, (%1, %%esi)		\n\t"
@@ -905,7 +906,7 @@
 		"movhps -16(%0, %%edi), %%xmm1		\n\t" // D ? ? C
 		"movhps -8(%0, %%edi), %%xmm0		\n\t" // B ? ? A
 		"shufps $0xCC, %%xmm1, %%xmm0		\n\t" // D C B A
-		"mulps 512+sseWindow(%%esi), %%xmm0		\n\t"
+		"mulps 512+"MANGLE(sseWindow)"(%%esi), %%xmm0\n\t"
 		"addps (%2, %%esi), %%xmm0		\n\t"
 		"addps %%xmm2, %%xmm0			\n\t"
 		"movaps %%xmm0, (%1, %%esi)		\n\t"
@@ -932,7 +933,7 @@
 		"movhps -16(%0, %%edi), %%xmm1		\n\t" // D ? ? C 
 		"movhps -8(%0, %%edi), %%xmm0		\n\t" // B ? ? A 
 		"shufps $0xCC, %%xmm1, %%xmm0		\n\t" // D C B A
-		"mulps 1024+sseWindow(%%esi), %%xmm0	\n\t"
+		"mulps 1024+"MANGLE(sseWindow)"(%%esi), %%xmm0\n\t"
 		"movaps %%xmm0, (%1, %%esi)		\n\t"
 		"addl $16, %%esi			\n\t"
 		"subl $16, %%edi			\n\t"
@@ -954,7 +955,7 @@
 		"movhps -16(%0, %%edi), %%xmm1		\n\t" // ? D C ? 
 		"movhps -8(%0, %%edi), %%xmm0		\n\t" // ? B A ? 
 		"shufps $0x99, %%xmm1, %%xmm0		\n\t" // D C B A
-		"mulps 1536+sseWindow(%%esi), %%xmm0	\n\t"
+		"mulps 1536+"MANGLE(sseWindow)"(%%esi), %%xmm0\n\t"
 		"movaps %%xmm0, (%1, %%esi)		\n\t"
 		"addl $16, %%esi			\n\t"
 		"subl $16, %%edi			\n\t"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/liba52/mangle.h	Sat Jan 19 05:12:34 2002 +0000
@@ -0,0 +1,2 @@
+#include "../mangle.h"
+
--- a/liba52/resample.c	Sat Jan 19 04:47:32 2002 +0000
+++ b/liba52/resample.c	Sat Jan 19 05:12:34 2002 +0000
@@ -9,6 +9,7 @@
 #include "a52.h"
 #include "mm_accel.h"
 #include "../config.h"
+#include "mangle.h"
 
 int (* a52_resample) (float * _f, int16_t * s16)=NULL;
 
--- a/liba52/resample_mmx.c	Sat Jan 19 04:47:32 2002 +0000
+++ b/liba52/resample_mmx.c	Sat Jan 19 05:12:34 2002 +0000
@@ -17,10 +17,10 @@
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-512, %%esi		\n\t"
-		"movq magicF2W, %%mm7		\n\t"
-		"movq wm1100, %%mm3		\n\t"
-		"movq wm0101, %%mm4		\n\t"
-		"movq wm1010, %%mm5		\n\t"
+		"movq "MANGLE(magicF2W)", %%mm7	\n\t"
+		"movq "MANGLE(wm1100)", %%mm3	\n\t"
+		"movq "MANGLE(wm0101)", %%mm4	\n\t"
+		"movq "MANGLE(wm1010)", %%mm5	\n\t"
 		"pxor %%mm6, %%mm6		\n\t"
 		"1:				\n\t"
 		"movq (%1, %%esi, 2), %%mm0	\n\t"
@@ -73,7 +73,7 @@
 	);*/
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
-		"movq magicF2W, %%mm7		\n\t"
+		"movq "MANGLE(magicF2W)", %%mm7	\n\t"
 		"1:				\n\t"
 		"movq (%1, %%esi), %%mm0	\n\t"
 		"movq 8(%1, %%esi), %%mm1	\n\t"
@@ -104,7 +104,7 @@
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
-		"movq magicF2W, %%mm7		\n\t"
+		"movq "MANGLE(magicF2W)", %%mm7	\n\t"
 		"pxor %%mm6, %%mm6		\n\t"
 		"movq %%mm7, %%mm5		\n\t"
 		"punpckldq %%mm6, %%mm5		\n\t"
@@ -160,7 +160,7 @@
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
-		"movq magicF2W, %%mm7		\n\t"
+		"movq "MANGLE(magicF2W)", %%mm7	\n\t"
 		"1:				\n\t"
 		"movq (%1, %%esi), %%mm0	\n\t"
 		"movq 8(%1, %%esi), %%mm1	\n\t"
@@ -212,7 +212,7 @@
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
-		"movq magicF2W, %%mm7		\n\t"
+		"movq "MANGLE(magicF2W)", %%mm7	\n\t"
 		"1:				\n\t"
 		"movd (%1, %%esi), %%mm0	\n\t"
 		"punpckldq 2048(%1, %%esi), %%mm0\n\t"
@@ -272,7 +272,7 @@
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
-		"movq magicF2W, %%mm7		\n\t"
+		"movq "MANGLE(magicF2W)", %%mm7	\n\t"
 		"pxor %%mm6, %%mm6		\n\t"
 		"1:				\n\t"
 		"movq 1024(%1, %%esi), %%mm0	\n\t"
@@ -313,7 +313,7 @@
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
-		"movq magicF2W, %%mm7		\n\t"
+		"movq "MANGLE(magicF2W)", %%mm7	\n\t"
 		"pxor %%mm6, %%mm6		\n\t"
 		"1:				\n\t"
 		"movq 1024(%1, %%esi), %%mm0	\n\t"
@@ -352,7 +352,7 @@
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
-		"movq magicF2W, %%mm7		\n\t"
+		"movq "MANGLE(magicF2W)", %%mm7	\n\t"
 		"pxor %%mm6, %%mm6		\n\t"
 		"1:				\n\t"
 		"movq 1024(%1, %%esi), %%mm0	\n\t"
@@ -393,7 +393,7 @@
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
-		"movq magicF2W, %%mm7		\n\t"
+		"movq "MANGLE(magicF2W)", %%mm7	\n\t"
 //		"pxor %%mm6, %%mm6		\n\t"
 		"1:				\n\t"
 		"movq 1024(%1, %%esi), %%mm0	\n\t"
@@ -440,7 +440,7 @@
     int32_t * f = (int32_t *) _f;
 	asm volatile(
 		"movl $-1024, %%esi		\n\t"
-		"movq magicF2W, %%mm7		\n\t"
+		"movq "MANGLE(magicF2W)", %%mm7	\n\t"
 //		"pxor %%mm6, %%mm6		\n\t"
 		"1:				\n\t"
 		"movq 1024(%1, %%esi), %%mm0	\n\t"