aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/loadstor.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-06 14:04:16 +0000
committerlloyd <[email protected]>2009-11-06 14:04:16 +0000
commita495493c4ea42a68290df75e4a24562c6ec19a06 (patch)
tree10ff3fcbdc4d753ec422a0b02f63c704e7e1ee86 /src/utils/loadstor.h
parentf3c92264410c709e2a3ebf88ea3a67badf298c1c (diff)
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.
Diffstat (limited to 'src/utils/loadstor.h')
-rw-r--r--src/utils/loadstor.h26
1 files changed, 13 insertions, 13 deletions
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 <botan/rotate.h>
#include <botan/prefetch.h>
-#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<u16bit>(const byte in[], u32bit off)
{
-#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK
+#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK
return BOTAN_ENDIAN_N2B(*(reinterpret_cast<const u16bit*>(in) + off));
#else
in += off * sizeof(u16bit);
@@ -112,7 +112,7 @@ inline u16bit load_be<u16bit>(const byte in[], u32bit off)
template<>
inline u16bit load_le<u16bit>(const byte in[], u32bit off)
{
-#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK
+#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK
return BOTAN_ENDIAN_N2L(*(reinterpret_cast<const u16bit*>(in) + off));
#else
in += off * sizeof(u16bit);
@@ -123,7 +123,7 @@ inline u16bit load_le<u16bit>(const byte in[], u32bit off)
template<>
inline u32bit load_be<u32bit>(const byte in[], u32bit off)
{
-#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK
+#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK
return BOTAN_ENDIAN_N2B(*(reinterpret_cast<const u32bit*>(in) + off));
#else
in += off * sizeof(u32bit);
@@ -134,7 +134,7 @@ inline u32bit load_be<u32bit>(const byte in[], u32bit off)
template<>
inline u32bit load_le<u32bit>(const byte in[], u32bit off)
{
-#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK
+#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK
return BOTAN_ENDIAN_N2L(*(reinterpret_cast<const u32bit*>(in) + off));
#else
in += off * sizeof(u32bit);
@@ -145,7 +145,7 @@ inline u32bit load_le<u32bit>(const byte in[], u32bit off)
template<>
inline u64bit load_be<u64bit>(const byte in[], u32bit off)
{
-#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK
+#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK
return BOTAN_ENDIAN_N2B(*(reinterpret_cast<const u64bit*>(in) + off));
#else
in += off * sizeof(u64bit);
@@ -157,7 +157,7 @@ inline u64bit load_be<u64bit>(const byte in[], u32bit off)
template<>
inline u64bit load_le<u64bit>(const byte in[], u32bit off)
{
-#if BOTAN_TARGET_UNALIGNED_LOADSTOR_OK
+#if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK
return BOTAN_ENDIAN_N2L(*(reinterpret_cast<const u64bit*>(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<u16bit*>(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<u16bit*>(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<u32bit*>(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<u32bit*>(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<u64bit*>(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<u64bit*>(out) = BOTAN_ENDIAN_L2N(in);
#else
out[0] = get_byte(7, in);