]> sourceware.org Git - glibc.git/commitdiff
Thu Apr 13 09:45:01 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
authorRoland McGrath <roland@gnu.org>
Fri, 14 Apr 1995 01:13:53 +0000 (01:13 +0000)
committerRoland McGrath <roland@gnu.org>
Fri, 14 Apr 1995 01:13:53 +0000 (01:13 +0000)
* elf/libelf.h (elf_hash): Use XOR instead of ANDN when the bits
  being cleared are already known to be set.  Thanks Ulrich.

ChangeLog
elf/libelf.h

index 5e3cbf8d97d0ddd8d8c93bc2d0edf30dc8ab517f..024b548079393265f8dd86e3604e61fc4c6fbf5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Apr 13 09:45:01 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
+
+       * elf/libelf.h (elf_hash): Use XOR instead of ANDN when the bits
+       being cleared are already known to be set.  Thanks Ulrich.
+
 Wed Apr 12 23:27:22 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
        * posix/environ.c: Add weak alias `_environ'.
index e95dd93eaa947b7553ecfb2bed093898e52cbed3..b6575b9824dccf671458bfef18cd17ae6cebc5a4 100644 (file)
@@ -220,8 +220,12 @@ elf_hash (__const char *__name)
       __hash = (__hash << 4) + *__name++;
       __hi = __hash & 0xf0000000;
       if (__hi != 0)
-       __hash ^= __hi >> 24;
-      __hash &= ~__hi;
+       {
+         __hash ^= __hi >> 24;
+         /* The ELF ABI says `hash &= ~hi', but this is equivalent
+            in this case and on some machines one insn instead of two.  */
+         __hash ^= __hi;
+       }
     }
   return __hash;
 }
This page took 0.048923 seconds and 5 git commands to generate.