utils/bits.h: Add macros for swapping endianness in place.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 26 May 2018 15:32:01 +0000 (16:32 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 26 May 2018 22:24:18 +0000 (23:24 +0100)
commit374bb459369d47f598d1b07f6237f24abd0d52c6
tree4b14730c0639da4132c04458feab41817a3a3275
parent8fb5ab990f3753bccc2a1105d49f3d0c8536fd96
utils/bits.h: Add macros for swapping endianness in place.

Many processors and compilers provide handy instructions for doing this,
and it's a handy primitive for loading and storing.

The HTOLw etc. macros turn out to be remarkably slippery to define.
It's unfortunately nonsensical to speak about an integer value having an
endianness.
utils/bits.3
utils/bits.h