aboutsummaryrefslogtreecommitdiff
path: root/block-sha1
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2009-08-13 00:29:14 -0400
committerJunio C Hamano <gitster@pobox.com>2009-08-13 10:41:02 -0700
commitee7dc310af660f423732369e955651ef2f05011d (patch)
treeff3c92f4a0776aec0e94337bcb2032ba20746463 /block-sha1
parent660231aa9727d29c7d2c16319bc6a3fa8bed3e0e (diff)
downloadgit-ee7dc310af660f423732369e955651ef2f05011d.tar.gz
git-ee7dc310af660f423732369e955651ef2f05011d.tar.xz
block-sha1: more good unaligned memory access candidates
In addition to X86, PowerPC and S390 are capable of unaligned memory accesses. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'block-sha1')
-rw-r--r--block-sha1/sha1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c
index d3121f7a0..e5a100754 100644
--- a/block-sha1/sha1.c
+++ b/block-sha1/sha1.c
@@ -67,7 +67,10 @@
* and is faster on architectures with memory alignment issues.
*/
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || \
+ defined(__ppc__) || defined(__ppc64__) || \
+ defined(__powerpc__) || defined(__powerpc64__) || \
+ defined(__s390__) || defined(__s390x__)
#define get_be32(p) ntohl(*(unsigned int *)(p))
#define put_be32(p, v) do { *(unsigned int *)(p) = htonl(v); } while (0)