svn commit: trunk/uClibc/ldso/ldso

carmelo at uclibc.org carmelo at uclibc.org
Tue Mar 11 10:25:43 UTC 2008


Author: carmelo
Date: 2008-03-11 03:25:42 -0700 (Tue, 11 Mar 2008)
New Revision: 21288

Log:
Move calculation of rem within if (unlikely statement

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
SIgned-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>


Modified:
   trunk/uClibc/ldso/ldso/dl-hash.c


Changeset:
Modified: trunk/uClibc/ldso/ldso/dl-hash.c
===================================================================
--- trunk/uClibc/ldso/ldso/dl-hash.c	2008-03-11 08:49:45 UTC (rev 21287)
+++ trunk/uClibc/ldso/ldso/dl-hash.c	2008-03-11 10:25:42 UTC (rev 21288)
@@ -204,13 +204,15 @@
 
 	unsigned int hashbit1 = hash & (__ELF_NATIVE_CLASS - 1);
 	unsigned int hashbit2 = ((hash >> tpnt->l_gnu_shift) & (__ELF_NATIVE_CLASS - 1));
-	unsigned long rem;
-	do_rem (rem, hash, tpnt->nbucket);
 	_dl_assert (bitmask != NULL);
 
 	if (unlikely((bitmask_word >> hashbit1) & (bitmask_word >> hashbit2) & 1)) {
-		Elf32_Word bucket = tpnt->l_gnu_buckets[rem];
+		unsigned long rem;
+		Elf32_Word bucket;
 
+		do_rem (rem, hash, tpnt->nbucket);
+		bucket = tpnt->l_gnu_buckets[rem];
+
 		if (bucket != 0) {
 			const Elf32_Word *hasharr = &tpnt->l_gnu_chain_zero[bucket];
 			do {




More information about the uClibc-cvs mailing list