]> git.ipfire.org Git - thirdparty/git.git/commitdiff
block-sha1: more good unaligned memory access candidates
authorNicolas Pitre <nico@cam.org>
Thu, 13 Aug 2009 04:29:14 +0000 (00:29 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Aug 2009 17:41:02 +0000 (10:41 -0700)
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>
block-sha1/sha1.c

index d3121f7a021b878e8232795d661c2907b045b6bc..e5a100754e1d2c62ef168d0c120180ef4da7647b 100644 (file)
  * 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)