about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc32
diff options
context:
space:
mode:
authorOndřej Bílka <neleai@seznam.cz>2014-02-10 14:45:42 +0100
committerOndřej Bílka <neleai@seznam.cz>2014-02-10 15:07:12 +0100
commita1ffb40e32741f992c743e7b16c061fefa3747ac (patch)
tree246a29a87b26cfd5d07b17070f85eb3785018de9 /sysdeps/powerpc/powerpc32
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.xz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'sysdeps/powerpc/powerpc32')
-rw-r--r--sysdeps/powerpc/powerpc32/dl-irel.h2
-rw-r--r--sysdeps/powerpc/powerpc32/dl-machine.c10
-rw-r--r--sysdeps/powerpc/powerpc32/dl-machine.h4
3 files changed, 8 insertions, 8 deletions
diff --git a/sysdeps/powerpc/powerpc32/dl-irel.h b/sysdeps/powerpc/powerpc32/dl-irel.h
index 16b786b72f..9d6f56a37c 100644
--- a/sysdeps/powerpc/powerpc32/dl-irel.h
+++ b/sysdeps/powerpc/powerpc32/dl-irel.h
@@ -39,7 +39,7 @@ elf_irela (const Elf32_Rela *reloc)
 {
   unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
 
-  if (__builtin_expect (r_type == R_PPC_IRELATIVE, 1))
+  if (__glibc_likely (r_type == R_PPC_IRELATIVE))
     {
       Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
       Elf32_Addr value = elf_ifunc_invoke(reloc->r_addend);
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.c b/sysdeps/powerpc/powerpc32/dl-machine.c
index 4b77966e77..7ef1e3b4a6 100644
--- a/sysdeps/powerpc/powerpc32/dl-machine.c
+++ b/sysdeps/powerpc/powerpc32/dl-machine.c
@@ -442,19 +442,19 @@ __process_machine_rela (struct link_map *map,
       break;
 
     case R_PPC_ADDR24:
-      if (__builtin_expect (finaladdr > 0x01fffffc && finaladdr < 0xfe000000, 0))
+      if (__glibc_unlikely (finaladdr > 0x01fffffc && finaladdr < 0xfe000000))
 	_dl_reloc_overflow (map,  "R_PPC_ADDR24", reloc_addr, refsym);
       *reloc_addr = (*reloc_addr & 0xfc000003) | (finaladdr & 0x3fffffc);
       break;
 
     case R_PPC_ADDR16:
-      if (__builtin_expect (finaladdr > 0x7fff && finaladdr < 0xffff8000, 0))
+      if (__glibc_unlikely (finaladdr > 0x7fff && finaladdr < 0xffff8000))
 	_dl_reloc_overflow (map,  "R_PPC_ADDR16", reloc_addr, refsym);
       *(Elf32_Half*) reloc_addr = finaladdr;
       break;
 
     case R_PPC_UADDR16:
-      if (__builtin_expect (finaladdr > 0x7fff && finaladdr < 0xffff8000, 0))
+      if (__glibc_unlikely (finaladdr > 0x7fff && finaladdr < 0xffff8000))
 	_dl_reloc_overflow (map,  "R_PPC_UADDR16", reloc_addr, refsym);
       ((union unaligned *) reloc_addr)->u2 = finaladdr;
       break;
@@ -474,7 +474,7 @@ __process_machine_rela (struct link_map *map,
     case R_PPC_ADDR14:
     case R_PPC_ADDR14_BRTAKEN:
     case R_PPC_ADDR14_BRNTAKEN:
-      if (__builtin_expect (finaladdr > 0x7fff && finaladdr < 0xffff8000, 0))
+      if (__glibc_unlikely (finaladdr > 0x7fff && finaladdr < 0xffff8000))
 	_dl_reloc_overflow (map,  "R_PPC_ADDR14", reloc_addr, refsym);
       *reloc_addr = (*reloc_addr & 0xffff0003) | (finaladdr & 0xfffc);
       if (rinfo != R_PPC_ADDR14)
@@ -578,7 +578,7 @@ __process_machine_rela (struct link_map *map,
 
     inline void do_reloc16 (const char *r_name, Elf32_Addr value)
       {
-	if (__builtin_expect (value > 0x7fff && value < 0xffff8000, 0))
+	if (__glibc_unlikely (value > 0x7fff && value < 0xffff8000))
 	  _dl_reloc_overflow (map, r_name, reloc_addr, refsym);
 	*(Elf32_Half *) reloc_addr = value;
       }
diff --git a/sysdeps/powerpc/powerpc32/dl-machine.h b/sysdeps/powerpc/powerpc32/dl-machine.h
index 96d08c5d36..23b610fbf1 100644
--- a/sysdeps/powerpc/powerpc32/dl-machine.h
+++ b/sysdeps/powerpc/powerpc32/dl-machine.h
@@ -177,7 +177,7 @@ elf_machine_runtime_setup (struct link_map *map,
       extern void _dl_runtime_resolve (void);
       extern void _dl_prof_resolve (void);
 
-      if (__builtin_expect (!profile, 1))
+      if (__glibc_likely (!profile))
 	dlrr = _dl_runtime_resolve;
       else
 	{
@@ -287,7 +287,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
       return;
     }
 
-  if (__builtin_expect (r_type == R_PPC_NONE, 0))
+  if (__glibc_unlikely (r_type == R_PPC_NONE))
     return;
 
   /* binutils on ppc32 includes st_value in r_addend for relocations