Use GCC's packed-structure support to try to optimize unaligned loads and
stores of values. (E.g., on x86, gcc will emit a word load or store regardless
of alignment; on sparc or alpha, it will do aligned word accesses. The old C
code does byte operations and arithmetic, always.) Tested in crypto code on
x86, sparc, and amd64.
* k5-platform.h (load_*): Change argument type to point to const.
(K5_BE, K5_LE): New macros, defined based on architecture macros for certain
big-endian and little-endian platforms, respectively.
(PUT, GET) [__GNUC__]: New macros. Use GCC's packed-structure support to do
unaligned loads and stores.
(PUTSWAPPED, GETSWAPPED) [__GNUC__]: Similar, but invoke a SWAP<size> macro
(not defined yet) to swap the bytes of the value.
(store_*, load_*): Use these macros when using GCC, depending on endianness and
availability of the SWAP<size> macros.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17232
dc483132-0cff-0310-8789-
dd5450dbe970