Skip to content

Commit

Permalink
block-sha1: more good unaligned memory access candidates
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed Aug 13, 2009
1 parent 660231a commit ee7dc31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion block-sha1/sha1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ee7dc31

Please sign in to comment.