projects
/
kopensolaris-gnu
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8db1f21
)
(elf_hash): Use XOR instead of ANDN when the bits being cleared are already
author
roland
<roland>
Thu, 13 Apr 1995 13:44:33 +0000
(13:44 +0000)
committer
roland
<roland>
Thu, 13 Apr 1995 13:44:33 +0000
(13:44 +0000)
known to be set.
elf/libelf.h
patch
|
blob
|
history
diff --git
a/elf/libelf.h
b/elf/libelf.h
index
e95dd93
..
b6575b9
100644
(file)
--- a/
elf/libelf.h
+++ b/
elf/libelf.h
@@
-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;
}