diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-11-12 14:44:35 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-11-12 14:44:35 +0100 |
commit | 57b61af5f8671edacd8e99416a8f4db0b0aec8b2 (patch) | |
tree | fc87c54086be1bf9cdbebaa3de410a5a5a1d860e /src | |
parent | whitespace (diff) | |
download | libkeccak-57b61af5f8671edacd8e99416a8f4db0b0aec8b2.tar.gz libkeccak-57b61af5f8671edacd8e99416a8f4db0b0aec8b2.tar.bz2 libkeccak-57b61af5f8671edacd8e99416a8f4db0b0aec8b2.tar.xz |
minor opts
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/libkeccak/digest.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libkeccak/digest.c b/src/libkeccak/digest.c index 61d0c58..274367d 100644 --- a/src/libkeccak/digest.c +++ b/src/libkeccak/digest.c @@ -218,9 +218,8 @@ void libkeccak_f(register libkeccak_state_t* restrict state) */ static inline __attribute__((nonnull, nothrow, pure, warn_unused_result, gnu_inline)) int_fast64_t libkeccak_to_lane(register const char* restrict message, register size_t msglen, - register long rr, long ww, size_t off) + register long rr, register long ww, size_t off) { - /* XXX optimise parameters ww and off */ register long n = (long)((msglen < (size_t)rr ? msglen : (size_t)rr) - off); int_fast64_t rc = 0; message += off; @@ -301,7 +300,7 @@ static __attribute__((nonnull, nothrow)) void libkeccak_absorption_phase(register libkeccak_state_t* restrict state, register size_t len) { register long rr = state->r >> 3; - long ww = state->w >> 3; /* XXX should this be register or auto? (also in libkeccak_to_lane) */ + register long ww = state->w >> 3; register long n = (long)len / rr; register const char* restrict message = state->M; if (__builtin_expect(ww >= 8, 1)) /* ww > 8 is impossible, it is just for optimisation possibilities. */ @@ -317,7 +316,6 @@ void libkeccak_absorption_phase(register libkeccak_state_t* restrict state, regi else while (n--) { - /* XXX should this be rerolled? */ #define X(N) state->S[N] ^= libkeccak_to_lane(message, len, rr, ww, (size_t)(LANE_TRANSPOSE_MAP[N] * ww)); LIST_25 #undef X |