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.
This commit is contained in:
Roland McGrath 1995-04-14 01:13:53 +00:00
parent 6432a7793f
commit 6e33fad374
2 changed files with 11 additions and 2 deletions

View File

@ -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'.

View 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;
/* 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;
}