Git development
 help / color / mirror / Atom feed
* [PATCH] block-sha1: more good unaligned memory access candidates
@ 2009-08-13  4:29 Nicolas Pitre
  2009-08-13 16:45 ` Linus Torvalds
  2009-08-14 22:52 ` [PATCH] block-sha1/sha1.c: silence compiler complaints by casting void* to uintptr_t Brandon Casey
  0 siblings, 2 replies; 15+ messages in thread
From: Nicolas Pitre @ 2009-08-13  4:29 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Linus Torvalds, git

In addition to X86, PowerPC and S390 are capable of unaligned memory 
accesses.

Signed-off-by: Nicolas Pitre <nico@cam.org>

diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c
index d3121f7..e5a1007 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)

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-08-15 18:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-13  4:29 [PATCH] block-sha1: more good unaligned memory access candidates Nicolas Pitre
2009-08-13 16:45 ` Linus Torvalds
2009-08-13 17:23   ` Nicolas Pitre
2009-08-13 19:33     ` Junio C Hamano
2009-08-13 19:54       ` Linus Torvalds
2009-08-13 20:13       ` Nicolas Pitre
2009-08-14 22:52 ` [PATCH] block-sha1/sha1.c: silence compiler complaints by casting void* to uintptr_t Brandon Casey
2009-08-15  0:08   ` Johannes Schindelin
2009-08-15  0:19     ` Linus Torvalds
2009-08-15  0:44       ` Brandon Casey
2009-08-15  1:46         ` Junio C Hamano
2009-08-15  2:34           ` Brandon Casey
2009-08-15  3:16             ` Junio C Hamano
2009-08-15 18:43               ` Linus Torvalds
2009-08-15  0:52     ` Brandon Casey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox