From 57b61af5f8671edacd8e99416a8f4db0b0aec8b2 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 12 Nov 2014 14:44:35 +0100 Subject: minor opts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libkeccak/digest.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2