about summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/dl-irel.h2
-rw-r--r--sysdeps/i386/dl-machine.h22
2 files changed, 12 insertions, 12 deletions
diff --git a/sysdeps/i386/dl-irel.h b/sysdeps/i386/dl-irel.h
index 6eb3495f88..4cf81ee207 100644
--- a/sysdeps/i386/dl-irel.h
+++ b/sysdeps/i386/dl-irel.h
@@ -39,7 +39,7 @@ elf_irel (const Elf32_Rel *reloc)
   Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
   const unsigned long int r_type = ELF32_R_TYPE (reloc->r_info);
 
-  if (__builtin_expect (r_type == R_386_IRELATIVE, 1))
+  if (__glibc_likely (r_type == R_386_IRELATIVE))
     {
       Elf32_Addr value = elf_ifunc_invoke(*reloc_addr);
       *reloc_addr = value;
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index 917550c64f..368bee2164 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -123,7 +123,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 	 to intercept the calls to collect information.  In this case we
 	 don't store the address in the GOT so that all future calls also
 	 end in this function.  */
-      if (__builtin_expect (profile, 0))
+      if (__glibc_unlikely (profile))
 	{
 	  got[2] = (Elf32_Addr) &_dl_runtime_profile;
 
@@ -308,7 +308,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
   const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
 
 # if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
-  if (__builtin_expect (r_type == R_386_RELATIVE, 0))
+  if (__glibc_unlikely (r_type == R_386_RELATIVE))
     {
 #  if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
       /* This is defined in rtld.c, but nowhere in the static libc.a;
@@ -325,7 +325,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 	*reloc_addr += map->l_addr;
     }
 #  ifndef RTLD_BOOTSTRAP
-  else if (__builtin_expect (r_type == R_386_NONE, 0))
+  else if (__glibc_unlikely (r_type == R_386_NONE))
     return;
 #  endif
   else
@@ -660,7 +660,7 @@ elf_machine_lazy_rel (struct link_map *map,
   Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
   const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
   /* Check for unexpected PLT reloc type.  */
-  if (__builtin_expect (r_type == R_386_JMP_SLOT, 1))
+  if (__glibc_likely (r_type == R_386_JMP_SLOT))
     {
       if (__builtin_expect (map->l_mach.plt, 0) == 0)
 	*reloc_addr += l_addr;
@@ -668,7 +668,7 @@ elf_machine_lazy_rel (struct link_map *map,
 	*reloc_addr = (map->l_mach.plt
 		       + (((Elf32_Addr) reloc_addr) - map->l_mach.gotplt) * 4);
     }
-  else if (__builtin_expect (r_type == R_386_TLS_DESC, 1))
+  else if (__glibc_likely (r_type == R_386_TLS_DESC))
     {
       struct tlsdesc volatile * __attribute__((__unused__)) td =
 	(struct tlsdesc volatile *)reloc_addr;
@@ -715,10 +715,10 @@ elf_machine_lazy_rel (struct link_map *map,
 # endif
 	}
     }
-  else if (__builtin_expect (r_type == R_386_IRELATIVE, 0))
+  else if (__glibc_unlikely (r_type == R_386_IRELATIVE))
     {
       Elf32_Addr value = map->l_addr + *reloc_addr;
-      if (__builtin_expect (!skip_ifunc, 1))
+      if (__glibc_likely (!skip_ifunc))
 	value = ((Elf32_Addr (*) (void)) value) ();
       *reloc_addr = value;
     }
@@ -736,9 +736,9 @@ elf_machine_lazy_rela (struct link_map *map,
 {
   Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
   const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
-  if (__builtin_expect (r_type == R_386_JMP_SLOT, 1))
+  if (__glibc_likely (r_type == R_386_JMP_SLOT))
     ;
-  else if (__builtin_expect (r_type == R_386_TLS_DESC, 1))
+  else if (__glibc_likely (r_type == R_386_TLS_DESC))
     {
       struct tlsdesc volatile * __attribute__((__unused__)) td =
 	(struct tlsdesc volatile *)reloc_addr;
@@ -746,10 +746,10 @@ elf_machine_lazy_rela (struct link_map *map,
       td->arg = (void*)reloc;
       td->entry = _dl_tlsdesc_resolve_rela;
     }
-  else if (__builtin_expect (r_type == R_386_IRELATIVE, 0))
+  else if (__glibc_unlikely (r_type == R_386_IRELATIVE))
     {
       Elf32_Addr value = map->l_addr + reloc->r_addend;
-      if (__builtin_expect (!skip_ifunc, 1))
+      if (__glibc_likely (!skip_ifunc))
 	value = ((Elf32_Addr (*) (void)) value) ();
       *reloc_addr = value;
     }