summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-30 13:25:02 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-30 13:25:16 +0000
commit02bc9871e4b79db229ca7ec6b77526f19966758e (patch)
treeb958fc0e9d05b5afea4894961a55d68b49f12a2c /solenv
parent2f6ffa789b2fbd33f7fe1eac0512f6699ed1087f (diff)
allow unaligned memory accesses only on x86/x86_64
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/concat-deps.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index 84d688cb9309..66b90258152a 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -43,7 +43,11 @@
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define CORE_BIG_ENDIAN 0
#define CORE_LITTLE_ENDIAN 1
+#if defined(__x86_64) || defined(__i386)
#define USE_MEMORY_ALIGNMENT 64
+#else
+#define USE_MEMORY_ALIGNMENT 4
+#endif
#else /* !(__BYTE_ORDER == __LITTLE_ENDIAN) */
#if __BYTE_ORDER == __BIG_ENDIAN
#define CORE_BIG_ENDIAN 1
@@ -369,10 +373,10 @@ struct hash
static unsigned int hash_compute( struct hash* hash, const char* key, int length)
{
-unsigned int a;
-unsigned int b;
-unsigned int c; /* internal state */
-const unsigned char* uk = (const unsigned char*)key;
+ unsigned int a;
+ unsigned int b;
+ unsigned int c; /* internal state */
+ const unsigned char* uk = (const unsigned char*)key;
/* Set up the internal state */
a = b = c = 0xdeadbeef + (length << 2);