struct-layout-1_generate.c (iterative_hash): Remove little-endian optimizations.

* gcc.dg/compat/struct-layout-1_generate.c (iterative_hash):
	Remove little-endian optimizations.

From-SVN: r99844
This commit is contained in:
Mark Mitchell 2005-05-17 18:25:58 +00:00 committed by Mark Mitchell
parent b22327455d
commit a3a02333fa
2 changed files with 5 additions and 15 deletions

View File

@ -1,3 +1,8 @@
2005-05-17 Mark Mitchell <mark@codesourcery.com>
* gcc.dg/compat/struct-layout-1_generate.c (iterative_hash):
Remove little-endian optimizations.
2005-05-17 Jeff Law <law@redhat.com>
* g++.dg/tree-ssa/pr18414.C: New test.

View File

@ -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));