struct-layout-1_generate.c (iterative_hash): Remove little-endian optimizations.
authorMark Mitchell <mark@codesourcery.com>
Tue, 17 May 2005 18:25:58 +0000 (18:25 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 17 May 2005 18:25:58 +0000 (18:25 +0000)
* gcc.dg/compat/struct-layout-1_generate.c (iterative_hash):
Remove little-endian optimizations.

From-SVN: r99844

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c

index 712d9b9f8c6a4a28073715efef367a1ddae76e0a..09e8bfacd2cd2f24096d38fd9b54fec4dc763b6f 100644 (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.
index 6c627f0de588e36fe8e2959910dd6a14c0cdf288..d8b8bfbe0dc9b83a7a64c05c7ec7d05dfd6220af 100644 (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));