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/sparc | |
parent | 1448f3244714a9dabb5240ec18b094f100887d5c (diff) | |
download | glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.bz2 |
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r-- | sysdeps/sparc/sparc32/dl-irel.h | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/dl-machine.h | 10 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/dl-irel.h | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/dl-machine.h | 10 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/dl-plt.h | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/sysdeps/sparc/sparc32/dl-irel.h b/sysdeps/sparc/sparc32/dl-irel.h index 03441ec..5b61e0a 100644 --- a/sysdeps/sparc/sparc32/dl-irel.h +++ b/sysdeps/sparc/sparc32/dl-irel.h @@ -40,13 +40,13 @@ elf_irela (const Elf32_Rela *reloc) { unsigned int r_type = ELF32_R_TYPE (reloc->r_info); - if (__builtin_expect (r_type == R_SPARC_IRELATIVE, 1)) + if (__glibc_likely (r_type == R_SPARC_IRELATIVE)) { Elf32_Addr *const reloc_addr = (void *) reloc->r_offset; Elf32_Addr value = elf_ifunc_invoke(reloc->r_addend); *reloc_addr = value; } - else if (__builtin_expect (r_type == R_SPARC_JMP_IREL, 1)) + else if (__glibc_likely (r_type == R_SPARC_JMP_IREL)) { Elf32_Addr *const reloc_addr = (void *) reloc->r_offset; Elf32_Addr value = elf_ifunc_invoke(reloc->r_addend); diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h index 91b125d..e7d31b4 100644 --- a/sysdeps/sparc/sparc32/dl-machine.h +++ b/sysdeps/sparc/sparc32/dl-machine.h @@ -350,17 +350,17 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, weak_extern (_dl_rtld_map); #endif - if (__builtin_expect (r_type == R_SPARC_NONE, 0)) + if (__glibc_unlikely (r_type == R_SPARC_NONE)) return; - if (__builtin_expect (r_type == R_SPARC_SIZE32, 0)) + if (__glibc_unlikely (r_type == R_SPARC_SIZE32)) { *reloc_addr = sym->st_size + reloc->r_addend; return; } #if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC - if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0)) + if (__glibc_unlikely (r_type == R_SPARC_RELATIVE)) { # if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC if (map != &_dl_rtld_map) /* Already done in rtld itself. */ @@ -549,12 +549,12 @@ 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); - if (__builtin_expect (r_type == R_SPARC_JMP_SLOT, 1)) + if (__glibc_likely (r_type == R_SPARC_JMP_SLOT)) ; else if (r_type == R_SPARC_JMP_IREL) { Elf32_Addr value = map->l_addr + reloc->r_addend; - if (__builtin_expect (!skip_ifunc, 1)) + if (__glibc_likely (!skip_ifunc)) value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap)); sparc_fixup_plt (reloc, reloc_addr, value, 1, 1); } diff --git a/sysdeps/sparc/sparc64/dl-irel.h b/sysdeps/sparc/sparc64/dl-irel.h index 85b36cd..9aae20a 100644 --- a/sysdeps/sparc/sparc64/dl-irel.h +++ b/sysdeps/sparc/sparc64/dl-irel.h @@ -40,13 +40,13 @@ elf_irela (const Elf64_Rela *reloc) { unsigned int r_type = (reloc->r_info & 0xff); - if (__builtin_expect (r_type == R_SPARC_IRELATIVE, 1)) + if (__glibc_likely (r_type == R_SPARC_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_SPARC_JMP_IREL, 1)) + else if (__glibc_likely (r_type == R_SPARC_JMP_IREL)) { Elf64_Addr *const reloc_addr = (void *) reloc->r_offset; Elf64_Addr value = elf_ifunc_invoke(reloc->r_addend); diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index b285402..ef4ad4c 100644 --- a/sysdeps/sparc/sparc64/dl-machine.h +++ b/sysdeps/sparc/sparc64/dl-machine.h @@ -377,17 +377,17 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc, weak_extern (_dl_rtld_map); #endif - if (__builtin_expect (r_type == R_SPARC_NONE, 0)) + if (__glibc_unlikely (r_type == R_SPARC_NONE)) return; - if (__builtin_expect (r_type == R_SPARC_SIZE64, 0)) + if (__glibc_unlikely (r_type == R_SPARC_SIZE64)) { *reloc_addr = sym->st_size + reloc->r_addend; return; } #if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC - if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0)) + if (__glibc_unlikely (r_type == R_SPARC_RELATIVE)) { # if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC if (map != &_dl_rtld_map) /* Already done in rtld itself. */ @@ -652,13 +652,13 @@ elf_machine_lazy_rel (struct link_map *map, Elf64_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset); const unsigned int r_type = ELF64_R_TYPE (reloc->r_info); - if (__builtin_expect (r_type == R_SPARC_JMP_SLOT, 1)) + if (__glibc_likely (r_type == R_SPARC_JMP_SLOT)) ; else if (r_type == R_SPARC_JMP_IREL || r_type == R_SPARC_IRELATIVE) { Elf64_Addr value = map->l_addr + reloc->r_addend; - if (__builtin_expect (!skip_ifunc, 1)) + if (__glibc_likely (!skip_ifunc)) value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap)); if (r_type == R_SPARC_JMP_IREL) { diff --git a/sysdeps/sparc/sparc64/dl-plt.h b/sysdeps/sparc/sparc64/dl-plt.h index be1927b..82bc186 100644 --- a/sysdeps/sparc/sparc64/dl-plt.h +++ b/sysdeps/sparc/sparc64/dl-plt.h @@ -115,7 +115,7 @@ sparc64_fixup_plt (struct link_map *map, const Elf64_Rela *reloc, /* ??? Some tricks can be stolen from the sparc64 egcs backend constant formation code I wrote. -DaveM */ - if (__builtin_expect (high32 & 0x3ff, 0)) + if (__glibc_unlikely (high32 & 0x3ff)) { /* sethi %hh(value), %g1 sethi %lm(value), %g5 |