summaryrefslogtreecommitdiff
path: root/dxr3memcpy.c
diff options
context:
space:
mode:
authoraustriancoder <austriancoder>2004-09-17 22:41:31 +0000
committeraustriancoder <austriancoder>2004-09-17 22:41:31 +0000
commit48d3d4fe3b7e7e89f734c9b398d5b59d9181715d (patch)
tree58e45828511a0a8e9b20ace0e9adfd288b91ef0e /dxr3memcpy.c
parent49f5090c58743e6ca5dd51ea4ac1420998bf6d78 (diff)
downloadvdr-plugin-dxr3-48d3d4fe3b7e7e89f734c9b398d5b59d9181715d.tar.gz
vdr-plugin-dxr3-48d3d4fe3b7e7e89f734c9b398d5b59d9181715d.tar.bz2
fixed some defines... should now compile
Diffstat (limited to 'dxr3memcpy.c')
-rw-r--r--dxr3memcpy.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/dxr3memcpy.c b/dxr3memcpy.c
index 06dd134..0823ce7 100644
--- a/dxr3memcpy.c
+++ b/dxr3memcpy.c
@@ -37,7 +37,7 @@
void *(* dxr3_memcpy)(void *to, const void *from, size_t len);
-#if defined(ARCH_X86) || defined(ARCH_X86_64)
+#if defined(__i386__) // || defined(ARCH_X86_64)
// ==================================
// for small memory blocks (<256 bytes) this version is faster
#define small_memcpy(to,from,n) { register unsigned long int dummy; __asm__ __volatile__("rep; movsb":"=&D"(to), "=&S"(from), "=&c"(dummy) :"0" (to), "1" (from),"2" (n) : "memory"); }
@@ -89,9 +89,6 @@ int d0, d1, d2;
#define MIN_LEN 0x40 /* 64-byte blocks */
-// Test for GCC > 3.2.0
-#if GCC_VERSION > 30200
-
// ==================================
/* SSE note: i tried to move 128 bytes a time instead of 64 but it
didn't make any measureable difference. i'm using 64 for the sake of
@@ -307,8 +304,6 @@ static void * mmx2_memcpy(void * to, const void * from, size_t len)
return retval;
}
-#endif /*GCC_VERSION > 30200*/
-
// ==================================
static void *linux_kernel_memcpy(void *to, const void *from, size_t len) {
return __memcpy(to,from,len);
@@ -333,7 +328,7 @@ cDxr3MemcpyBench::cDxr3MemcpyBench(uint32_t config_flags)
routine.cpu_require = 0;
m_methods.push_back(routine);
- #if defined(ARCH_X86) || defined(ARCH_X86_64)
+ #if defined(__i386__) //|| defined(ARCH_X86_64)
// linux_kernel_memcpy
routine.name = "linux_kernel_memcpy()";
@@ -341,9 +336,6 @@ cDxr3MemcpyBench::cDxr3MemcpyBench(uint32_t config_flags)
routine.cpu_require = 0;
m_methods.push_back(routine);
- // Test for GCC > 3.2.0
- # if GCC_VERSION > 30200
-
// MMX optimized memcpy()
routine.name = "MMX optimized memcpy()";
routine.function = mmx_memcpy;
@@ -356,7 +348,7 @@ cDxr3MemcpyBench::cDxr3MemcpyBench(uint32_t config_flags)
routine.cpu_require = CC_MMXEXT;
m_methods.push_back(routine);
- # ifndef __FreeBSD__
+ # ifndef __FreeBSD__
// SSE optimized memcpy()
routine.name = "SSE optimized memcpy()";
@@ -364,8 +356,7 @@ cDxr3MemcpyBench::cDxr3MemcpyBench(uint32_t config_flags)
routine.cpu_require = CC_MMXEXT|CC_SSE;
m_methods.push_back(routine);
- # endif /*__FreeBSD__*/
- # endif /*GCC_VERSION > 30200*/
+ # endif /*__FreeBSD__*/
#endif /*ARCH_X86/ARCH_X86_64*/
@@ -429,7 +420,7 @@ cDxr3MemcpyBench::cDxr3MemcpyBench(uint32_t config_flags)
// neede for exact timing
unsigned long long int cDxr3MemcpyBench::Rdtsc()
{
- #ifdef ARCH_X86
+ #ifdef __i386__
unsigned long long int x;
__asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
return x;