[MPlayer-dev-eng] What's the purpose of TOOLS/fastmemcpybench.c?

Zuxy Meng zuxy.meng at gmail.com
Thu Nov 24 14:09:46 CET 2005


Hi,

Under TOOLS there's a fastmemcpybench.c file, and a correspondense
rule in Makefile:

fastmemcpybench: fastmemcpybench.c
        $(CC) $(CFLAGS) -g ../libvo/aclib.o -DNAME=\"mmx\"     
-DHAVE_MMX fastmemcpybench.c -o fastmem-mmx
        $(CC) $(CFLAGS) -g ../libvo/aclib.o -DNAME=\"k6\ \"    
-DHAVE_3DNOW -DHAVE_MMX fastmemcpybench.c -o fastmem-k6
        $(CC) $(CFLAGS) -g ../libvo/aclib.o -DNAME=\"k7\ \"    
-DHAVE_MMX2  -DHAVE_3DNOW -DHAVE_MMX fastmemcpybench.c -o fastmem-k7
        $(CC) $(CFLAGS) -g ../libvo/aclib.o -DNAME=\"sse\"     
-DHAVE_MMX2  -DHAVE_SSE   -DHAVE_MMX fastmemcpybench.c -o fastmem-sse
        $(CC) $(CFLAGS) -g ../libvo/aclib.o -DNAME=\"mga-mmx\" 
-DHAVE_MGA   -DHAVE_MMX fastmemcpybench.c -o fastmem2-mmx
        $(CC) $(CFLAGS) -g ../libvo/aclib.o -DNAME=\"mga-k6\ \"
-DHAVE_MGA   -DHAVE_3DNOW -DHAVE_MMX fastmemcpybench.c -o fastmem2-k6
        $(CC) $(CFLAGS) -g ../libvo/aclib.o -DNAME=\"mga-k7\ \"
-DHAVE_MGA   -DHAVE_MMX2  -DHAVE_3DNOW -DHAVE_MMX fastmemcpybench.c -o
fastmem2-k7
        $(CC) $(CFLAGS) -g ../libvo/aclib.o -DNAME=\"mga-sse\" 
-DHAVE_MGA   -DHAVE_MMX2  -DHAVE_SSE   -DHAVE_MMX fastmemcpybench.c -o
fastmem2-sse

However, since fastmemcpybench.c will be linked with a compiled object
file aclib.o, I see no points in defining HAVE_MMX etc. here, not to
mention that fastmemcpy.c includes fastmemcpy.h, which in turn
includes config.h, which redefined these macros.

--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6




More information about the MPlayer-dev-eng mailing list