@matheusbsbs / matheus-bagliano / commits / ee7dc310af
Fork 0

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>

Nicolas Pitre committed Aug 13, 2009 at 00:29 UTC ee7dc310af660f423732369e955651ef2f05011d
1 file changed +4 -1
block-sha1/sha1.c
+4 -1
@@ -67,7 +67,10 @@
67 * and is faster on architectures with memory alignment issues.
68 */
69
70 -#if defined(__i386__) || defined(__x86_64__)
70 +#if defined(__i386__) || defined(__x86_64__) || \
71 + defined(__ppc__) || defined(__ppc64__) || \
72 + defined(__powerpc__) || defined(__powerpc64__) || \
73 + defined(__s390__) || defined(__s390x__)
74
75 #define get_be32(p) ntohl(*(unsigned int *)(p))
76 #define put_be32(p, v) do { *(unsigned int *)(p) = htonl(v); } while (0)