summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-24 15:49:01 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-24 15:49:01 +0000
commit20b02a2e39dc50f5ef9c0ea3ed75f9bc6c8c4762 (patch)
tree1d078cfc282839def0ff21b1cc74239d1bb279b7
parent9682a871893ca51c048ef88d95e4bd114af5c59c (diff)
downloadglibc-20b02a2e39dc50f5ef9c0ea3ed75f9bc6c8c4762.tar.gz
glibc-20b02a2e39dc50f5ef9c0ea3ed75f9bc6c8c4762.tar.xz
glibc-20b02a2e39dc50f5ef9c0ea3ed75f9bc6c8c4762.zip
Update.
2000-04-24  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/i386/dl-machine.h (elf_machine_rel): Add
	__builtin_expect where desirable.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/i386/dl-machine.h8
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ee1c6a0ee..a4092084f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-24  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/i386/dl-machine.h (elf_machine_rel): Add
+	__builtin_expect where desirable.
+
 2000-04-23  Ulrich Drepper  <drepper@redhat.com>
 
 	* manual/Makefile (chapters): Add syslog.
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 5220d923b7..de6ef9886e 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -327,8 +327,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 	    /* This can happen in trace mode if an object could not be
 	       found.  */
 	    break;
-	  if (sym->st_size > refsym->st_size
-	      || (sym->st_size < refsym->st_size && _dl_verbose))
+	  if (__builtin_expect (sym->st_size > refsym->st_size, 0)
+	      || (__builtin_expect (sym->st_size < refsym->st_size, 0)
+		  && __builtin_expect (_dl_verbose, 0)))
 	    {
 	      const char *strtab;
 
@@ -382,7 +383,8 @@ elf_machine_lazy_rel (struct link_map *map,
 {
   Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
   /* Check for unexpected PLT reloc type.  */
-  if (ELF32_R_TYPE (reloc->r_info) == R_386_JMP_SLOT)
+  if (__builtin_expect (ELF32_R_TYPE (reloc->r_info), R_386_JMP_SLOT)
+      == R_386_JMP_SLOT)
     *reloc_addr += l_addr;
   else
     _dl_reloc_bad_type (map, ELFW(R_TYPE) (reloc->r_info), 1);