From 4215d9fabb4dbbd890076819331d107d24c81d0c Mon Sep 17 00:00:00 2001 From: mmitchel Date: Tue, 17 May 2005 18:25:58 +0000 Subject: [PATCH] * gcc.dg/compat/struct-layout-1_generate.c (iterative_hash): Remove little-endian optimizations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99844 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c | 15 --------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 712d9b9..09e8bfa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-05-17 Mark Mitchell + + * gcc.dg/compat/struct-layout-1_generate.c (iterative_hash): + Remove little-endian optimizations. + 2005-05-17 Jeff Law * g++.dg/tree-ssa/pr18414.C: New test. diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c index 6c627f0..d8b8bfb 100644 --- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c +++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c @@ -1225,21 +1225,6 @@ iterative_hash (const void *k_in /* the key */, c = initval; /* the previous hash value */ /*---------------------------------------- handle most of the key */ -#ifndef WORDS_BIGENDIAN - /* On a little-endian machine, if the data is 4-byte aligned we can hash - by word for better speed. This gives nondeterministic results on - big-endian machines. */ - if (sizeof (hashval_t) == 4 && (((size_t)k)&3) == 0) - while (len >= 12) /* aligned */ - { - a += *(hashval_t *)(k+0); - b += *(hashval_t *)(k+4); - c += *(hashval_t *)(k+8); - mix(a,b,c); - k += 12; len -= 12; - } - else /* unaligned */ -#endif while (len >= 12) { a += (k[0] +((hashval_t)k[1]<<8) +((hashval_t)k[2]<<16) +((hashval_t)k[3]<<24)); -- 2.7.4