From 9e5b201abb0ae1135e4f6567c7f4763150aab501 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Tue, 7 May 2024 21:30:29 -0400 Subject: sha3.c: s/union/struct/ (yeesh) --- sha3.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sha3.c b/sha3.c index 28916a3..581bbff 100644 --- a/sha3.c +++ b/sha3.c @@ -485,18 +485,13 @@ static inline void permute_n_avx512(uint64_t s[static 25], const size_t num_roun // columns are stored in the low 5 64-bit lanes. this wastes one // 64-bit lane per row at the expense of making many of the instructions // simpler. -typedef union { +typedef struct { uint64x2_t p0, p1, p2; } row_t; // set contents of row static inline row_t row_set(const uint64x2_t a, const uint64x2_t b, const uint64x2_t c) { - row_t r; - r.p0 = a; - r.p1 = b; - r.p2 = c; - - return r; + return (row_t) { a, b, c }; } // get Nth pair of u64s from row -- cgit v1.2.3