summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2024-05-07 21:30:29 -0400
committerPaul Duncan <pabs@pablotron.org>2024-05-07 21:30:29 -0400
commit9e5b201abb0ae1135e4f6567c7f4763150aab501 (patch)
tree70ac028c8f364400e7a6d974acebbae207e5e3e9
parentae421618db3b68ccda95f54d1c9e8d05b2dab90a (diff)
downloadsha3-9e5b201abb0ae1135e4f6567c7f4763150aab501.tar.bz2
sha3-9e5b201abb0ae1135e4f6567c7f4763150aab501.zip
sha3.c: s/union/struct/ (yeesh)
-rw-r--r--sha3.c9
1 files 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