author | Nicolas Pitre <nico@cam.org> | |
Wed, 12 Aug 2009 19:47:55 +0000 (15:47 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 12 Aug 2009 20:36:32 +0000 (13:36 -0700) | ||
commit | 660231aa9727d29c7d2c16319bc6a3fa8bed3e0e | |
tree | 5059ca749124a89a404f193a7b97c648ba4d16b2 | tree | snapshot |
parent | dc52fd29738c2af98f3e986691eca34addfd4914 | commit | diff |
block-sha1: support for architectures with memory alignment restrictions
This is needed on architectures with poor or non-existent unaligned memory
support and/or no fast byte swap instruction (such as ARM) by using byte
accesses to memory and shifting the result together.
This also makes the code portable, therefore the byte access methods are
the defaults. Any architecture that properly supports unaligned word
accesses in hardware simply has to enable the alternative methods.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This is needed on architectures with poor or non-existent unaligned memory
support and/or no fast byte swap instruction (such as ARM) by using byte
accesses to memory and shifting the result together.
This also makes the code portable, therefore the byte access methods are
the defaults. Any architecture that properly supports unaligned word
accesses in hardware simply has to enable the alternative methods.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
block-sha1/sha1.c | diff | blob | history |