Skip to content

Commit ee7dc31

Browse files
Nicolas Pitregitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 660231a commit ee7dc31

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

block-sha1/sha1.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@
6767
* and is faster on architectures with memory alignment issues.
6868
*/
6969

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__)
7174

7275
#define get_be32(p) ntohl(*(unsigned int *)(p))
7376
#define put_be32(p, v) do { *(unsigned int *)(p) = htonl(v); } while (0)

0 commit comments

Comments
 (0)