Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Roland McGrath committed Apr 14, 1995
1 parent 6432a77 commit 6e33fad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions 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'.
Expand Down
8 changes: 6 additions & 2 deletions elf/libelf.h
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6e33fad

Please sign in to comment.