diff options
author | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 14:45:42 +0100 |
---|---|---|
committer | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 15:07:12 +0100 |
commit | a1ffb40e32741f992c743e7b16c061fefa3747ac (patch) | |
tree | 246a29a87b26cfd5d07b17070f85eb3785018de9 /sysdeps/powerpc | |
parent | 1448f3244714a9dabb5240ec18b094f100887d5c (diff) | |
download | glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.bz2 glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip |
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'sysdeps/powerpc')
-rw-r--r-- | sysdeps/powerpc/powerpc32/dl-irel.h | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc32/dl-machine.c | 10 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc32/dl-machine.h | 4 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/dl-irel.h | 4 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/dl-machine.h | 6 |
5 files changed, 13 insertions, 13 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 diff --git a/sysdeps/powerpc/powerpc64/dl-irel.h b/sysdeps/powerpc/powerpc64/dl-irel.h index 8f834ce63b..ae9e1b696c 100644 --- a/sysdeps/powerpc/powerpc64/dl-irel.h +++ b/sysdeps/powerpc/powerpc64/dl-irel.h @@ -40,13 +40,13 @@ elf_irela (const Elf64_Rela *reloc) { unsigned int r_type = ELF64_R_TYPE (reloc->r_info); - if (__builtin_expect (r_type == R_PPC64_IRELATIVE, 1)) + if (__glibc_likely (r_type == R_PPC64_IRELATIVE)) { Elf64_Addr *const reloc_addr = (void *) reloc->r_offset; Elf64_Addr value = elf_ifunc_invoke(reloc->r_addend); *reloc_addr = value; } - else if (__builtin_expect (r_type == R_PPC64_JMP_IREL, 1)) + else if (__glibc_likely (r_type == R_PPC64_JMP_IREL)) { Elf64_Addr *const reloc_addr = (void *) reloc->r_offset; Elf64_Addr value = elf_ifunc_invoke(reloc->r_addend); diff --git a/sysdeps/powerpc/powerpc64/dl-machine.h b/sysdeps/powerpc/powerpc64/dl-machine.h index dd44df5fa6..bc99183570 100644 --- a/sysdeps/powerpc/powerpc64/dl-machine.h +++ b/sysdeps/powerpc/powerpc64/dl-machine.h @@ -655,7 +655,7 @@ elf_machine_rela (struct link_map *map, return; } - if (__builtin_expect (r_type == R_PPC64_NONE, 0)) + if (__glibc_unlikely (r_type == R_PPC64_NONE)) return; /* We need SYM_MAP even in the absence of TLS, for elf_machine_fixup_plt @@ -680,13 +680,13 @@ elf_machine_rela (struct link_map *map, return; case R_PPC64_IRELATIVE: - if (__builtin_expect (!skip_ifunc, 1)) + if (__glibc_likely (!skip_ifunc)) value = resolve_ifunc (value, map, sym_map); *reloc_addr = value; return; case R_PPC64_JMP_IREL: - if (__builtin_expect (!skip_ifunc, 1)) + if (__glibc_likely (!skip_ifunc)) value = resolve_ifunc (value, map, sym_map); /* Fall thru */ case R_PPC64_JMP_SLOT: |