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:
parent
b22327455d
commit
a3a02333fa
@ -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.
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user