summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-09 12:59:14 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-03-09 12:59:14 +0000
commit591ce556b732b638804a0336cb8c17168251e17d (patch)
tree680aad32c30326c40f8fd8fca738e377b451fdbf
parent526d2f16c2c4a0b6346259543d1ec628c3651cb4 (diff)
downloadmpv-591ce556b732b638804a0336cb8c17168251e17d.tar.bz2
mpv-591ce556b732b638804a0336cb8c17168251e17d.tar.xz
Make fastmemcpybench almost working - only thing missing is a way to
override HAVE_MMX etc. from config.h. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28906 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--Makefile4
-rw-r--r--TOOLS/fastmemcpybench.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2822754600..5c25dcb003 100644
--- a/Makefile
+++ b/Makefile
@@ -1029,8 +1029,8 @@ TOOLS/fastmem-mga-sse$(EXESUF): CFLAGS += -DHAVE_MMX=1 -DHAVE_AMD3DNOW=0 -DHAVE_
fastmemcpybench: $(addsuffix $(EXESUF),$(addprefix TOOLS/fastmem-,c mmx k6 k7 sse mga-mmx mga-k6 mga-k7 mga-sse))
-TOOLS/fastmem-%$(EXESUF): TOOLS/fastmemcpybench.c
- $(CC) $(CFLAGS) -o $@ $<
+TOOLS/fastmem-%$(EXESUF): TOOLS/fastmemcpybench.c libvo/aclib.c
+ $(CC) $(CFLAGS) -o $@ $^
REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c)
REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)
diff --git a/TOOLS/fastmemcpybench.c b/TOOLS/fastmemcpybench.c
index 0281cdab2c..48a29374c3 100644
--- a/TOOLS/fastmemcpybench.c
+++ b/TOOLS/fastmemcpybench.c
@@ -18,6 +18,7 @@
#include <sys/mman.h>
#include <sys/time.h>
#include <inttypes.h>
+#include "libvo/fastmemcpy.h"
//#define ARR_SIZE 100000
#define ARR_SIZE (1024*768*2)
@@ -113,7 +114,7 @@ int main(void)
t = GetTimer();
v1 = read_tsc();
for (i = 0; i < 100; i++)
- memcpy(marr1, marr2, ARR_SIZE - 16);
+ fast_memcpy(marr1, marr2, ARR_SIZE - 16);
v2 = read_tsc();
t = GetTimer() - t;
// ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t