From b8173b603f57dcf918a67f1ec00763ab5f4e1cf8 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Mon, 14 Jan 2013 05:20:50 +0100 Subject: sha3sum: new applet function old new delta KeccakF - 496 +496 KeccakF_RoundConstants - 192 +192 sha3_hash - 171 +171 sha3_end - 40 +40 hash_file 274 299 +25 KeccakF_RotationConstants - 25 +25 KeccakF_PiLane - 25 +25 packed_usage 29213 29232 +19 sha3_begin - 18 +18 KeccakF_Mod5 - 10 +10 applet_names 2445 2453 +8 applet_main 1420 1424 +4 applet_nameofs 710 712 +2 ------------------------------------------------------------------------------ (add/remove: 8/0 grow/shrink: 9/7 up/down: 1049/-54) Total: ~995 bytes Signed-off-by: Lauri Kasanen Signed-off-by: Denys Vlasenko --- include/platform.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/platform.h') diff --git a/include/platform.h b/include/platform.h index 4025561c6..128230658 100644 --- a/include/platform.h +++ b/include/platform.h @@ -205,6 +205,7 @@ #include typedef int bb__aliased_int FIX_ALIASING; +typedef long bb__aliased_long FIX_ALIASING; typedef uint16_t bb__aliased_uint16_t FIX_ALIASING; typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; @@ -212,7 +213,8 @@ typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; * a lvalue. This makes it more likely to not swap them by mistake */ #if defined(i386) || defined(__x86_64__) || defined(__powerpc__) -# define move_from_unaligned_int(v, intp) ((v) = *(bb__aliased_int*)(intp)) +# define move_from_unaligned_int(v, intp) ((v) = *(bb__aliased_int*)(intp)) +# define move_from_unaligned_long(v, longp) ((v) = *(bb__aliased_long*)(longp)) # define move_from_unaligned16(v, u16p) ((v) = *(bb__aliased_uint16_t*)(u16p)) # define move_from_unaligned32(v, u32p) ((v) = *(bb__aliased_uint32_t*)(u32p)) # define move_to_unaligned16(u16p, v) (*(bb__aliased_uint16_t*)(u16p) = (v)) @@ -221,6 +223,7 @@ typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; #else /* performs reasonably well (gcc usually inlines memcpy here) */ # define move_from_unaligned_int(v, intp) (memcpy(&(v), (intp), sizeof(int))) +# define move_from_unaligned_long(v, longp) (memcpy(&(v), (longp), sizeof(long))) # define move_from_unaligned16(v, u16p) (memcpy(&(v), (u16p), 2)) # define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4)) # define move_to_unaligned16(u16p, v) do { \ -- cgit v1.2.3