Module Name: krb5 Committed By: raeburn Date: Thu Jun 9 23:30:33 UTC 2005 Modified Files: krb5/src/include/ChangeLog krb5/src/include/k5-platform.h Added Files: Removed Files: Log Message 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 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 macros. To generate a diff of this commit: cvs diff -r1.504 -r1.505 krb5/src/include/ChangeLog cvs diff -r1.14 -r1.15 krb5/src/include/k5-platform.h