From a495493c4ea42a68290df75e4a24562c6ec19a06 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 6 Nov 2009 14:04:16 +0000 Subject: Tick to 1.9.3-dev Rename BOTAN_UNALIGNED_LOADSTOR_OK to BOTAN_UNALIGNED_MEMORY_ACCESS_OK which is somewhat more clear as to the point. --- src/utils/loadstor.h | 26 +++++++++++++------------- src/utils/simd_32/info.txt | 13 ------------- src/utils/xor_buf.h | 4 ++-- 3 files changed, 15 insertions(+), 28 deletions(-) (limited to 'src/utils') diff --git a/src/utils/loadstor.h b/src/utils/loadstor.h index 8f430f36c..489a789f4 100644 --- a/src/utils/loadstor.h +++ b/src/utils/loadstor.h @@ -14,7 +14,7 @@ #include #include -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK #if defined(BOTAN_TARGET_CPU_IS_BIG_ENDIAN) @@ -101,7 +101,7 @@ inline T load_le(const byte in[], u32bit off) template<> inline u16bit load_be(const byte in[], u32bit off) { -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK return BOTAN_ENDIAN_N2B(*(reinterpret_cast(in) + off)); #else in += off * sizeof(u16bit); @@ -112,7 +112,7 @@ inline u16bit load_be(const byte in[], u32bit off) template<> inline u16bit load_le(const byte in[], u32bit off) { -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK return BOTAN_ENDIAN_N2L(*(reinterpret_cast(in) + off)); #else in += off * sizeof(u16bit); @@ -123,7 +123,7 @@ inline u16bit load_le(const byte in[], u32bit off) template<> inline u32bit load_be(const byte in[], u32bit off) { -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK return BOTAN_ENDIAN_N2B(*(reinterpret_cast(in) + off)); #else in += off * sizeof(u32bit); @@ -134,7 +134,7 @@ inline u32bit load_be(const byte in[], u32bit off) template<> inline u32bit load_le(const byte in[], u32bit off) { -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK return BOTAN_ENDIAN_N2L(*(reinterpret_cast(in) + off)); #else in += off * sizeof(u32bit); @@ -145,7 +145,7 @@ inline u32bit load_le(const byte in[], u32bit off) template<> inline u64bit load_be(const byte in[], u32bit off) { -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK return BOTAN_ENDIAN_N2B(*(reinterpret_cast(in) + off)); #else in += off * sizeof(u64bit); @@ -157,7 +157,7 @@ inline u64bit load_be(const byte in[], u32bit off) template<> inline u64bit load_le(const byte in[], u32bit off) { -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK return BOTAN_ENDIAN_N2L(*(reinterpret_cast(in) + off)); #else in += off * sizeof(u64bit); @@ -281,7 +281,7 @@ inline void load_be(T out[], */ inline void store_be(u16bit in, byte out[2]) { -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK *reinterpret_cast(out) = BOTAN_ENDIAN_B2N(in); #else out[0] = get_byte(0, in); @@ -291,7 +291,7 @@ inline void store_be(u16bit in, byte out[2]) inline void store_le(u16bit in, byte out[2]) { -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK *reinterpret_cast(out) = BOTAN_ENDIAN_L2N(in); #else out[0] = get_byte(1, in); @@ -301,7 +301,7 @@ inline void store_le(u16bit in, byte out[2]) inline void store_be(u32bit in, byte out[4]) { -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK *reinterpret_cast(out) = BOTAN_ENDIAN_B2N(in); #else out[0] = get_byte(0, in); @@ -313,7 +313,7 @@ inline void store_be(u32bit in, byte out[4]) inline void store_le(u32bit in, byte out[4]) { -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK *reinterpret_cast(out) = BOTAN_ENDIAN_L2N(in); #else out[0] = get_byte(3, in); @@ -325,7 +325,7 @@ inline void store_le(u32bit in, byte out[4]) inline void store_be(u64bit in, byte out[8]) { -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK *reinterpret_cast(out) = BOTAN_ENDIAN_B2N(in); #else out[0] = get_byte(0, in); @@ -341,7 +341,7 @@ inline void store_be(u64bit in, byte out[8]) inline void store_le(u64bit in, byte out[8]) { -#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK +#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK *reinterpret_cast(out) = BOTAN_ENDIAN_L2N(in); #else out[0] = get_byte(7, in); diff --git a/src/utils/simd_32/info.txt b/src/utils/simd_32/info.txt index 64707c1e4..883096a5d 100644 --- a/src/utils/simd_32/info.txt +++ b/src/utils/simd_32/info.txt @@ -1,16 +1,3 @@ define SIMD_32 load_on always - - -pentium-m -pentium4 -prescott -amd64 - - - -gcc -icc -msvc - diff --git a/src/utils/xor_buf.h b/src/utils/xor_buf.h index 39781f017..39c4a493d 100644 --- a/src/utils/xor_buf.h +++ b/src/utils/xor_buf.h @@ -22,7 +22,7 @@ inline void xor_buf(byte out[], const byte in[], u32bit length) { while(length >= 8) { -#if BOTAN_UNALIGNED_LOADSTOR_OK +#if BOTAN_UNALIGNED_MEMORY_ACCESS_OK *reinterpret_cast(out) ^= *reinterpret_cast(in); #else out[0] ^= in[0]; out[1] ^= in[1]; @@ -51,7 +51,7 @@ inline void xor_buf(byte out[], { while(length >= 8) { -#if BOTAN_UNALIGNED_LOADSTOR_OK +#if BOTAN_UNALIGNED_MEMORY_ACCESS_OK *reinterpret_cast(out) = *reinterpret_cast(in) ^ *reinterpret_cast(in2); -- cgit v1.2.3