From: Mark Wooding Date: Sat, 26 May 2018 15:22:39 +0000 (+0100) Subject: utils/bits.h: Refactor the load/store macros. X-Git-Tag: 2.3.0~6 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/commitdiff_plain/897c58ad7408d8001e63fcc2ca8e598c9811a539?hp=897c58ad7408d8001e63fcc2ca8e598c9811a539 utils/bits.h: Refactor the load/store macros. * Each macro is now only defined conditionally. This allows earlier parts of the header file to define a compiler-specific implementation, with the generic definitions filling in the blanks. * Instead of writing the byte manipulations out longhand, build each one out of smaller pieces. This has two benefits: firstly, the new definitions are smaller and easier to understand; and, secondly, if there's a compiler-specific trick for, say 16-bit loads, then 32-bit loads can win some of the benefit. ---