summaryrefslogtreecommitdiff
path: root/checksum.c
diff options
context:
space:
mode:
authorJorrit Jongma <git@jongma.org>2020-05-19 14:52:40 +0200
committerWayne Davison <wayne@opencoder.net>2020-05-21 14:41:55 -0700
commit70c6b408dc299f7aa00dd3452ae82b56d6c17f80 (patch)
treeb97468fc0e0b8e48499f1b2b221fe89c045679b7 /checksum.c
parentbe7af36c517757d7ff9562275ebfc04355613dff (diff)
downloadrsync-70c6b408dc299f7aa00dd3452ae82b56d6c17f80.tar.gz
SSE2/SSSE3 optimized version of get_checksum1() for x86-64
Requires compilation using GCC C++ front end, build scripts have been modified accordingly. C++ is only used when the optimization is enabled (g++ as compiler, x86-64 build target, --enable-sse2 is passed to configure). (Wayne made a few tweaks, including making it disabled by default.)
Diffstat (limited to 'checksum.c')
-rw-r--r--checksum.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/checksum.c b/checksum.c
index cd234038..8698543d 100644
--- a/checksum.c
+++ b/checksum.c
@@ -99,6 +99,7 @@ int canonical_checksum(int csum_type)
return csum_type >= CSUM_MD4 ? 1 : 0;
}
+#ifndef ENABLE_SSE2 /* See checksum_sse2.cpp for the SSE2 version. */
/*
a simple 32 bit checksum that can be updated from either end
(inspired by Mark Adler's Adler-32 checksum)
@@ -119,6 +120,7 @@ uint32 get_checksum1(char *buf1, int32 len)
}
return (s1 & 0xffff) + (s2 << 16);
}
+#endif
void get_checksum2(char *buf, int32 len, char *sum)
{