Commit 314365b2 authored by Niels Möller's avatar Niels Möller

New macro LE_READ_UINT64.

parent c41fbeb7
2012-11-15 Niels Möller <nisse@lysator.liu.se>
* macros.h (LE_READ_UINT64): New macro.
2012-11-13 Niels Möller <nisse@lysator.liu.se>
* sha3-permute.c (sha3_permute): Micro optimizations. Partial
......
......@@ -87,6 +87,16 @@ do { \
} while(0)
/* And the other, little-endian, byteorder */
#define LE_READ_UINT64(p) \
( (((uint64_t) (p)[7]) << 56) \
| (((uint64_t) (p)[6]) << 48) \
| (((uint64_t) (p)[5]) << 40) \
| (((uint64_t) (p)[4]) << 32) \
| (((uint64_t) (p)[3]) << 24) \
| (((uint64_t) (p)[2]) << 16) \
| (((uint64_t) (p)[1]) << 8) \
| ((uint64_t) (p)[0]))
#define LE_WRITE_UINT64(p, i) \
do { \
(p)[7] = ((i) >> 56) & 0xff; \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment