From b7a6c2457a56b07e6b8231b496237deae7b31b19 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 9 Jun 2005 23:30:33 +0000 Subject: 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17232 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/include/ChangeLog') diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 2551c6536..81b690cd4 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,16 @@ +2005-06-09 Ken Raeburn + + * 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. + 2005-06-07 Ken Raeburn * k5-platform.h (MAYBE_DEFINE_CALLINIT_FUNCTION) -- cgit