diff options
Diffstat (limited to 'sysdeps/powerpc/powerpc32')
336 files changed, 961 insertions, 1423 deletions
diff --git a/sysdeps/powerpc/powerpc32/405/memcmp.S b/sysdeps/powerpc/powerpc32/405/memcmp.S index a021f4cff3..da5a588870 100644 --- a/sysdeps/powerpc/powerpc32/405/memcmp.S +++ b/sysdeps/powerpc/powerpc32/405/memcmp.S @@ -1,5 +1,5 @@ /* Optimized memcmp implementation for PowerPC476. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/405/memcpy.S b/sysdeps/powerpc/powerpc32/405/memcpy.S index 58ecd52530..12b8a98c4f 100644 --- a/sysdeps/powerpc/powerpc32/405/memcpy.S +++ b/sysdeps/powerpc/powerpc32/405/memcpy.S @@ -1,5 +1,5 @@ /* Optimized memcpy implementation for PowerPC476. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/405/memset.S b/sysdeps/powerpc/powerpc32/405/memset.S index e32a0e9de4..14f35daead 100644 --- a/sysdeps/powerpc/powerpc32/405/memset.S +++ b/sysdeps/powerpc/powerpc32/405/memset.S @@ -1,5 +1,5 @@ /* Optimized memset for PowerPC405,440,464 (32-byte cacheline). - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/405/strcmp.S b/sysdeps/powerpc/powerpc32/405/strcmp.S index 69cfea6fd7..62420da8b9 100644 --- a/sysdeps/powerpc/powerpc32/405/strcmp.S +++ b/sysdeps/powerpc/powerpc32/405/strcmp.S @@ -1,5 +1,5 @@ /* Optimized strcmp implementation for PowerPC476. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/405/strcpy.S b/sysdeps/powerpc/powerpc32/405/strcpy.S index c00995db32..2244b5395b 100644 --- a/sysdeps/powerpc/powerpc32/405/strcpy.S +++ b/sysdeps/powerpc/powerpc32/405/strcpy.S @@ -1,5 +1,5 @@ /* Optimized strcpy implementation for PowerPC476. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/405/strlen.S b/sysdeps/powerpc/powerpc32/405/strlen.S index d944e99934..eb84c8d2e2 100644 --- a/sysdeps/powerpc/powerpc32/405/strlen.S +++ b/sysdeps/powerpc/powerpc32/405/strlen.S @@ -1,5 +1,5 @@ /* Optimized strlen implementation for PowerPC476. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/405/strncmp.S b/sysdeps/powerpc/powerpc32/405/strncmp.S index d5b15ea04b..c63100d621 100644 --- a/sysdeps/powerpc/powerpc32/405/strncmp.S +++ b/sysdeps/powerpc/powerpc32/405/strncmp.S @@ -1,5 +1,5 @@ /* Optimized strncmp implementation for PowerPC476. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/476/memset.S b/sysdeps/powerpc/powerpc32/476/memset.S index 9ce6229d72..3249d3f584 100644 --- a/sysdeps/powerpc/powerpc32/476/memset.S +++ b/sysdeps/powerpc/powerpc32/476/memset.S @@ -1,5 +1,5 @@ /* Optimized memset for PowerPC476 (128-byte cacheline). - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/Implies-after b/sysdeps/powerpc/powerpc32/Implies-after new file mode 100644 index 0000000000..78dba9510c --- /dev/null +++ b/sysdeps/powerpc/powerpc32/Implies-after @@ -0,0 +1,5 @@ +# On PowerPC we use the IBM extended long double format. +ieee754/ldbl-128ibm +ieee754/ldbl-opt +ieee754/dbl-64 +ieee754/flt-32 diff --git a/sysdeps/powerpc/powerpc32/__longjmp-common.S b/sysdeps/powerpc/powerpc32/__longjmp-common.S index c4e2b41574..0423e3ee88 100644 --- a/sysdeps/powerpc/powerpc32/__longjmp-common.S +++ b/sysdeps/powerpc/powerpc32/__longjmp-common.S @@ -1,5 +1,5 @@ /* longjmp for PowerPC. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/__longjmp.S b/sysdeps/powerpc/powerpc32/__longjmp.S index fd865f3328..2f5145e972 100644 --- a/sysdeps/powerpc/powerpc32/__longjmp.S +++ b/sysdeps/powerpc/powerpc32/__longjmp.S @@ -1,5 +1,5 @@ /* AltiVec/VMX (new) version of __longjmp for PowerPC. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/a2/memcpy.S b/sysdeps/powerpc/powerpc32/a2/memcpy.S index 4c74342299..196b6d98e5 100644 --- a/sysdeps/powerpc/powerpc32/a2/memcpy.S +++ b/sysdeps/powerpc/powerpc32/a2/memcpy.S @@ -1,5 +1,5 @@ /* Optimized memcpy implementation for PowerPC A2. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Michael Brutman <brutman@us.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/add_n.S b/sysdeps/powerpc/powerpc32/add_n.S index a66867b523..eeecc8d7d2 100644 --- a/sysdeps/powerpc/powerpc32/add_n.S +++ b/sysdeps/powerpc/powerpc32/add_n.S @@ -1,5 +1,5 @@ /* Add two limb vectors of equal, non-zero length for PowerPC. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/addmul_1.S b/sysdeps/powerpc/powerpc32/addmul_1.S index dba1573e24..9232a346a5 100644 --- a/sysdeps/powerpc/powerpc32/addmul_1.S +++ b/sysdeps/powerpc/powerpc32/addmul_1.S @@ -1,5 +1,5 @@ /* Multiply a limb vector by a single limb, for PowerPC. - Copyright (C) 1993-2016 Free Software Foundation, Inc. + Copyright (C) 1993-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/atomic-machine.h b/sysdeps/powerpc/powerpc32/atomic-machine.h index 1d407b3490..e0de9d858d 100644 --- a/sysdeps/powerpc/powerpc32/atomic-machine.h +++ b/sysdeps/powerpc/powerpc32/atomic-machine.h @@ -1,5 +1,5 @@ /* Atomic operations. PowerPC32 version. - Copyright (C) 2003-2016 Free Software Foundation, Inc. + Copyright (C) 2003-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003. @@ -35,6 +35,7 @@ #define __HAVE_64B_ATOMICS 0 #define USE_ATOMIC_COMPILER_BUILTINS 0 +#define ATOMIC_EXCHANGE_USES_CAS 1 /* * The 32-bit exchange_bool is different on powerpc64 because the subf @@ -58,22 +59,6 @@ __tmp != 0; \ }) -#define __arch_compare_and_exchange_bool_32_rel(mem, newval, oldval) \ -({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ - " stwcx. %3,0,%1\n" \ - " bne- 1b\n" \ - "2: " \ - : "=&r" (__tmp) \ - : "b" (mem), "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ -}) - /* Powerpc32 processors don't implement the 64-bit (doubleword) forms of load and reserve (ldarx) and store conditional (stdcx.) instructions. So for powerpc32 we stub out the 64-bit forms. */ @@ -83,9 +68,6 @@ #define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ (abort (), (__typeof (*mem)) 0) -#define __arch_compare_and_exchange_bool_64_rel(mem, newval, oldval) \ - (abort (), 0) - #define __arch_compare_and_exchange_val_64_rel(mem, newval, oldval) \ (abort (), (__typeof (*mem)) 0) diff --git a/sysdeps/powerpc/powerpc32/backtrace.c b/sysdeps/powerpc/powerpc32/backtrace.c index 1f372374db..5422fdd50d 100644 --- a/sysdeps/powerpc/powerpc32/backtrace.c +++ b/sysdeps/powerpc/powerpc32/backtrace.c @@ -1,5 +1,5 @@ /* Return backtrace of current program state. - Copyright (C) 1998-2016 Free Software Foundation, Inc. + Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -52,10 +52,10 @@ struct signal_frame_32 { }; static inline int -is_sigtramp_address (unsigned int nip) +is_sigtramp_address (void *nip) { #ifdef SHARED - if (nip == (unsigned int)__vdso_sigtramp32) + if (nip == VDSO_SYMBOL (sigtramp32)) return 1; #endif return 0; @@ -64,15 +64,15 @@ is_sigtramp_address (unsigned int nip) struct rt_signal_frame_32 { char dummy[SIGNAL_FRAMESIZE + 16]; siginfo_t info; - struct ucontext uc; + ucontext_t uc; /* We don't care about the rest, since IP value is at 'uc' field. */ }; static inline int -is_sigtramp_address_rt (unsigned int nip) +is_sigtramp_address_rt (void * nip) { #ifdef SHARED - if (nip == (unsigned int)__vdso_sigtramp_rt32) + if (nip == VDSO_SYMBOL (sigtramp_rt32)) return 1; #endif return 0; @@ -100,20 +100,23 @@ __backtrace (void **array, int size) /* Check if the symbol is the signal trampoline and get the interrupted * symbol address from the trampoline saved area. */ - if (is_sigtramp_address ((unsigned int)current->return_address)) + if (is_sigtramp_address (current->return_address)) { struct signal_frame_32 *sigframe = (struct signal_frame_32*) current; gregset = &sigframe->mctx.gregs; } - else if (is_sigtramp_address_rt ((unsigned int)current->return_address)) + else if (is_sigtramp_address_rt (current->return_address)) { struct rt_signal_frame_32 *sigframe = (struct rt_signal_frame_32*) current; gregset = &sigframe->uc.uc_mcontext.uc_regs->gregs; } if (gregset) - array[++count] = (void*)((*gregset)[PT_NIP]); + { + array[++count] = (void*)((*gregset)[PT_NIP]); + current = (void*)((*gregset)[PT_R1]); + } } /* It's possible the second-last stack frame can't return diff --git a/sysdeps/powerpc/powerpc32/bits/wordsize.h b/sysdeps/powerpc/powerpc32/bits/wordsize.h index f31ac9ab08..04ca9debf0 100644 --- a/sysdeps/powerpc/powerpc32/bits/wordsize.h +++ b/sysdeps/powerpc/powerpc32/bits/wordsize.h @@ -5,4 +5,7 @@ # define __WORDSIZE_TIME64_COMPAT32 1 #else # define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 #endif diff --git a/sysdeps/powerpc/powerpc32/bsd-_setjmp.S b/sysdeps/powerpc/powerpc32/bsd-_setjmp.S index 349972c968..60fbffa141 100644 --- a/sysdeps/powerpc/powerpc32/bsd-_setjmp.S +++ b/sysdeps/powerpc/powerpc32/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. PowerPC32/64 version. - Copyright (C) 1994-2016 Free Software Foundation, Inc. + Copyright (C) 1994-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/bsd-setjmp.S b/sysdeps/powerpc/powerpc32/bsd-setjmp.S index 2cc9e4e834..6608b062dc 100644 --- a/sysdeps/powerpc/powerpc32/bsd-setjmp.S +++ b/sysdeps/powerpc/powerpc32/bsd-setjmp.S @@ -1,5 +1,5 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. PowerPC32/64 version. - Copyright (C) 1994-2016 Free Software Foundation, Inc. + Copyright (C) 1994-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/bzero.S b/sysdeps/powerpc/powerpc32/bzero.S index 0875c98d5a..3ee0db04b9 100644 --- a/sysdeps/powerpc/powerpc32/bzero.S +++ b/sysdeps/powerpc/powerpc32/bzero.S @@ -1,5 +1,5 @@ /* Optimized bzero `implementation' for PowerPC. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/cell/memcpy.S b/sysdeps/powerpc/powerpc32/cell/memcpy.S index 64226d6c8a..484c0dcfd7 100644 --- a/sysdeps/powerpc/powerpc32/cell/memcpy.S +++ b/sysdeps/powerpc/powerpc32/cell/memcpy.S @@ -1,5 +1,5 @@ /* Optimized memcpy implementation for CELL BE PowerPC. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/crti.S b/sysdeps/powerpc/powerpc32/crti.S index af9409e8a3..e4ee8dd484 100644 --- a/sysdeps/powerpc/powerpc32/crti.S +++ b/sysdeps/powerpc/powerpc32/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for PowerPC. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -58,6 +58,7 @@ .section .init,"ax",@progbits .align 2 .globl _init + .hidden _init .type _init, @function _init: stwu r1, -16(r1) @@ -80,6 +81,7 @@ _init: .section .fini,"ax",@progbits .align 2 .globl _fini + .hidden _fini .type _fini, @function _fini: stwu r1, -16(r1) diff --git a/sysdeps/powerpc/powerpc32/crtn.S b/sysdeps/powerpc/powerpc32/crtn.S index c080cad310..fbc5911290 100644 --- a/sysdeps/powerpc/powerpc32/crtn.S +++ b/sysdeps/powerpc/powerpc32/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for PowerPC. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/dl-irel.h b/sysdeps/powerpc/powerpc32/dl-irel.h index 03ffc7a977..a7368b2582 100644 --- a/sysdeps/powerpc/powerpc32/dl-irel.h +++ b/sysdeps/powerpc/powerpc32/dl-irel.h @@ -1,6 +1,6 @@ /* Machine-dependent ELF indirect relocation inline functions. PowerPC version. - Copyright (C) 2009-2016 Free Software Foundation, Inc. + Copyright (C) 2009-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/dl-machine.c b/sysdeps/powerpc/powerpc32/dl-machine.c index dd1d1f4a15..e82f1d8619 100644 --- a/sysdeps/powerpc/powerpc32/dl-machine.c +++ b/sysdeps/powerpc/powerpc32/dl-machine.c @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation functions. PowerPC version. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/dl-machine.h b/sysdeps/powerpc/powerpc32/dl-machine.h index 88e7941f2f..31c7f3f95a 100644 --- a/sysdeps/powerpc/powerpc32/dl-machine.h +++ b/sysdeps/powerpc/powerpc32/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. PowerPC version. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -235,6 +235,7 @@ extern Elf32_Addr __elf_machine_fixup_plt (struct link_map *map, static inline Elf32_Addr elf_machine_fixup_plt (struct link_map *map, lookup_t t, + const ElfW(Sym) *refsym, const ElfW(Sym) *sym, const Elf32_Rela *reloc, Elf32_Addr *reloc_addr, Elf64_Addr finaladdr) { @@ -309,11 +310,14 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, against local symbols. */ if (__builtin_expect (ELF32_ST_BIND (sym->st_info) == STB_LOCAL, 0) && sym->st_shndx != SHN_UNDEF) - value = map->l_addr; + { + sym_map = map; + value = map->l_addr; + } else { sym_map = RESOLVE_MAP (&sym, version, r_type); - value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value; + value = SYMBOL_ADDRESS (sym_map, sym, true); } value += reloc->r_addend; #else diff --git a/sysdeps/powerpc/powerpc32/dl-start.S b/sysdeps/powerpc/powerpc32/dl-start.S index 4c20f713a8..244d87fb6d 100644 --- a/sysdeps/powerpc/powerpc32/dl-start.S +++ b/sysdeps/powerpc/powerpc32/dl-start.S @@ -1,5 +1,5 @@ /* Machine-dependent ELF startup code. PowerPC version. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/dl-trampoline.S b/sysdeps/powerpc/powerpc32/dl-trampoline.S index b0c07dd1fa..cac4e20443 100644 --- a/sysdeps/powerpc/powerpc32/dl-trampoline.S +++ b/sysdeps/powerpc/powerpc32/dl-trampoline.S @@ -1,5 +1,5 @@ /* PLT trampolines. PPC32 version. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/atomic-feclearexcept.c b/sysdeps/powerpc/powerpc32/e500/nofpu/atomic-feclearexcept.c index 039780e697..5108d5ca1e 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/atomic-feclearexcept.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/atomic-feclearexcept.c @@ -1,6 +1,6 @@ /* Clear floating-point exceptions for atomic compound assignment. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/atomic-feholdexcept.c b/sysdeps/powerpc/powerpc32/e500/nofpu/atomic-feholdexcept.c index dc36cee36d..137eba9629 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/atomic-feholdexcept.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/atomic-feholdexcept.c @@ -1,6 +1,6 @@ /* Store current floating-point environment and clear exceptions for atomic compound assignment. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/atomic-feupdateenv.c b/sysdeps/powerpc/powerpc32/e500/nofpu/atomic-feupdateenv.c index ffcd0f56bc..aa5faba52f 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/atomic-feupdateenv.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/atomic-feupdateenv.c @@ -1,6 +1,6 @@ /* Install given floating-point environment and raise exceptions for atomic compound assignment. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fclrexcpt.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fclrexcpt.c index 4484ed83a4..d215d49f56 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fclrexcpt.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fclrexcpt.c @@ -1,5 +1,5 @@ /* Clear given exceptions in current floating-point environment. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fe_note_change.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fe_note_change.c index 237fce9dbb..8e0bf03ba2 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fe_note_change.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fe_note_change.c @@ -1,5 +1,5 @@ /* Note a change to floating-point exceptions. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fedisblxcpt.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fedisblxcpt.c index 9b5de4be20..a766c7eb08 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fedisblxcpt.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fedisblxcpt.c @@ -1,5 +1,5 @@ /* Disable floating-point exceptions. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/feenablxcpt.c b/sysdeps/powerpc/powerpc32/e500/nofpu/feenablxcpt.c index ba955a2bdc..65f7d468d0 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/feenablxcpt.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/feenablxcpt.c @@ -1,5 +1,5 @@ /* Enable floating-point exceptions. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fegetenv.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fegetenv.c index 7eb7f3bb3b..31502036e8 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fegetenv.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fegetenv.c @@ -1,5 +1,5 @@ /* Store current floating-point environment. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fegetexcept.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fegetexcept.c index 37a7d7d7f8..a3df28e730 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fegetexcept.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fegetexcept.c @@ -1,5 +1,5 @@ /* Get floating-point exceptions. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-power5.S b/sysdeps/powerpc/powerpc32/e500/nofpu/fegetmode.c index b16e78bc41..0a2d70d13a 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-power5.S +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fegetmode.c @@ -1,5 +1,5 @@ -/* sqrt function. PowerPC32/POWER5 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Store current floating-point control modes. e500 version. + Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,16 +16,22 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#include <fenv_libc.h> #include <sysdep.h> -#include <math_ldbl_opt.h> +#include <sys/prctl.h> -#undef weak_alias -#define weak_alias(a,b) -#undef strong_alias -#define strong_alias(a,b) -#undef compat_symbol -#define compat_symbol(a,b,c,d) +int +fegetmode (femode_t *modep) +{ + fenv_union_t u; + INTERNAL_SYSCALL_DECL (err); + int r; -#define __sqrt __sqrt_power5 + r = INTERNAL_SYSCALL (prctl, err, 2, PR_GET_FPEXC, &u.l[0]); + if (INTERNAL_SYSCALL_ERROR_P (r, err)) + return -1; -#include <sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S> + u.l[1] = fegetenv_register (); + *modep = u.fenv; + return 0; +} diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fegetround.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fegetround.c index 387f73d932..99bdf7fb6c 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fegetround.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fegetround.c @@ -1,5 +1,5 @@ /* Return current rounding direction. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c b/sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c index 19d8121416..ff4a64909e 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c @@ -1,6 +1,6 @@ /* Store current floating-point environment and clear exceptions. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fenv_const.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fenv_const.c index 11e24ca182..fe9c652f7a 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fenv_const.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fenv_const.c @@ -1,5 +1,5 @@ /* Constant floating-point environments for e500. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -28,6 +28,10 @@ const unsigned long long __fe_dfl_env __attribute__ ((aligned (8))) = 0x3cULL; +/* The same representation is used for femode_t. */ +extern const unsigned long long __fe_dfl_mode + __attribute__ ((aligned (8), alias ("__fe_dfl_env"))); + /* Floating-point environment where none of the exceptions are masked. */ const unsigned long long __fe_enabled_env __attribute__ ((aligned (8))) = (((unsigned long long) (PR_FP_EXC_DIV diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fenv_libc.h b/sysdeps/powerpc/powerpc32/e500/nofpu/fenv_libc.h index 928b766966..386bbdc071 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fenv_libc.h +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fenv_libc.h @@ -1,5 +1,5 @@ /* Internal libc stuff for floating point environment routines. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c index 2b64fb78fa..f768fe5d66 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c @@ -1,5 +1,5 @@ /* Install given floating-point environment. e500 version. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-ppc32.S b/sysdeps/powerpc/powerpc32/e500/nofpu/fesetexcept.c index 7bf32aa1f3..5131885794 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt-ppc32.S +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fesetexcept.c @@ -1,5 +1,5 @@ -/* sqrt function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Set given exception flags. e500 version. + Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,16 +16,22 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> -#include <math_ldbl_opt.h> +#include <fenv_libc.h> -#undef weak_alias -#define weak_alias(a,b) -#undef strong_alias -#define strong_alias(a,b) -#undef compat_symbol -#define compat_symbol(a,b,c,d) +int +fesetexcept (int excepts) +{ + unsigned long old_spefscr, spefscr; + int excepts_spe = __fexcepts_to_spe (excepts); -#define __sqrt __sqrt_ppc32 + old_spefscr = fegetenv_register (); + spefscr = old_spefscr | excepts_spe; + fesetenv_register (spefscr); -#include <sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S> + /* If the state of the "invalid" or "underflow" flag has changed, + inform the kernel. */ + if (((spefscr ^ old_spefscr) & (SPEFSCR_FINVS | SPEFSCR_FUNFS)) != 0) + __fe_note_change (); + + return 0; +} diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fesetmode.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fesetmode.c new file mode 100644 index 0000000000..637956dece --- /dev/null +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fesetmode.c @@ -0,0 +1,43 @@ +/* Install given floating-point control modes. e500 version. + Copyright (C) 2016-2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <fenv_libc.h> +#include <sysdep.h> +#include <sys/prctl.h> + +#define SPEFSCR_STATUS 0xff3eff00 + +int +fesetmode (const femode_t *modep) +{ + fenv_union_t u; + INTERNAL_SYSCALL_DECL (err); + int r; + + u.fenv = *modep; + unsigned int spefscr = fegetenv_register (); + spefscr = (spefscr & SPEFSCR_STATUS) | (u.l[1] & ~SPEFSCR_STATUS); + + fesetenv_register (spefscr); + r = INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, + u.l[0] | PR_FP_EXC_SW_ENABLE); + if (INTERNAL_SYSCALL_ERROR_P (r, err)) + return -1; + + return 0; +} diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fesetround.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fesetround.c index c59f209752..5e5f51cd35 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fesetround.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fesetround.c @@ -1,5 +1,5 @@ /* Set current rounding direction. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-power5.S b/sysdeps/powerpc/powerpc32/e500/nofpu/fetestexceptflag.c index 68b51554f3..a465a1cfa2 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-power5.S +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fetestexceptflag.c @@ -1,5 +1,5 @@ -/* sqrtf function. PowerPC32/POWER5 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Test exception in saved exception state. e500 version. + Copyright (C) 2016-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,11 +16,10 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> +#include <fenv_libc.h> -#undef weak_alias -#define weak_alias(a,b) - -#define __sqrtf __sqrtf_power5 - -#include <sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S> +int +fetestexceptflag (const fexcept_t *flagp, int excepts) +{ + return __fexcepts_from_spe (*flagp) & excepts & FE_ALL_EXCEPT; +} diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c b/sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c index dcb3d11d11..2e132664e5 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c @@ -1,6 +1,6 @@ /* Install given floating-point environment and raise exceptions. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_from_prctl.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_from_prctl.c index df2bbcecd4..248a31e1fc 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_from_prctl.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_from_prctl.c @@ -1,5 +1,5 @@ /* Convert floating-point exceptions from prctl form. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_from_spe.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_from_spe.c index d13b797439..bfb4e28342 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_from_spe.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_from_spe.c @@ -1,5 +1,5 @@ /* Convert floating-point exceptions from SPEFSCR form. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_to_prctl.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_to_prctl.c index 9331e2bff8..5c77cb86f0 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_to_prctl.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_to_prctl.c @@ -1,5 +1,5 @@ /* Convert floating-point exceptions to prctl form. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_to_spe.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_to_spe.c index 88b4b4693c..1d3047a669 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_to_spe.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fexcepts_to_spe.c @@ -1,5 +1,5 @@ /* Convert floating-point exceptions to SPEFSCR form. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fgetexcptflg.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fgetexcptflg.c index 9cf20ddc0f..5840b46635 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fgetexcptflg.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fgetexcptflg.c @@ -1,5 +1,5 @@ /* Store current representation for exceptions. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/flt-rounds.c b/sysdeps/powerpc/powerpc32/e500/nofpu/flt-rounds.c index d3c50a3d47..17a32f4ca0 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/flt-rounds.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/flt-rounds.c @@ -1,6 +1,6 @@ /* Return current rounding mode as correct value for FLT_ROUNDS. e500 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fraiseexcept-soft.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fraiseexcept-soft.c index a26e3c6216..37ae81a12c 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fraiseexcept-soft.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fraiseexcept-soft.c @@ -1,5 +1,5 @@ /* Raise given exceptions. e500 version for use from soft-fp. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Aldy Hernandez <aldyh@redhat.com>, 2004. diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fraiseexcpt.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fraiseexcpt.c index 8e0662c2d5..dfe0283f0a 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fraiseexcpt.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fraiseexcpt.c @@ -1,5 +1,5 @@ /* Raise given exceptions. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/fsetexcptflg.c b/sysdeps/powerpc/powerpc32/e500/nofpu/fsetexcptflg.c index b5404d1984..ec98d54d2a 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/fsetexcptflg.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/fsetexcptflg.c @@ -1,5 +1,5 @@ /* Set floating-point environment exception handling. e500 version. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/ftestexcept.c b/sysdeps/powerpc/powerpc32/e500/nofpu/ftestexcept.c index eeac79b1a9..612df632ed 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/ftestexcept.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/ftestexcept.c @@ -1,5 +1,5 @@ /* Test exception in current environment. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/s_fabsf.S b/sysdeps/powerpc/powerpc32/e500/nofpu/s_fabsf.S index 721d103ce8..aa13fba0c3 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/s_fabsf.S +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/s_fabsf.S @@ -1,5 +1,5 @@ /* Floating-point absolute value. e500 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <libm-alias-float.h> ENTRY (__fabsf) /* float [r3] fabsf (float [r3] x) ; */ @@ -24,4 +25,4 @@ ENTRY (__fabsf) blr END (__fabsf) -weak_alias (__fabsf, fabsf) +libm_alias_float (__fabs, fabs) diff --git a/sysdeps/powerpc/powerpc32/e500/nofpu/spe-raise.c b/sysdeps/powerpc/powerpc32/e500/nofpu/spe-raise.c index 2a3f5e4c67..4952e6ad17 100644 --- a/sysdeps/powerpc/powerpc32/e500/nofpu/spe-raise.c +++ b/sysdeps/powerpc/powerpc32/e500/nofpu/spe-raise.c @@ -1,5 +1,5 @@ /* Raise given exceptions, given the SPEFSCR bits for those exceptions. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S b/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S index 5395410e61..7a4b068599 100644 --- a/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S +++ b/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S @@ -1,5 +1,5 @@ /* longjmp for PowerPC. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/fpu/__longjmp.S b/sysdeps/powerpc/powerpc32/fpu/__longjmp.S index 529e0956cc..c59b59a4c3 100644 --- a/sysdeps/powerpc/powerpc32/fpu/__longjmp.S +++ b/sysdeps/powerpc/powerpc32/fpu/__longjmp.S @@ -1,5 +1,5 @@ /* AltiVec/VMX (new) version of __longjmp for PowerPC. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -26,15 +26,13 @@ # include "__longjmp-common.S" #else /* IS_IN (libc) */ -/* Build a versioned object for libc. */ -versioned_symbol (libc, __vmx__longjmp, __longjmp, GLIBC_2_3_4); +strong_alias (__vmx__longjmp, __longjmp) # define __longjmp_symbol __vmx__longjmp # include "__longjmp-common.S" # if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) # define __NO_VMX__ # undef JB_SIZE -compat_symbol (libc, __novmx__longjmp, __longjmp, GLIBC_2_0); # undef __longjmp_symbol # define __longjmp_symbol __novmx__longjmp # include "__longjmp-common.S" diff --git a/sysdeps/powerpc/powerpc32/fpu/fix-int-fp-convert-zero.h b/sysdeps/powerpc/powerpc32/fpu/fix-int-fp-convert-zero.h index a2d002c256..6bdc3480b2 100644 --- a/sysdeps/powerpc/powerpc32/fpu/fix-int-fp-convert-zero.h +++ b/sysdeps/powerpc/powerpc32/fpu/fix-int-fp-convert-zero.h @@ -1,5 +1,5 @@ /* Fix for conversion of integer 0 to floating point. PowerPC version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/fpu/fprrest.S b/sysdeps/powerpc/powerpc32/fpu/fprrest.S index df08df41d7..c17bdf35df 100644 --- a/sysdeps/powerpc/powerpc32/fpu/fprrest.S +++ b/sysdeps/powerpc/powerpc32/fpu/fprrest.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2016 Free Software Foundation, Inc. +/* Copyright (C) 2000-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/fpu/fprsave.S b/sysdeps/powerpc/powerpc32/fpu/fprsave.S index 4a257cdb46..0822de23a0 100644 --- a/sysdeps/powerpc/powerpc32/fpu/fprsave.S +++ b/sysdeps/powerpc/powerpc32/fpu/fprsave.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2016 Free Software Foundation, Inc. +/* Copyright (C) 2000-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/fpu/s_ceil.S b/sysdeps/powerpc/powerpc32/fpu/s_ceil.S index 48d6d0de19..7f2f97ada1 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_ceil.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_ceil.S @@ -1,5 +1,5 @@ /* ceil function. PowerPC32 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-double.h> .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -26,7 +27,6 @@ .section ".text" ENTRY (__ceil) - mffs fp11 /* Save current FPU rounding mode. */ #ifdef SHARED mflr r11 cfi_register(lr,r11) @@ -42,15 +42,18 @@ ENTRY (__ceil) fabs fp0,fp1 fsub fp12,fp13,fp13 /* generate 0.0 */ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */ + mffs fp11 /* Save current FPU rounding mode and + "inexact" state. */ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */ - bnllr- cr7 + bnl- cr7,.L10 mtfsfi 7,2 /* Set rounding mode toward +inf. */ ble- cr6,.L4 fadd fp1,fp1,fp13 /* x+= TWO52; */ fsub fp1,fp1,fp13 /* x-= TWO52; */ fabs fp1,fp1 /* if (x == 0.0) */ /* x = 0.0; */ - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0xff,fp11 /* Restore previous rounding mode and + "inexact" state. */ blr .L4: bge- cr6,.L9 /* if (x < 0.0) */ @@ -59,16 +62,15 @@ ENTRY (__ceil) fnabs fp1,fp1 /* if (x == 0.0) */ /* x = -0.0; */ .L9: - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0xff,fp11 /* Restore previous rounding mode and + "inexact" state. */ + blr +.L10: + /* Ensure sNaN input is converted to qNaN. */ + fcmpu cr7,fp1,fp1 + beqlr cr7 + fadd fp1,fp1,fp1 blr END (__ceil) -weak_alias (__ceil, ceil) - -#ifdef NO_LONG_DOUBLE -weak_alias (__ceil, ceill) -strong_alias (__ceil, __ceill) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __ceil, ceill, GLIBC_2_0) -#endif +libm_alias_double (__ceil, ceil) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc32/fpu/s_ceilf.S index c70fd444e2..3f5949004f 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_ceilf.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_ceilf.S @@ -1,5 +1,5 @@ /* float ceil function. PowerPC32 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <libm-alias-float.h> .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -25,7 +26,6 @@ .section ".text" ENTRY (__ceilf) - mffs fp11 /* Save current FPU rounding mode. */ #ifdef SHARED mflr r11 cfi_register(lr,r11) @@ -41,15 +41,18 @@ ENTRY (__ceilf) fabs fp0,fp1 fsubs fp12,fp13,fp13 /* generate 0.0 */ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO23) */ + mffs fp11 /* Save current FPU rounding mode and + "inexact" state. */ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */ - bnllr- cr7 + bnl- cr7,.L10 mtfsfi 7,2 /* Set rounding mode toward +inf. */ ble- cr6,.L4 fadds fp1,fp1,fp13 /* x+= TWO23; */ fsubs fp1,fp1,fp13 /* x-= TWO23; */ fabs fp1,fp1 /* if (x == 0.0) */ /* x = 0.0; */ - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0xff,fp11 /* Restore previous rounding mode and + "inexact" state. */ blr .L4: bge- cr6,.L9 /* if (x < 0.0) */ @@ -58,9 +61,16 @@ ENTRY (__ceilf) fnabs fp1,fp1 /* if (x == 0.0) */ /* x = -0.0; */ .L9: - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0xff,fp11 /* Restore previous rounding mode and + "inexact" state. */ + blr +.L10: + /* Ensure sNaN input is converted to qNaN. */ + fcmpu cr7,fp1,fp1 + beqlr cr7 + fadds fp1,fp1,fp1 blr END (__ceilf) -weak_alias (__ceilf, ceilf) +libm_alias_float (__ceil, ceil) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_copysign.S b/sysdeps/powerpc/powerpc32/fpu/s_copysign.S index 05eb07df3f..6ca90cd1e3 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_copysign.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_copysign.S @@ -1,5 +1,5 @@ /* Copy a sign bit between floating-point values. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,8 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-float.h> +#include <libm-alias-double.h> ENTRY(__copysign) /* double [f1] copysign (double [f1] x, double [f2] y); @@ -40,20 +42,12 @@ L(0): fnabs fp1,fp1 blr END (__copysign) -weak_alias (__copysign,copysign) +libm_alias_double (__copysign, copysign) /* It turns out that it's safe to use this code even for single-precision. */ -weak_alias (__copysign,copysignf) strong_alias(__copysign,__copysignf) +libm_alias_float (__copysign, copysign) -#ifdef NO_LONG_DOUBLE -weak_alias (__copysign,copysignl) -strong_alias(__copysign,__copysignl) -#endif -#if IS_IN (libm) -# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __copysign, copysignl, GLIBC_2_0) -# endif -#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) +#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) compat_symbol (libc, __copysign, copysignl, GLIBC_2_0) #endif diff --git a/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S b/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S index aed783ad59..0c9d18cb03 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_copysignl.S @@ -1,6 +1,6 @@ /* Copy a sign bit between floating-point values. IBM extended format long double version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,22 +24,39 @@ ENTRY(__copysignl) /* long double [f1,f2] copysign (long double [f1,f2] x, long double [f3,f4] y); copysign(x,y) returns a value with the magnitude of x and with the sign bit of y. */ +#ifdef _ARCH_PPCGR + /* fsel available. */ stwu r1,-16(r1) cfi_adjust_cfa_offset (16) stfd fp3,8(r1) fmr fp0,fp1 fabs fp1,fp1 - fcmpu cr7,fp0,fp1 lwz r3,8+HIWORD(r1) cmpwi cr6,r3,0 addi r1,r1,16 cfi_adjust_cfa_offset (-16) - beq cr7,L(0) + fneg fp3,fp2 + fsel fp2,fp0,fp2,fp3 + bgelr cr6 + fneg fp1,fp1 fneg fp2,fp2 -L(0): bgelr cr6 + blr +#else + stwu r1,-32(r1) + cfi_adjust_cfa_offset (32) + stfd fp3,8(r1) + stfd fp1,16(r1) + lwz r3,8+HIWORD(r1) + lwz r4,16+HIWORD(r1) + xor r3,r3,r4 + cmpwi cr6,r3,0 + addi r1,r1,32 + cfi_adjust_cfa_offset (-32) + bgelr cr6 fneg fp1,fp1 fneg fp2,fp2 blr +#endif END (__copysignl) #if IS_IN (libm) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_fabs.S b/sysdeps/powerpc/powerpc32/fpu/s_fabs.S deleted file mode 100644 index 53d21301ee..0000000000 --- a/sysdeps/powerpc/powerpc32/fpu/s_fabs.S +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <sysdeps/powerpc/fpu/s_fabs.S> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __fabs, fabsl, GLIBC_2_0) -#endif diff --git a/sysdeps/powerpc/powerpc32/fpu/s_fabsl.S b/sysdeps/powerpc/powerpc32/fpu/s_fabsl.S index 0462d20630..e6a726afb0 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_fabsl.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_fabsl.S @@ -1,6 +1,6 @@ /* Copy a sign bit between floating-point values. IBM extended format long double version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,11 +24,28 @@ ENTRY(__fabsl) /* long double [f1,f2] fabs (long double [f1,f2] x); fabs(x,y) returns a value with the magnitude of x and with the sign bit of y. */ +#ifdef _ARCH_PPCGR + /* fsel available. */ fmr fp0,fp1 +#else + /* Use integer operations to test sign of high part to avoid + exceptions on sNaNs. */ + stwu r1,-16(r1) + cfi_adjust_cfa_offset (16) + stfd fp1,8(r1) +#endif fabs fp1,fp1 - fcmpu cr1,fp0,fp1 - beqlr cr1 +#ifdef _ARCH_PPCGR + fneg fp3,fp2 + fsel fp2,fp0,fp2,fp3 +#else + lwz r3,8+HIWORD(r1) + cmpwi cr6,r3,0 + addi r1,r1,16 + cfi_adjust_cfa_offset (-16) + bgelr cr6 fneg fp2,fp2 +#endif blr END (__fabsl) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_fdim.c b/sysdeps/powerpc/powerpc32/fpu/s_fdim.c deleted file mode 100644 index e34b51ee54..0000000000 --- a/sysdeps/powerpc/powerpc32/fpu/s_fdim.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <sysdeps/powerpc/fpu/s_fdim.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __fdim, fdiml, GLIBC_2_1); -#endif diff --git a/sysdeps/powerpc/powerpc32/fpu/s_floor.S b/sysdeps/powerpc/powerpc32/fpu/s_floor.S index 3f84465a8e..cb2fd9596e 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_floor.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_floor.S @@ -1,5 +1,5 @@ /* Floor function. PowerPC32 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-double.h> .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -26,7 +27,6 @@ .section ".text" ENTRY (__floor) - mffs fp11 /* Save current FPU rounding mode. */ #ifdef SHARED mflr r11 cfi_register(lr,r11) @@ -42,15 +42,18 @@ ENTRY (__floor) fabs fp0,fp1 fsub fp12,fp13,fp13 /* generate 0.0 */ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */ + mffs fp11 /* Save current FPU rounding mode and + "inexact" state. */ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */ - bnllr- cr7 + bnl- cr7,.L10 mtfsfi 7,3 /* Set rounding mode toward -inf. */ ble- cr6,.L4 fadd fp1,fp1,fp13 /* x+= TWO52; */ fsub fp1,fp1,fp13 /* x-= TWO52; */ fabs fp1,fp1 /* if (x == 0.0) */ /* x = 0.0; */ - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0xff,fp11 /* Restore previous rounding mode and + "inexact" state. */ blr .L4: bge- cr6,.L9 /* if (x < 0.0) */ @@ -59,16 +62,15 @@ ENTRY (__floor) fnabs fp1,fp1 /* if (x == 0.0) */ /* x = -0.0; */ .L9: - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0xff,fp11 /* Restore previous rounding mode and + "inexact" state. */ + blr +.L10: + /* Ensure sNaN input is converted to qNaN. */ + fcmpu cr7,fp1,fp1 + beqlr cr7 + fadd fp1,fp1,fp1 blr END (__floor) -weak_alias (__floor, floor) - -#ifdef NO_LONG_DOUBLE -weak_alias (__floor, floorl) -strong_alias (__floor, __floorl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __floor, floorl, GLIBC_2_0) -#endif +libm_alias_double (__floor, floor) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_floorf.S b/sysdeps/powerpc/powerpc32/fpu/s_floorf.S index 55ac526d71..37b70d7c72 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_floorf.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_floorf.S @@ -1,5 +1,5 @@ /* float Floor function. PowerPC32 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <libm-alias-float.h> .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -25,7 +26,6 @@ .section ".text" ENTRY (__floorf) - mffs fp11 /* Save current FPU rounding mode. */ #ifdef SHARED mflr r11 cfi_register(lr,r11) @@ -41,15 +41,18 @@ ENTRY (__floorf) fabs fp0,fp1 fsubs fp12,fp13,fp13 /* generate 0.0 */ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO23) */ + mffs fp11 /* Save current FPU rounding mode and + "inexact" state. */ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */ - bnllr- cr7 + bnl- cr7,.L10 mtfsfi 7,3 /* Set rounding mode toward -inf. */ ble- cr6,.L4 fadds fp1,fp1,fp13 /* x+= TWO23; */ fsubs fp1,fp1,fp13 /* x-= TWO23; */ fabs fp1,fp1 /* if (x == 0.0) */ /* x = 0.0; */ - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0xff,fp11 /* Restore previous rounding mode and + "inexact" state. */ blr .L4: bge- cr6,.L9 /* if (x < 0.0) */ @@ -58,9 +61,16 @@ ENTRY (__floorf) fnabs fp1,fp1 /* if (x == 0.0) */ /* x = -0.0; */ .L9: - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0xff,fp11 /* Restore previous rounding mode and + "inexact" state. */ + blr +.L10: + /* Ensure sNaN input is converted to qNaN. */ + fcmpu cr7,fp1,fp1 + beqlr cr7 + fadds fp1,fp1,fp1 blr END (__floorf) -weak_alias (__floorf, floorf) +libm_alias_float (__floor, floor) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_fma.S b/sysdeps/powerpc/powerpc32/fpu/s_fma.S deleted file mode 100644 index d40695c633..0000000000 --- a/sysdeps/powerpc/powerpc32/fpu/s_fma.S +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <sysdeps/powerpc/fpu/s_fma.S> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __fma, fmal, GLIBC_2_1) -#endif diff --git a/sysdeps/powerpc/powerpc32/fpu/s_fmax.S b/sysdeps/powerpc/powerpc32/fpu/s_fmax.S deleted file mode 100644 index 69735761ab..0000000000 --- a/sysdeps/powerpc/powerpc32/fpu/s_fmax.S +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <sysdeps/powerpc/fpu/s_fmax.S> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1) -#endif diff --git a/sysdeps/powerpc/powerpc32/fpu/s_fmin.S b/sysdeps/powerpc/powerpc32/fpu/s_fmin.S deleted file mode 100644 index 6d4a0a946c..0000000000 --- a/sysdeps/powerpc/powerpc32/fpu/s_fmin.S +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <sysdeps/powerpc/fpu/s_fmin.S> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __fmin, fminl, GLIBC_2_1) -#endif diff --git a/sysdeps/powerpc/powerpc32/fpu/s_isnan.S b/sysdeps/powerpc/powerpc32/fpu/s_isnan.S index c33b89492d..c0cec82ce0 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_isnan.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_isnan.S @@ -1,5 +1,5 @@ /* isnan(). PowerPC32 version. - Copyright (C) 2008-2016 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/fpu/s_llrint.c b/sysdeps/powerpc/powerpc32/fpu/s_llrint.c index 9cb72a1fd6..3704f9b11e 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_llrint.c +++ b/sysdeps/powerpc/powerpc32/fpu/s_llrint.c @@ -1,5 +1,5 @@ /* Round a double value to a long long in the current rounding mode. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,7 @@ #include <math_ldbl_opt.h> #include <math_private.h> #include <stdint.h> +#include <libm-alias-double.h> long long int __llrint (double x) @@ -53,11 +54,4 @@ __llrint (double x) return (long long int) (long int) rx << 32; } } -weak_alias (__llrint, llrint) -#ifdef NO_LONG_DOUBLE -strong_alias (__llrint, __llrintl) -weak_alias (__llrint, llrintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __llrint, llrintl, GLIBC_2_1); -#endif +libm_alias_double (__llrint, llrint) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_llrintf.c b/sysdeps/powerpc/powerpc32/fpu/s_llrintf.c index 7151bed1c9..c5e78fa050 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_llrintf.c +++ b/sysdeps/powerpc/powerpc32/fpu/s_llrintf.c @@ -1,5 +1,5 @@ /* Round a float value to a long long in the current rounding mode. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ #include <math.h> #include <math_private.h> #include <stdint.h> +#include <libm-alias-float.h> long long int __llrintf (float x) @@ -43,4 +44,4 @@ __llrintf (float x) return (long long int) ((i0 & 0x80000000) != 0 ? -mant : mant); } } -weak_alias (__llrintf, llrintf) +libm_alias_float (__llrint, llrint) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_llround.c b/sysdeps/powerpc/powerpc32/fpu/s_llround.c index b09949bce5..d09f97f2a2 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_llround.c +++ b/sysdeps/powerpc/powerpc32/fpu/s_llround.c @@ -1,5 +1,5 @@ /* Round double value to long long int. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,7 @@ #include <math_ldbl_opt.h> #include <math_private.h> #include <stdint.h> +#include <libm-alias-double.h> /* Round to the nearest integer, with values exactly on a 0.5 boundary rounded away from zero, regardless of the current rounding mode. @@ -80,11 +81,4 @@ __llround (double x) } return xr; } -weak_alias (__llround, llround) -#ifdef NO_LONG_DOUBLE -strong_alias (__llround, __llroundl) -weak_alias (__llround, llroundl) -#endif -#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_1) -compat_symbol (libm, __llround, llroundl, GLIBC_2_1); -#endif +libm_alias_double (__llround, llround) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_llroundf.c b/sysdeps/powerpc/powerpc32/fpu/s_llroundf.c index 607977c0ab..5337ccd4c8 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_llroundf.c +++ b/sysdeps/powerpc/powerpc32/fpu/s_llroundf.c @@ -1,5 +1,5 @@ /* Round float value to long long int. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ #include <math.h> #include <math_private.h> #include <stdint.h> +#include <libm-alias-float.h> /* Round to the nearest integer, with values exactly on a 0.5 boundary rounded away from zero, regardless of the current rounding mode. @@ -69,4 +70,4 @@ __llroundf (float x) } return xr; } -weak_alias (__llroundf, llroundf) +libm_alias_float (__llround, llround) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_lrint.S b/sysdeps/powerpc/powerpc32/fpu/s_lrint.S index 54326268b7..49a97ff012 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_lrint.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_lrint.S @@ -1,5 +1,5 @@ /* Round double to long int. PowerPC32 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,8 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-float.h> +#include <libm-alias-double.h> /* long int[r3] __lrint (double x[fp1]) */ ENTRY (__lrint) @@ -32,15 +34,7 @@ ENTRY (__lrint) blr END (__lrint) -weak_alias (__lrint, lrint) +libm_alias_double (__lrint, lrint) strong_alias (__lrint, __lrintf) -weak_alias (__lrint, lrintf) - -#ifdef NO_LONG_DOUBLE -strong_alias (__lrint, __lrintl) -weak_alias (__lrint, lrintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __lrint, lrintl, GLIBC_2_1) -#endif +libm_alias_float (__lrint, lrint) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_lround.S b/sysdeps/powerpc/powerpc32/fpu/s_lround.S index 66d9a67e1a..03d7dae2a5 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_lround.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_lround.S @@ -1,5 +1,5 @@ /* lround function. PowerPC32 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,8 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-float.h> +#include <libm-alias-double.h> .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -115,15 +117,7 @@ ENTRY (__lround) b .Lconvert END (__lround) -weak_alias (__lround, lround) +libm_alias_double (__lround, lround) strong_alias (__lround, __lroundf) -weak_alias (__lround, lroundf) - -#ifdef NO_LONG_DOUBLE -weak_alias (__lround, lroundl) -strong_alias (__lround, __lroundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __lround, lroundl, GLIBC_2_1) -#endif +libm_alias_float (__lround, lround) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S b/sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S index 68e3182b0d..2481897816 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S @@ -1,5 +1,5 @@ /* Round to int floating-point values. PowerPC32 version. - Copyright (C) 2011-2016 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Adhemerval Zanella <azanella@br.ibm.com>, 2011 @@ -22,6 +22,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-double.h> /* double [fp1] nearbyint(double [fp1] x) */ @@ -49,7 +50,7 @@ ENTRY (__nearbyint) fabs fp0,fp1 fsub fp12,fp13,fp13 /* generate 0.0 */ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52 */ - bgelr cr7 + bge cr7,.L10 fcmpu cr7,fp1,fp12 /* if (x > 0.0 */ ble cr7,L(lessthanzero) mffs fp11 @@ -68,14 +69,12 @@ L(lessthanzero): fnabs fp1,fp1 /* if (x == 0.0) */ mtfsf 0xff,fp11 /* Restore FE_INEXACT state. */ blr +.L10: + /* Ensure sNaN input is converted to qNaN. */ + fcmpu cr7,fp1,fp1 + beqlr cr7 + fadd fp1,fp1,fp1 + blr END (__nearbyint) -weak_alias (__nearbyint, nearbyint) - -#ifdef NO_LONG_DOUBLE -weak_alias (__nearbyint, nearbyintl) -strong_alias (__nearbyint, __nearbyintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1) -#endif +libm_alias_double (__nearbyint, nearbyint) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_nearbyintf.S b/sysdeps/powerpc/powerpc32/fpu/s_nearbyintf.S index 107b035a24..113ee81309 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_nearbyintf.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_nearbyintf.S @@ -1,5 +1,5 @@ /* Round to int floating-point values. PowerPC32 version. - Copyright (C) 2011-2016 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Adhemerval Zanella <azanella@br.ibm.com>, 2011 @@ -21,6 +21,7 @@ when it's coded in C. */ #include <sysdep.h> +#include <libm-alias-float.h> /* float [fp1] nearbyintf(float [fp1] x) */ @@ -48,7 +49,7 @@ ENTRY (__nearbyintf) fabs fp0,fp1 fsub fp12,fp13,fp13 /* generate 0.0 */ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO23 */ - bgelr cr7 + bge cr7,.L10 fcmpu cr7,fp1,fp12 /* if (x > 0.0 */ ble cr7,L(lessthanzero) mffs fp11 @@ -67,6 +68,12 @@ L(lessthanzero): fnabs fp1,fp1 /* if (x == 0.0) */ mtfsf 0xff,fp11 /* Restore FE_INEXACT state. */ blr +.L10: + /* Ensure sNaN input is converted to qNaN. */ + fcmpu cr7,fp1,fp1 + beqlr cr7 + fadds fp1,fp1,fp1 + blr END (__nearbyintf) -weak_alias (__nearbyintf, nearbyintf) +libm_alias_float (__nearbyint, nearbyint) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_rint.S b/sysdeps/powerpc/powerpc32/fpu/s_rint.S index 5d78f3a5fc..7c7784adf9 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_rint.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_rint.S @@ -1,5 +1,5 @@ /* Round to int floating-point values. PowerPC32 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-double.h> .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -45,7 +46,7 @@ ENTRY (__rint) fsub fp12,fp13,fp13 /* generate 0.0 */ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */ - bnllr cr7 + bnl cr7,.L10 bng cr6,.L4 fadd fp1,fp1,fp13 /* x+= TWO52; */ fsub fp1,fp1,fp13 /* x-= TWO52; */ @@ -57,14 +58,12 @@ ENTRY (__rint) fadd fp1,fp1,fp13 /* x+= TWO52; */ fnabs fp1,fp1 /* if (x == 0.0) */ blr /* x = -0.0; */ +.L10: + /* Ensure sNaN input is converted to qNaN. */ + fcmpu cr7,fp1,fp1 + beqlr cr7 + fadd fp1,fp1,fp1 + blr END (__rint) -weak_alias (__rint, rint) - -#ifdef NO_LONG_DOUBLE -weak_alias (__rint, rintl) -strong_alias (__rint, __rintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __rint, rintl, GLIBC_2_0) -#endif +libm_alias_double (__rint, rint) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_rintf.S b/sysdeps/powerpc/powerpc32/fpu/s_rintf.S index 94b7045da6..34e095399f 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_rintf.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_rintf.S @@ -1,5 +1,5 @@ /* Round float to int floating-point values. PowerPC32 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <libm-alias-float.h> .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -41,7 +42,7 @@ ENTRY (__rintf) fsubs fp12,fp13,fp13 /* generate 0.0 */ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO23) */ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */ - bnllr cr7 + bnl cr7,.L10 bng cr6,.L4 fadds fp1,fp1,fp13 /* x+= TWO23; */ fsubs fp1,fp1,fp13 /* x-= TWO23; */ @@ -53,7 +54,13 @@ ENTRY (__rintf) fadds fp1,fp1,fp13 /* x+= TWO23; */ fnabs fp1,fp1 /* if (x == 0.0) */ blr /* x = -0.0; */ +.L10: + /* Ensure sNaN input is converted to qNaN. */ + fcmpu cr7,fp1,fp1 + beqlr cr7 + fadds fp1,fp1,fp1 + blr END (__rintf) -weak_alias (__rintf, rintf) +libm_alias_float (__rint, rint) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_round.S b/sysdeps/powerpc/powerpc32/fpu/s_round.S index ae25364bd9..6fb12ca2e9 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_round.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_round.S @@ -1,5 +1,5 @@ /* round function. PowerPC32 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-double.h> .section .rodata.cst8,"aM",@progbits,8 .align 2 @@ -57,7 +58,7 @@ ENTRY (__round) mffs fp11 /* Save current FPU rounding mode and "inexact" state. */ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */ - bnllr- cr7 + bnl- cr7,.L10 mtfsfi 7,1 /* Set rounding mode toward 0. */ #ifdef SHARED lfs fp10,.LC1-.LC0(r9) @@ -85,14 +86,12 @@ ENTRY (__round) mtfsf 0xff,fp11 /* Restore previous rounding mode and "inexact" state. */ blr +.L10: + /* Ensure sNaN input is converted to qNaN. */ + fcmpu cr7,fp1,fp1 + beqlr cr7 + fadd fp1,fp1,fp1 + blr END (__round) -weak_alias (__round, round) - -#ifdef NO_LONG_DOUBLE -weak_alias (__round, roundl) -strong_alias (__round, __roundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __round, roundl, GLIBC_2_1) -#endif +libm_alias_double (__round, round) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_roundf.S b/sysdeps/powerpc/powerpc32/fpu/s_roundf.S index f63248138f..222c0dfc10 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_roundf.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_roundf.S @@ -1,5 +1,5 @@ /* roundf function. PowerPC32 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <libm-alias-float.h> .section .rodata.cst8,"aM",@progbits,8 .align 3 @@ -56,7 +57,7 @@ ENTRY (__roundf ) mffs fp11 /* Save current FPU rounding mode and "inexact" state. */ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */ - bnllr- cr7 + bnl- cr7,.L10 mtfsfi 7,1 /* Set rounding mode toward 0. */ #ifdef SHARED lfs fp10,.LC1-.LC0(r9) @@ -83,7 +84,13 @@ ENTRY (__roundf ) mtfsf 0xff,fp11 /* Restore previous rounding mode and "inexact" state. */ blr +.L10: + /* Ensure sNaN input is converted to qNaN. */ + fcmpu cr7,fp1,fp1 + beqlr cr7 + fadds fp1,fp1,fp1 + blr END (__roundf) -weak_alias (__roundf, roundf) +libm_alias_float (__round, round) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_trunc.S b/sysdeps/powerpc/powerpc32/fpu/s_trunc.S index c8aa2fb245..ff39a13d68 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_trunc.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_trunc.S @@ -1,5 +1,5 @@ /* trunc function. PowerPC32 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-double.h> .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -33,7 +34,6 @@ .section ".text" ENTRY (__trunc) - mffs fp11 /* Save current FPU rounding mode. */ #ifdef SHARED mflr r11 cfi_register(lr,r11) @@ -49,15 +49,18 @@ ENTRY (__trunc) fabs fp0,fp1 fsub fp12,fp13,fp13 /* generate 0.0 */ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */ + mffs fp11 /* Save current FPU rounding mode and + "inexact" state. */ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */ - bnllr- cr7 + bnl- cr7,.L10 mtfsfi 7,1 /* Set rounding toward 0 mode. */ ble- cr6,.L4 fadd fp1,fp1,fp13 /* x+= TWO52; */ fsub fp1,fp1,fp13 /* x-= TWO52; */ fabs fp1,fp1 /* if (x == 0.0) */ /* x = 0.0; */ - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0xff,fp11 /* Restore previous rounding mode and + "inexact" state. */ blr .L4: bge- cr6,.L9 /* if (x < 0.0) */ @@ -66,16 +69,15 @@ ENTRY (__trunc) fnabs fp1,fp1 /* if (x == 0.0) */ /* x = -0.0; */ .L9: - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0xff,fp11 /* Restore previous rounding mode and + "inexact" state. */ + blr +.L10: + /* Ensure sNaN input is converted to qNaN. */ + fcmpu cr7,fp1,fp1 + beqlr cr7 + fadd fp1,fp1,fp1 blr END (__trunc) -weak_alias (__trunc, trunc) - -#ifdef NO_LONG_DOUBLE -weak_alias (__trunc, truncl) -strong_alias (__trunc, __truncl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __trunc, truncl, GLIBC_2_1) -#endif +libm_alias_double (__trunc, trunc) diff --git a/sysdeps/powerpc/powerpc32/fpu/s_truncf.S b/sysdeps/powerpc/powerpc32/fpu/s_truncf.S index e47ee96c55..52e97f83f9 100644 --- a/sysdeps/powerpc/powerpc32/fpu/s_truncf.S +++ b/sysdeps/powerpc/powerpc32/fpu/s_truncf.S @@ -1,5 +1,5 @@ /* truncf function. PowerPC32 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <libm-alias-float.h> .section .rodata.cst4,"aM",@progbits,4 .align 2 @@ -32,7 +33,6 @@ .section ".text" ENTRY (__truncf) - mffs fp11 /* Save current FPU rounding mode. */ #ifdef SHARED mflr r11 cfi_register(lr,r11) @@ -48,15 +48,18 @@ ENTRY (__truncf) fabs fp0,fp1 fsubs fp12,fp13,fp13 /* generate 0.0 */ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO23) */ + mffs fp11 /* Save current FPU rounding mode and + "inexact" state. */ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */ - bnllr- cr7 + bnl- cr7,.L10 mtfsfi 7,1 /* Set rounding toward 0 mode. */ ble- cr6,.L4 fadds fp1,fp1,fp13 /* x+= TWO23; */ fsubs fp1,fp1,fp13 /* x-= TWO23; */ fabs fp1,fp1 /* if (x == 0.0) */ /* x = 0.0; */ - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0xff,fp11 /* Restore previous rounding mode and + "inexact" state. */ blr .L4: bge- cr6,.L9 /* if (x < 0.0) */ @@ -65,9 +68,16 @@ ENTRY (__truncf) fnabs fp1,fp1 /* if (x == 0.0) */ /* x = -0.0; */ .L9: - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0xff,fp11 /* Restore previous rounding mode and + "inexact" state. */ + blr +.L10: + /* Ensure sNaN input is converted to qNaN. */ + fcmpu cr7,fp1,fp1 + beqlr cr7 + fadds fp1,fp1,fp1 blr END (__truncf) -weak_alias (__truncf, truncf) +libm_alias_float (__trunc, trunc) diff --git a/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S b/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S index 59f4e8b3da..e2d781ed78 100644 --- a/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S +++ b/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S @@ -1,5 +1,5 @@ /* setjmp for PowerPC. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/fpu/setjmp.S b/sysdeps/powerpc/powerpc32/fpu/setjmp.S index 6a4016c229..36eb839a97 100644 --- a/sysdeps/powerpc/powerpc32/fpu/setjmp.S +++ b/sysdeps/powerpc/powerpc32/fpu/setjmp.S @@ -1,5 +1,5 @@ /* non altivec (old) version of setjmp for PowerPC. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -32,6 +32,7 @@ versioned_symbol (libc, __vmx__sigsetjmp, __sigsetjmp, GLIBC_2_3_4) # define __sigsetjmp_symbol __vmx__sigsetjmp # define __sigjmp_save_symbol __vmx__sigjmp_save # include "setjmp-common.S" +libc_hidden_ver (__vmx__sigsetjmp, __sigsetjmp) # if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) # define __NO_VMX__ diff --git a/sysdeps/powerpc/powerpc32/gprrest0.S b/sysdeps/powerpc/powerpc32/gprrest0.S index 3b12af9008..8186157a50 100644 --- a/sysdeps/powerpc/powerpc32/gprrest0.S +++ b/sysdeps/powerpc/powerpc32/gprrest0.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2016 Free Software Foundation, Inc. +/* Copyright (C) 2000-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/gprrest1.S b/sysdeps/powerpc/powerpc32/gprrest1.S index 40cd5c698c..f28575d941 100644 --- a/sysdeps/powerpc/powerpc32/gprrest1.S +++ b/sysdeps/powerpc/powerpc32/gprrest1.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2016 Free Software Foundation, Inc. +/* Copyright (C) 2000-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/gprsave0.S b/sysdeps/powerpc/powerpc32/gprsave0.S index c8cc8996ba..bdbed4b844 100644 --- a/sysdeps/powerpc/powerpc32/gprsave0.S +++ b/sysdeps/powerpc/powerpc32/gprsave0.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2016 Free Software Foundation, Inc. +/* Copyright (C) 2000-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/gprsave1.S b/sysdeps/powerpc/powerpc32/gprsave1.S index 44eed283a3..e75829284b 100644 --- a/sysdeps/powerpc/powerpc32/gprsave1.S +++ b/sysdeps/powerpc/powerpc32/gprsave1.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2016 Free Software Foundation, Inc. +/* Copyright (C) 2000-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/libgcc-compat.S b/sysdeps/powerpc/powerpc32/libgcc-compat.S index f7c26a3624..0412d78ede 100644 --- a/sysdeps/powerpc/powerpc32/libgcc-compat.S +++ b/sysdeps/powerpc/powerpc32/libgcc-compat.S @@ -1,5 +1,5 @@ /* pre-.hidden libgcc compatibility - Copyright (C) 2002-2016 Free Software Foundation, Inc. + Copyright (C) 2002-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/lshift.S b/sysdeps/powerpc/powerpc32/lshift.S index 4e35878f36..78e0ed40f5 100644 --- a/sysdeps/powerpc/powerpc32/lshift.S +++ b/sysdeps/powerpc/powerpc32/lshift.S @@ -1,5 +1,5 @@ /* Shift a limb left, low level routine. - Copyright (C) 1996-2016 Free Software Foundation, Inc. + Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/memset.S b/sysdeps/powerpc/powerpc32/memset.S index 3e22705b80..94686f9573 100644 --- a/sysdeps/powerpc/powerpc32/memset.S +++ b/sysdeps/powerpc/powerpc32/memset.S @@ -1,5 +1,5 @@ /* Optimized memset implementation for PowerPC. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,7 +18,7 @@ #include <sysdep.h> -/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5])); +/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5])); Returns 's'. The memset is done in four sizes: byte (8 bits), word (32 bits), diff --git a/sysdeps/powerpc/powerpc32/mul_1.S b/sysdeps/powerpc/powerpc32/mul_1.S index ae8999be25..5536e47b41 100644 --- a/sysdeps/powerpc/powerpc32/mul_1.S +++ b/sysdeps/powerpc/powerpc32/mul_1.S @@ -1,5 +1,5 @@ /* Multiply a limb vector by a limb, for PowerPC. - Copyright (C) 1993-2016 Free Software Foundation, Inc. + Copyright (C) 1993-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile index 590a8eba05..4e85021d50 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile @@ -8,8 +8,7 @@ sysdep_routines += s_isnan-power7 s_isnan-power6 s_isnan-power5 s_isnan-ppc32 \ libm-sysdep_routines += s_llrintf-power6 s_llrintf-ppc32 s_llrint-power6 \ s_llrint-ppc32 s_llround-power6 s_llround-power5+ \ - s_llround-ppc32 w_sqrt-power5 w_sqrt-ppc32 \ - w_sqrtf-power5 w_sqrtf-ppc32 s_isnan-power7 \ + s_llround-ppc32 s_isnan-power7 \ s_isnan-power6 s_isnan-power5 s_isnan-ppc32 \ s_isnanf-power6 s_isnanf-power5 s_isinf-power7 \ s_isinf-ppc32 s_isinff-ppc32 s_finite-power7 \ @@ -34,4 +33,9 @@ CFLAGS-s_logb-power7.c = -mcpu=power7 CFLAGS-s_logbf-power7.c = -mcpu=power7 CFLAGS-e_hypot-power7.c = -mcpu=power7 CFLAGS-e_hypotf-power7.c = -mcpu=power7 + +# These files quiet sNaNs in a way that is optimized away without +# -fsignaling-nans. +CFLAGS-s_modf-ppc32.c += -fsignaling-nans +CFLAGS-s_modff-ppc32.c += -fsignaling-nans endif diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-power7.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-power7.c index 3c23e94112..b1200260a9 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-power7.c @@ -1,5 +1,5 @@ /* __ieee_hypot() POWER7 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-ppc32.c index 49e1d9a213..e2b98fdb55 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot-ppc32.c @@ -1,5 +1,5 @@ /* __ieee_hypot() PowerPC32 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot.c index 08a2b9240e..b05414f225 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypot.c @@ -1,5 +1,5 @@ /* Multiple versions of ieee754_hypot. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <math.h> +#include <math_private.h> #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-power7.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-power7.c index 2071d0ca85..2eacefd617 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-power7.c @@ -1,5 +1,5 @@ /* __ieee754_hypot POWER7 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-ppc32.c index f672005da0..353d0b7d29 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf-ppc32.c @@ -1,5 +1,5 @@ /* __ieee_hypot() PowerPC32 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf.c index 5e7e78f40d..d432cd0023 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/e_hypotf.c @@ -1,5 +1,5 @@ /* Multiple versions of ieee754_hypotf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <math.h> +#include <math_private.h> #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.S index 501a7524f1..b8181585a8 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.S @@ -1,5 +1,5 @@ /* ceil function. PowerPC32/power5+ version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.S index 06de64c87c..cd2bc69b67 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.S @@ -1,5 +1,5 @@ /* ceil function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c index 8fb55e958d..5f3c0713fb 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil.c @@ -1,5 +1,5 @@ /* Multiple versions of ceil. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-double.h> extern __typeof (__ceil) __ceil_ppc32 attribute_hidden; extern __typeof (__ceil) __ceil_power5plus attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__ceil, ? __ceil_power5plus : __ceil_ppc32); -weak_alias (__ceil, ceil) - -#ifdef NO_LONG_DOUBLE -strong_alias (__ceil, __ceill) -weak_alias (__ceil, ceill) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __ceil, ceill, GLIBC_2_0); -#endif +libm_alias_double (__ceil, ceil) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.S index 2968c8aef9..d01aa6e7db 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.S @@ -1,5 +1,5 @@ /* ceilf function. PowerPC32/power5+ version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.S index 19ddf91700..264e032b3b 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.S @@ -1,5 +1,5 @@ /* ceilf function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf.c index ae1003628b..1f10ed6585 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf.c @@ -1,5 +1,5 @@ /* Multiple versions of ceilf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-float.h> extern __typeof (__ceilf) __ceilf_ppc32 attribute_hidden; extern __typeof (__ceilf) __ceilf_power5plus attribute_hidden; @@ -29,4 +30,4 @@ libc_ifunc (__ceilf, ? __ceilf_power5plus : __ceilf_ppc32); -weak_alias (__ceilf, ceilf) +libm_alias_float (__ceil, ceil) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-power6.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-power6.S index 2fd216efae..dce94759da 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-power6.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-power6.S @@ -1,5 +1,5 @@ /* copysign(). PowerPC32/POWER6 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-ppc32.S index 75df244afe..8e576f2dc4 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign-ppc32.S @@ -1,5 +1,5 @@ /* copysign(). PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c index 310aa9fb54..86df7d6bc2 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysign.c @@ -1,5 +1,5 @@ /* Multiple versions of copysign. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,6 +25,7 @@ #undef __copysign #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-double.h> extern __typeof (__redirect_copysign) __copysign_ppc32 attribute_hidden; extern __typeof (__redirect_copysign) __copysign_power6 attribute_hidden; @@ -36,16 +37,8 @@ libc_ifunc (__libm_copysign, : __copysign_ppc32); strong_alias (__libm_copysign, __copysign) -weak_alias (__copysign, copysign) +libm_alias_double (__copysign, copysign) -#ifdef NO_LONG_DOUBLE -weak_alias (__copysign,copysignl) -strong_alias(__copysign,__copysignl) -#endif -#if IS_IN (libm) -# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __copysign, copysignl, GLIBC_2_0); -# endif -#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) +#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) compat_symbol (libc, __copysign, copysignl, GLIBC_2_0); #endif diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysignf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysignf.c index 255c5a0d63..d2900b3287 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysignf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysignf.c @@ -1,5 +1,5 @@ /* Multiple versions of copysignf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ #include <math.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-float.h> /* It's safe to use double-precision implementation for single-precision. */ extern __typeof (__copysignf) __copysign_ppc32 attribute_hidden; @@ -29,4 +30,4 @@ libc_ifunc (__copysignf, ? __copysign_power6 : __copysign_ppc32); -weak_alias (__copysignf, copysignf) +libm_alias_float (__copysign, copysign) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite-power7.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite-power7.S index 63f958d5cf..034fec7d1c 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite-power7.S @@ -1,5 +1,5 @@ /* finite(). PowerPC32/POWER7 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite-ppc32.c index af6ec9500d..74498c2714 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite-ppc32.c @@ -1,5 +1,5 @@ /* finite(). PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c index c860a1b5d3..9ef6d109a6 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c @@ -1,5 +1,5 @@ /* Multiple versions of finite. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,6 +16,9 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#define __finite __redirect___finite +#define __finitef __redirect___finitef +#define __finitel __redirect___finitel #include <math.h> #include <math_ldbl_opt.h> #include <shlib-compat.h> @@ -23,11 +26,14 @@ extern __typeof (__finite) __finite_ppc32 attribute_hidden; extern __typeof (__finite) __finite_power7 attribute_hidden; - -libc_ifunc (__finite, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __finite_power7 - : __finite_ppc32); +#undef __finite +#undef __finitef +#undef __finitel + +libc_ifunc_redirected (__redirect___finite, __finite, + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __finite_power7 + : __finite_ppc32); weak_alias (__finite, finite) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef-ppc32.c index c0a5df3def..681cb3fb25 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef-ppc32.c @@ -1,5 +1,5 @@ /* finitef(). PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef.c index 831c94f3fc..b512ba6c64 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef.c @@ -1,5 +1,5 @@ /* Multiple versions of finitef. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#define __finitef __redirect___finitef #include <math.h> #include <shlib-compat.h> #include "init-arch.h" @@ -23,10 +24,11 @@ extern __typeof (__finitef) __finitef_ppc32 attribute_hidden; /* The power7 finite(double) works for float. */ extern __typeof (__finitef) __finite_power7 attribute_hidden; +#undef __finitef -libc_ifunc (__finitef, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __finite_power7 - : __finitef_ppc32); +libc_ifunc_redirected (__redirect___finitef, __finitef, + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __finite_power7 + : __finitef_ppc32); weak_alias (__finitef, finitef) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor-power5+.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor-power5+.S index 421d68ea28..709a1910e9 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor-power5+.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor-power5+.S @@ -1,5 +1,5 @@ /* floor function. PowerPC32/power5+ version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor-ppc32.S index 5d938b5bde..bf4110cde6 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor-ppc32.S @@ -1,5 +1,5 @@ /* floor function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor.c index 6f5311eca5..0152ea606e 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floor.c @@ -1,5 +1,5 @@ /* Multiple versions of floor. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-double.h> extern __typeof (__floor) __floor_ppc32 attribute_hidden; extern __typeof (__floor) __floor_power5plus attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__floor, ? __floor_power5plus : __floor_ppc32); -weak_alias (__floor, floor) - -#ifdef NO_LONG_DOUBLE -strong_alias (__floor, __floorl) -weak_alias (__floor, floorl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __floor, floorl, GLIBC_2_0); -#endif +libm_alias_double (__floor, floor) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf-power5+.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf-power5+.S index c4fc6de0ec..1a6b089060 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf-power5+.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf-power5+.S @@ -1,5 +1,5 @@ /* floorf function. PowerPC32/power5+ version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf-ppc32.S index 0ac7f967ce..c1be69e0df 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf-ppc32.S @@ -1,5 +1,5 @@ /* floorf function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf.c index 2fc151fd53..57ae50c9f6 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf.c @@ -1,5 +1,5 @@ /* Multiple versions of floorf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-float.h> extern __typeof (__floorf) __floorf_ppc32 attribute_hidden; extern __typeof (__floorf) __floorf_power5plus attribute_hidden; @@ -29,4 +30,4 @@ libc_ifunc (__floorf, ? __floorf_power5plus : __floorf_ppc32); -weak_alias (__floorf, floorf) +libm_alias_float (__floor, floor) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf-power7.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf-power7.S index 51d3f8869c..3748019890 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf-power7.S @@ -1,5 +1,5 @@ /* isinf(). PowerPC32/POWER7 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf-ppc32.c index 87c9e20f2c..633fe9485d 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf-ppc32.c @@ -1,5 +1,5 @@ /* isinf(). PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c index 506c1115e8..764d511c2a 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinf.c @@ -1,5 +1,5 @@ /* Multiple versions of isinf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,6 +16,9 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#define __isinf __redirect___isinf +#define __isinff __redirect___isinff +#define __isinfl __redirect___isinfl #include <math.h> #include <math_ldbl_opt.h> #include <shlib-compat.h> @@ -23,11 +26,14 @@ extern __typeof (__isinf) __isinf_ppc32 attribute_hidden; extern __typeof (__isinf) __isinf_power7 attribute_hidden; - -libc_ifunc (__isinf, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isinf_power7 - : __isinf_ppc32); +#undef __isinf +#undef __isinff +#undef __isinfl + +libc_ifunc_redirected (__redirect___isinf, __isinf, + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isinf_power7 + : __isinf_ppc32); weak_alias (__isinf, isinf) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff-ppc32.c index 0c830fd7f5..8d1801abf1 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff-ppc32.c @@ -1,5 +1,5 @@ /* isinff(). PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff.c index 2ab83ee7cb..949c052788 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isinff.c @@ -1,5 +1,5 @@ /* Multiple versions of isinf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,6 +16,7 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#define __isinff __redirect___isinff #include <math.h> #include <math_ldbl_opt.h> #include <shlib-compat.h> @@ -24,10 +25,11 @@ extern __typeof (__isinff) __isinff_ppc32 attribute_hidden; /* The power7 isinf(double) works for float. */ extern __typeof (__isinff) __isinf_power7 attribute_hidden; +#undef __isinff -libc_ifunc (__isinff, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isinf_power7 - : __isinff_ppc32); +libc_ifunc_redirected (__redirect___isinff, __isinff, + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isinf_power7 + : __isinff_ppc32); weak_alias (__isinff, isinff) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-power5.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-power5.S index 44aa92e399..de55f5ae27 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-power5.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-power5.S @@ -1,5 +1,5 @@ /* isnan(). PowerPC32/POWER5 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-power6.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-power6.S index b41fde7a01..f9008a2571 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-power6.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-power6.S @@ -1,5 +1,5 @@ /* isnan(). PowerPC32/POWER6 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-power7.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-power7.S index a7bc994d0e..08fe361ffe 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-power7.S @@ -1,5 +1,5 @@ /* isnan(). PowerPC32/POWER7 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-ppc32.S index 75b254fc20..293174f80b 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan-ppc32.S @@ -1,5 +1,5 @@ /* isnan(). PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan.c index 8f848d7bbc..1a1dcb729b 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnan.c @@ -1,5 +1,5 @@ /* Multiple versions of isnan. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,6 +16,9 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#define __isnan __redirect___isnan +#define __isnanf __redirect___isnanf +#define __isnanl __redirect___isnanl #include <math.h> #include <math_ldbl_opt.h> #include <shlib-compat.h> @@ -25,15 +28,18 @@ extern __typeof (__isnan) __isnan_ppc32 attribute_hidden; extern __typeof (__isnan) __isnan_power5 attribute_hidden; extern __typeof (__isnan) __isnan_power6 attribute_hidden; extern __typeof (__isnan) __isnan_power7 attribute_hidden; - -libc_ifunc (__isnan, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isnan_power7 : - (hwcap & PPC_FEATURE_ARCH_2_05) - ? __isnan_power6 : - (hwcap & PPC_FEATURE_POWER5) - ? __isnan_power5 - : __isnan_ppc32); +#undef __isnan +#undef __isnanf +#undef __isnanl + +libc_ifunc_redirected (__redirect___isnan, __isnan, + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isnan_power7 + : (hwcap & PPC_FEATURE_ARCH_2_05) + ? __isnan_power6 + : (hwcap & PPC_FEATURE_POWER5) + ? __isnan_power5 + : __isnan_ppc32); weak_alias (__isnan, isnan) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf-power5.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf-power5.S index 152b915b7c..a9484177df 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf-power5.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf-power5.S @@ -1,5 +1,5 @@ /* isnanf(). PowerPC32/POWER5 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf-power6.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf-power6.S index 03c014078d..3565165003 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf-power6.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf-power6.S @@ -1,5 +1,5 @@ /* isnanf(). PowerPC32/POWER6 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf.c index c43c0f3293..0c04a314fb 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_isnanf.c @@ -1,5 +1,5 @@ /* Multiple versions of isnanf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -26,13 +26,14 @@ extern __typeof (__isnanf) __isnanf_power5 attribute_hidden; extern __typeof (__isnanf) __isnanf_power6 attribute_hidden; extern __typeof (__isnanf) __isnan_power7 attribute_hidden; -libc_ifunc (__isnanf, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isnan_power7 : - (hwcap & PPC_FEATURE_ARCH_2_05) - ? __isnanf_power6 : - (hwcap & PPC_FEATURE_POWER5) - ? __isnanf_power5 - : __isnan_ppc32); +libc_ifunc_hidden (__isnanf, __isnanf, + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isnan_power7 + : (hwcap & PPC_FEATURE_ARCH_2_05) + ? __isnanf_power6 + : (hwcap & PPC_FEATURE_POWER5) + ? __isnanf_power5 + : __isnan_ppc32); +hidden_def (__isnanf) weak_alias (__isnanf, isnanf) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S index ff96b05033..9a5c6063af 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S @@ -1,5 +1,5 @@ /* Round double to long int. PowerPC32/Power6. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S index 36ca67875d..61a2fcd619 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S @@ -1,5 +1,5 @@ /* llrint function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint.c index 2ac592eb0a..2981b61129 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint.c @@ -1,5 +1,5 @@ /* Multiple versions of llrint. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-double.h> extern __typeof (__llrint) __llrint_ppc32 attribute_hidden; extern __typeof (__llrint) __llrint_power6 attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__llrint, ? __llrint_power6 : __llrint_ppc32); -weak_alias (__llrint, llrint) - -#ifdef NO_LONG_DOUBLE -strong_alias (__llrint, __llrintl) -weak_alias (__llrint, llrintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __llrint, llrintl, GLIBC_2_1); -#endif +libm_alias_double (__llrint, llrint) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S index 8b95159d38..a0c38b3e5a 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S @@ -1,5 +1,5 @@ /* Round float to long int. PowerPC32/POWER6 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S index 6746ba0917..eab87b79c3 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S @@ -1,5 +1,5 @@ /* llrintf function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf.c index 77183d44cb..12419451ac 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf.c @@ -1,5 +1,5 @@ /* Multiple versions of llrintf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ #include <math.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-float.h> extern __typeof (__llrintf) __llrintf_ppc32 attribute_hidden; extern __typeof (__llrintf) __llrintf_power6 attribute_hidden; @@ -28,4 +29,4 @@ libc_ifunc (__llrintf, ? __llrintf_power6 : __llrintf_ppc32); -weak_alias (__llrintf, llrintf) +libm_alias_float (__llrint, llrint) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround-power5+.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround-power5+.S index 39bdc422ef..0c62aa81ea 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround-power5+.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround-power5+.S @@ -1,5 +1,5 @@ /* lround function. PowerPC32/POWER5+ version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround-power6.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround-power6.S index 925aa8b5e2..bc0fdd76f5 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround-power6.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround-power6.S @@ -1,5 +1,5 @@ /* lround function. PowerPC32/POWER6 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround-ppc32.S index 919cc030aa..43a3403d1f 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround-ppc32.S @@ -1,5 +1,5 @@ /* llround function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround.c index 38d7790307..7889d71c71 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llround.c @@ -1,5 +1,5 @@ /* Multiple versions of llround. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-double.h> extern __typeof (__llround) __llround_ppc32 attribute_hidden; extern __typeof (__llround) __llround_power5plus attribute_hidden; @@ -32,12 +33,4 @@ libc_ifunc (__llround, ? __llround_power5plus : __llround_ppc32); -weak_alias (__llround, llround) - -#ifdef NO_LONG_DOUBLE -strong_alias (__llround, __llroundl) -weak_alias (__llround, llroundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __llround, llroundl, GLIBC_2_1); -#endif +libm_alias_double (__llround, llround) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llroundf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llroundf.c index b475c1d852..ce0ac14dff 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llroundf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llroundf.c @@ -1,5 +1,5 @@ /* Multiple versions of llroundf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <math.h> #include "init-arch.h" +#include <libm-alias-float.h> /* It's safe to use double-precision implementation for single-precision. */ extern __typeof (__llroundf) __llround_ppc32 attribute_hidden; @@ -31,4 +32,4 @@ libc_ifunc (__llroundf, ? __llround_power5plus : __llround_ppc32); -weak_alias (__llroundf, llroundf) +libm_alias_float (__llround, llround) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb-power7.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb-power7.c index 6c83dec9f6..2a9726ce38 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb-power7.c @@ -1,5 +1,5 @@ /* logb(). PowerPC32/POWER7 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb-ppc32.c index 025aae6fe0..b21fc1a05b 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb-ppc32.c @@ -1,5 +1,5 @@ /* logb(). PowerPC32/POWER7 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,11 +18,6 @@ #include <math.h> -#undef weak_alias -#define weak_alias(a, b) -#undef strong_alias -#define strong_alias(a, b) - #define __logb __logb_ppc32 #include <sysdeps/ieee754/dbl-64/s_logb.c> diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb.c index deb72251a8..5f1b0d1e21 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb.c @@ -1,5 +1,5 @@ /* Multiple versions of logb. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-double.h> extern __typeof (__logb) __logb_ppc32 attribute_hidden; extern __typeof (__logb) __logb_power7 attribute_hidden; @@ -29,13 +30,4 @@ libc_ifunc (__logb, ? __logb_power7 : __logb_ppc32); -weak_alias (__logb, logb) - -#ifdef NO_LONG_DOUBLE -strong_alias (__logb, __logbl) -weak_alias (__logb, logbl) -#endif - -#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0) -compat_symbol (libm, logb, logbl, GLIBC_2_0); -#endif +libm_alias_double (__logb, logb) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf-power7.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf-power7.c index 8f19504ba3..5ad1af97db 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf-power7.c @@ -1,5 +1,5 @@ /* logbf(). PowerPC32/POWER7 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf-ppc32.c index fabe5cde6f..732934437e 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf-ppc32.c @@ -1,5 +1,5 @@ /* logbf(). PowerPC32 default implementation. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf.c index 7638e855ee..34314d67f5 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf.c @@ -1,5 +1,5 @@ /* Multiple versions of logbf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-float.h> extern __typeof (__logbf) __logbf_ppc32 attribute_hidden; extern __typeof (__logbf) __logbf_power7 attribute_hidden; @@ -29,4 +30,4 @@ libc_ifunc (__logbf, ? __logbf_power7 : __logbf_ppc32); -weak_alias (__logbf, logbf) +libm_alias_float (__logb, logb) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbl-power7.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbl-power7.c index 6b2180faf8..2634375191 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbl-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbl-power7.c @@ -1,5 +1,5 @@ /* logbl(). PowerPC32/POWER7 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbl-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbl-ppc32.c index 96cd137146..33d29a7c24 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbl-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbl-ppc32.c @@ -1,5 +1,5 @@ /* logbl(). PowerPC32/POWER7 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbl.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbl.c index c0014b21cf..9556bc95d9 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbl.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbl.c @@ -1,5 +1,5 @@ /* Multiple versions of logbl. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-power6x.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-power6x.S index 161c5617c3..e75e352091 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-power6x.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-power6x.S @@ -1,5 +1,5 @@ /* Round double to long int. POWER6x PowerPC32 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S index 6fb1b89100..14863448cb 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S @@ -1,5 +1,5 @@ /* Round double to long int. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint.c index 90931ee8ab..3f6f34eea5 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint.c @@ -1,5 +1,5 @@ /* Multiple versions of lrint. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-double.h> extern __typeof (__lrint) __lrint_ppc32 attribute_hidden; extern __typeof (__lrint) __lrint_power6x attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__lrint, __lrint_power6x : __lrint_ppc32); -weak_alias (__lrint, lrint) - -#ifdef NO_LONG_DOUBLE -weak_alias (__lrint, lrintl) -strong_alias (__lrint, __lrintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __lrint, lrintl, GLIBC_2_1); -#endif +libm_alias_double (__lrint, lrint) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrintf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrintf.c index 38965e7fa5..1de8336a5b 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrintf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrintf.c @@ -1,5 +1,5 @@ /* Multiple versions of lrintf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <math.h> #include "init-arch.h" +#include <libm-alias-float.h> /* It's safe to use double-precision implementation for single-precision. */ extern __typeof (__lrintf) __lrint_ppc32 attribute_hidden; @@ -28,4 +29,4 @@ libc_ifunc (__lrintf, __lrint_power6x : __lrint_ppc32); -weak_alias (__lrintf, lrintf) +libm_alias_float (__lrint, lrint) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-power5+.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-power5+.S index 988ba829a7..9e99317a85 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-power5+.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-power5+.S @@ -1,5 +1,5 @@ /* lround function. POWER5+, PowerPC32 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-power6x.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-power6x.S index fc268134c4..7c0a954b56 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-power6x.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-power6x.S @@ -1,5 +1,5 @@ /* lround function. POWER6x, PowerPC32 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-ppc32.S index 677424f8a4..199c8a3c76 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-ppc32.S @@ -1,5 +1,5 @@ /* lround function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround.c index 8c435258a9..63778e42b3 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround.c @@ -1,5 +1,5 @@ /* Multiple versions of lround. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-double.h> extern __typeof (__lround) __lround_ppc32 attribute_hidden; extern __typeof (__lround) __lround_power5plus attribute_hidden; @@ -32,12 +33,4 @@ libc_ifunc (__lround, __lround_power5plus : __lround_ppc32); -weak_alias (__lround, lround) - -#ifdef NO_LONG_DOUBLE -weak_alias (__lround, lroundl) -strong_alias (__lround, __lroundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __lround, lroundl, GLIBC_2_1); -#endif +libm_alias_double (__lround, lround) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lroundf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lroundf.c index f420f05205..8b60c03e61 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lroundf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lroundf.c @@ -1,5 +1,5 @@ /* Multiple versions of lroundf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <math.h> #include "init-arch.h" +#include <libm-alias-float.h> /* It's safe to use double-precision implementation for single-precision. */ extern __typeof (__lroundf) __lround_ppc32 attribute_hidden; @@ -31,4 +32,4 @@ libc_ifunc (__lroundf, __lround_power5plus : __lround_ppc32); -weak_alias (__lroundf, lroundf) +libm_alias_float (__lround, lround) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf-power5+.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf-power5+.c index 8548d397ce..8b42d97a6f 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf-power5+.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf-power5+.c @@ -1,5 +1,5 @@ /* PowerPC/POWER5+ implementation for modf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf-ppc32.c index 4e9b758fcc..7eeef17d40 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf-ppc32.c @@ -1,5 +1,5 @@ /* PowerPC32 default implementation for modf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,11 +19,6 @@ #include <math.h> #include <math_ldbl_opt.h> -#undef weak_alias -#define weak_alias(a,b) -#undef strong_alias -#define strong_alias(a,b) - #define __modf __modf_ppc32 #include <sysdeps/ieee754/dbl-64/s_modf.c> diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c index 70bc64e161..fe810edaef 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modf.c @@ -1,5 +1,5 @@ /* Multiple versions of modf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-double.h> extern __typeof (__modf) __modf_ppc32 attribute_hidden; extern __typeof (__modf) __modf_power5plus attribute_hidden; @@ -29,16 +30,8 @@ libc_ifunc (__modf, ? __modf_power5plus : __modf_ppc32); -weak_alias (__modf, modf) +libm_alias_double (__modf, modf) -#ifdef NO_LONG_DOUBLE -strong_alias (__modf, __modfl) -weak_alias (__modf, modfl) -#endif -#if IS_IN (libm) -# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __modf, modfl, GLIBC_2_0); -# endif -#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) +#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) compat_symbol (libc, __modf, modfl, GLIBC_2_0); #endif diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff-power5+.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff-power5+.c index 9c61d90831..b966d58780 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff-power5+.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff-power5+.c @@ -1,5 +1,5 @@ /* PowerPC/POWER5+ implementation for modff. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff-ppc32.c index 4e62915b12..3ba36bf52f 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff-ppc32.c @@ -1,5 +1,5 @@ /* PowerPC32 default implementation for modff. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff.c index 8b46e81b6a..e1d6e82290 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff.c @@ -1,5 +1,5 @@ /* Multiple versions of modff. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <math.h> #include "init-arch.h" +#include <libm-alias-float.h> extern __typeof (__modff) __modff_ppc32 attribute_hidden; extern __typeof (__modff) __modff_power5plus attribute_hidden; @@ -27,4 +28,4 @@ libc_ifunc (__modff, ? __modff_power5plus : __modff_ppc32); -weak_alias (__modff, modff) +libm_alias_float (__modf, modf) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round-power5+.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round-power5+.S index 5e8849147f..50fdd1bc44 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round-power5+.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round-power5+.S @@ -1,5 +1,5 @@ /* round function. PowerPC32/power5+ version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round-ppc32.S index b21302eeb4..e3a24275aa 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round-ppc32.S @@ -1,5 +1,5 @@ /* round function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round.c index 3b052209a6..65e7801315 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_round.c @@ -1,5 +1,5 @@ /* Multiple versions of round. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-double.h> extern __typeof (__round) __round_ppc32 attribute_hidden; extern __typeof (__round) __round_power5plus attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__round, ? __round_power5plus : __round_ppc32); -weak_alias (__round, round) - -#ifdef NO_LONG_DOUBLE -strong_alias (__round, __roundl) -weak_alias (__round, roundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __round, roundl, GLIBC_2_1); -#endif +libm_alias_double (__round, round) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf-power5+.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf-power5+.S index 98857b0097..e1974ebc64 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf-power5+.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf-power5+.S @@ -1,5 +1,5 @@ /* roundf function. PowerPC32/power5+ version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf-ppc32.S index ef9b16fa2f..9323cf911a 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf-ppc32.S @@ -1,5 +1,5 @@ /* roundf function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf.c index 949e9b8d90..0d923a2ca6 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf.c @@ -1,5 +1,5 @@ /* Multiple versions of roundf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-float.h> extern __typeof (__roundf) __roundf_ppc32 attribute_hidden; extern __typeof (__roundf) __roundf_power5plus attribute_hidden; @@ -29,4 +30,4 @@ libc_ifunc (__roundf, ? __roundf_power5plus : __roundf_ppc32); -weak_alias (__roundf, roundf) +libm_alias_float (__round, round) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc-power5+.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc-power5+.S index 5e8c19f268..3e3441d575 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc-power5+.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc-power5+.S @@ -1,5 +1,5 @@ /* trunc function. PowerPC32/power5+ version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc-ppc32.S index 7e0ec091e4..86e50ad66a 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc-ppc32.S @@ -1,5 +1,5 @@ /* trunc function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc.c index e1ca31855b..5712d6a3b2 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_trunc.c @@ -1,5 +1,5 @@ /* Multiple versions of trunc. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-double.h> extern __typeof (__trunc) __trunc_ppc32 attribute_hidden; extern __typeof (__trunc) __trunc_power5plus attribute_hidden; @@ -29,12 +30,4 @@ libc_ifunc (__trunc, ? __trunc_power5plus : __trunc_ppc32); -weak_alias (__trunc, trunc) - -#ifdef NO_LONG_DOUBLE -strong_alias (__trunc, __truncl) -weak_alias (__trunc, truncl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __trunc, truncl, GLIBC_2_1); -#endif +libm_alias_double (__trunc, trunc) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf-power5+.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf-power5+.S index a4c4db9af3..dfc3af881a 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf-power5+.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf-power5+.S @@ -1,5 +1,5 @@ /* truncf function. PowerPC32/power5+ version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf-ppc32.S index 6e407fb168..f85dcfe3a9 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf-ppc32.S @@ -1,5 +1,5 @@ /* truncf function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf.c index 57116e8a9b..d5d72b52fe 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf.c +++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf.c @@ -1,5 +1,5 @@ /* Multiple versions of truncf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" +#include <libm-alias-float.h> extern __typeof (__truncf) __truncf_ppc32 attribute_hidden; extern __typeof (__truncf) __truncf_power5plus attribute_hidden; @@ -29,4 +30,4 @@ libc_ifunc (__truncf, ? __truncf_power5plus : __truncf_ppc32); -weak_alias (__truncf, truncf) +libm_alias_float (__trunc, trunc) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt.c deleted file mode 100644 index 7569800196..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrt.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Multiple versions of sqrt. - Copyright (C) 2013-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <math.h> -#include <math_ldbl_opt.h> -#include <shlib-compat.h> -#include "init-arch.h" - -extern __typeof (__sqrt) __sqrt_ppc32 attribute_hidden; -extern __typeof (__sqrt) __sqrt_power5 attribute_hidden; - -libc_ifunc (__sqrt, - (hwcap & PPC_FEATURE_POWER5) - ? __sqrt_power5 - : __sqrt_ppc32); - -weak_alias (__sqrt, sqrt) - -#ifdef NO_LONG_DOUBLE -strong_alias (__sqrt, __sqrtl) -weak_alias (__sqrt, sqrtl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0); -#endif diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf.c deleted file mode 100644 index b7c8c23fd1..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Multiple versions of sqrtf. - Copyright (C) 2013-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <math.h> -#include <math_ldbl_opt.h> -#include <shlib-compat.h> -#include "init-arch.h" - -extern __typeof (__sqrtf) __sqrtf_ppc32 attribute_hidden; -extern __typeof (__sqrtf) __sqrtf_power5 attribute_hidden; - -libc_ifunc (__sqrtf, - (hwcap & PPC_FEATURE_POWER5) - ? __sqrtf_power5 - : __sqrtf_ppc32); - -weak_alias (__sqrtf, sqrtf) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S index d55d55d4aa..00c600d18d 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S @@ -1,5 +1,5 @@ /* Round double to long int. PowerPC32 on PowerPC64 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-double.h> /* long long int[r3, r4] __llrint (double x[fp1]) */ ENTRY (__llrint) @@ -35,12 +36,4 @@ ENTRY (__llrint) blr END (__llrint) -weak_alias (__llrint, llrint) - -#ifdef NO_LONG_DOUBLE -strong_alias (__llrint, __llrintl) -weak_alias (__llrint, llrintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __llrint, llrintl, GLIBC_2_1) -#endif +libm_alias_double (__llrint, llrint) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S index 712e173c79..ffc323cb43 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S @@ -1,5 +1,5 @@ /* Round float to long int. PowerPC32 on PowerPC64 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <libm-alias-float.h> /* long long int[r3, r4] __llrintf (float x[fp1]) */ ENTRY (__llrintf) @@ -34,5 +35,5 @@ ENTRY (__llrintf) blr END (__llrintf) -weak_alias (__llrintf, llrintf) +libm_alias_float (__llrint, llrint) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S index 467e39b81c..5ad89a1486 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S @@ -1,5 +1,5 @@ /* llround function. PowerPC32 on PowerPC64 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,8 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-float.h> +#include <libm-alias-double.h> .section .rodata.cst8,"aM",@progbits,8 .align 3 @@ -69,6 +71,11 @@ ENTRY (__llround) fcmpu cr1,fp1,fp12 /* x is negative? x < 0.0 */ blt- cr6,.Lretzero /* 0.5 > x < -0.5 so just return 0. */ bge- cr7,.Lnobias /* 2^52 > x < -2^52 just convert with no bias. */ + /* Test whether an integer to avoid spurious "inexact". */ + fadd fp3,fp2,fp9 + fsub fp3,fp3,fp9 + fcmpu cr5,fp2,fp3 + beq cr5,.Lnobias fadd fp3,fp2,fp10 /* |x|+=0.5 bias to prepare to round. */ bge cr1,.Lconvert /* x is positive so don't negate x. */ fnabs fp3,fp3 /* -(|x|+=0.5) */ @@ -92,15 +99,7 @@ ENTRY (__llround) b .Lconvert END (__llround) -weak_alias (__llround, llround) +libm_alias_double (__llround, llround) strong_alias (__llround, __llroundf) -weak_alias (__llround, llroundf) - -#ifdef NO_LONG_DOUBLE -weak_alias (__llround, llroundl) -strong_alias (__llround, __llroundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __llround, llroundl, GLIBC_2_1) -#endif +libm_alias_float (__llround, llround) diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S deleted file mode 100644 index b6e87621cc..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S +++ /dev/null @@ -1,109 +0,0 @@ -/* sqrt function. PowerPC32 version. - Copyright (C) 2007-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> -#include <math_ldbl_opt.h> - -/* double [fp1] sqrt (double x [fp1]) - Power4 (ISA V2.0) and above implement sqrt in hardware (not optional). - The fsqrt instruction generates the correct value for all inputs and - sets the appropriate floating point exceptions. Extended checking is - only needed to set errno (via __kernel_standard) if the input value - is negative. - - The fsqrt will set FPCC and FU (Floating Point Unordered or NaN - to indicated that the input value was negative or NaN. Use Move to - Condition Register from FPSCR to copy the FPCC field to cr1. The - branch on summary overflow transfers control to w_sqrt to process - any error conditions. Otherwise we can return the result directly. - - This part of the function is a leaf routine, so no need to stack a - frame or execute prologue/epilogue code. This means it is safe to - transfer directly to w_sqrt as long as the input value (f1) is - preserved. Putting the sqrt result into f2 (double parameter 2) - allows passing both the input value and sqrt result into the extended - wrapper so there is no need to recompute. - - This tactic avoids the overhead of stacking a frame for the normal - (non-error) case. Until gcc supports prologue shrink-wrapping - this is the best we can do. */ - - .section ".text" - .machine power4 -EALIGN (__sqrt, 5, 0) - fsqrt fp2,fp1 - mcrfs cr1,4 - bso- cr1,.Lw_sqrt - fmr fp1,fp2 - blr - .align 4 -.Lw_sqrt: - mflr r0 - stwu r1,-16(r1) - cfi_adjust_cfa_offset(16) - fmr fp12,fp2 - stw r0,20(r1) - stw r30,8(r1) - cfi_offset(lr,20-16) - cfi_offset(r30,8-16) -#ifdef SHARED - SETUP_GOT_ACCESS(r30,got_label) - addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha - addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l - lwz r9,_LIB_VERSION@got(30) - lwz r0,0(r9) -#else - lis r9,_LIB_VERSION@ha - lwz r0,_LIB_VERSION@l(r9) -#endif -/* if (_LIB_VERSION == _IEEE_) return z; */ - cmpwi cr7,r0,-1 - beq- cr7,.L4 -/* if (x != x) return z; !isnan*/ - fcmpu cr7,fp1,fp1 - bne- cr7,.L4 -/* if (x < 0.0) - return __kernel_standard (x, x, 26) */ - fmr fp2,fp1 - fabs fp0,fp1 - li r3,26 - fcmpu cr7,fp1,fp0 - bne- cr7,.L11 -.L4: - lwz r0,20(r1) - fmr fp1,fp12 - lwz r30,8(r1) - addi r1,r1,16 - mtlr r0 - blr -.L11: - bl __kernel_standard@plt - fmr fp12,fp1 - b .L4 - END (__sqrt) - -weak_alias (__sqrt, sqrt) - -#ifdef NO_LONG_DOUBLE -weak_alias (__sqrt, sqrtl) -strong_alias (__sqrt, __sqrtl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0) -#endif - diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S deleted file mode 100644 index 4403cf3ef0..0000000000 --- a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S +++ /dev/null @@ -1,101 +0,0 @@ -/* sqrtf function. PowerPC32 version. - Copyright (C) 2007-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> -#include <math_ldbl_opt.h> - -/* float [fp1] sqrts (float x [fp1]) - Power4 (ISA V2.0) and above implement sqrt in hardware (not optional). - The fsqrts instruction generates the correct value for all inputs and - sets the appropriate floating point exceptions. Extended checking is - only needed to set errno (via __kernel_standard) if the input value - is negative. - - The fsqrts will set FPCC and FU (Floating Point Unordered or NaN - to indicated that the input value was negative or NaN. Use Move to - Condition Register from FPSCR to copy the FPCC field to cr1. The - branch on summary overflow transfers control to w_sqrt to process - any error conditions. Otherwise we can return the result directly. - - This part of the function is a leaf routine, so no need to stack a - frame or execute prologue/epilogue code. This means it is safe to - transfer directly to w_sqrt as long as the input value (f1) is - preserved. Putting the sqrt result into f2 (float parameter 2) - allows passing both the input value and sqrt result into the extended - wrapper so there is no need to recompute. - - This tactic avoids the overhead of stacking a frame for the normal - (non-error) case. Until gcc supports prologue shrink-wrapping - this is the best we can do. */ - - .section ".text" - .machine power4 -EALIGN (__sqrtf, 5, 0) - fsqrts fp2,fp1 - mcrfs cr1,4 - bso- cr1,.Lw_sqrtf - fmr fp1,fp2 - blr - .align 4 -.Lw_sqrtf: - mflr r0 - stwu r1,-16(r1) - cfi_adjust_cfa_offset(16) - fmr fp12,fp2 - stw r0,20(r1) - stw r30,8(r1) - cfi_offset(lr,20-16) - cfi_offset(r30,8-16) -#ifdef SHARED - SETUP_GOT_ACCESS(r30,got_label) - addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha - addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l - lwz r9,_LIB_VERSION@got(30) - lwz r0,0(r9) -#else - lis r9,_LIB_VERSION@ha - lwz r0,_LIB_VERSION@l(r9) -#endif -/* if (_LIB_VERSION == _IEEE_) return z; */ - cmpwi cr7,r0,-1 - beq- cr7,.L4 -/* if (x != x, 0) return z; !isnan */ - fcmpu cr7,fp1,fp1 - bne- cr7,.L4 -/* if (x < 0.0) - return __kernel_standard (x, x, 126) */ - fmr fp2,fp1 - fabs fp0,fp1 - li r3,126 - fcmpu cr7,1,0 - bne- cr7,.L11 -.L4: - lwz r0,20(r1) - fmr fp1,fp12 - lwz r30,8(r1) - addi r1,r1,16 - mtlr r0 - blr -.L11: - bl __kernel_standard@plt - fmr fp12,fp1 - b .L4 - END (__sqrtf) - -weak_alias (__sqrtf, sqrtf) - diff --git a/sysdeps/powerpc/powerpc32/power4/hp-timing.h b/sysdeps/powerpc/powerpc32/power4/hp-timing.h index 870514d982..10efcac481 100644 --- a/sysdeps/powerpc/powerpc32/power4/hp-timing.h +++ b/sysdeps/powerpc/powerpc32/power4/hp-timing.h @@ -1,5 +1,5 @@ /* High precision, low overhead timing functions. powerpc64 version. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. diff --git a/sysdeps/powerpc/powerpc32/power4/memcmp.S b/sysdeps/powerpc/powerpc32/power4/memcmp.S index 602a7957ad..cc4bd32482 100644 --- a/sysdeps/powerpc/powerpc32/power4/memcmp.S +++ b/sysdeps/powerpc/powerpc32/power4/memcmp.S @@ -1,5 +1,5 @@ /* Optimized strcmp implementation for PowerPC32. - Copyright (C) 2003-2016 Free Software Foundation, Inc. + Copyright (C) 2003-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -54,8 +54,8 @@ EALIGN (memcmp, 4, 0) stwu 1, -64(r1) cfi_adjust_cfa_offset(64) stw rWORD8, 48(r1) - cfi_offset(rWORD8, (48-64)) stw rWORD7, 44(r1) + cfi_offset(rWORD8, (48-64)) cfi_offset(rWORD7, (44-64)) bne L(unaligned) /* At this point we know both strings have the same alignment and the @@ -747,18 +747,18 @@ L(unaligned): the actual start of rSTR2. */ clrrwi rSTR2, rSTR2, 2 stw rWORD2_SHIFT, 28(r1) - cfi_offset(rWORD2_SHIFT, (28-64)) /* Compute the left/right shift counts for the unaligned rSTR2, compensating for the logical (W aligned) start of rSTR1. */ clrlwi rSHL, rWORD8_SHIFT, 30 clrrwi rSTR1, rSTR1, 2 stw rWORD4_SHIFT, 24(r1) - cfi_offset(rWORD4_SHIFT, (24-64)) slwi rSHL, rSHL, 3 cmplw cr5, rWORD8_SHIFT, rSTR2 add rN, rN, r12 slwi rWORD6, r12, 3 stw rWORD6_SHIFT, 20(r1) + cfi_offset(rWORD2_SHIFT, (28-64)) + cfi_offset(rWORD4_SHIFT, (24-64)) cfi_offset(rWORD6_SHIFT, (20-64)) subfic rSHR, rSHL, 32 srwi r0, rN, 4 /* Divide by 16 */ @@ -852,15 +852,15 @@ L(duPs4): .align 4 L(Wunaligned): stw rWORD8_SHIFT, 32(r1) - cfi_offset(rWORD8_SHIFT, (32-64)) clrrwi rSTR2, rSTR2, 2 stw rWORD2_SHIFT, 28(r1) - cfi_offset(rWORD2_SHIFT, (28-64)) srwi r0, rN, 4 /* Divide by 16 */ stw rWORD4_SHIFT, 24(r1) - cfi_offset(rWORD4_SHIFT, (24-64)) andi. r12, rN, 12 /* Get the W remainder */ stw rWORD6_SHIFT, 20(r1) + cfi_offset(rWORD8_SHIFT, (32-64)) + cfi_offset(rWORD2_SHIFT, (28-64)) + cfi_offset(rWORD4_SHIFT, (24-64)) cfi_offset(rWORD6_SHIFT, (20-64)) slwi rSHL, rSHL, 3 #ifdef __LITTLE_ENDIAN__ diff --git a/sysdeps/powerpc/powerpc32/power4/memcopy.h b/sysdeps/powerpc/powerpc32/power4/memcopy.h index a06a8c91a1..8050abc83c 100644 --- a/sysdeps/powerpc/powerpc32/power4/memcopy.h +++ b/sysdeps/powerpc/powerpc32/power4/memcopy.h @@ -1,5 +1,5 @@ /* memcopy.h -- definitions for memory copy functions. Generic C version. - Copyright (C) 1991-2016 Free Software Foundation, Inc. + Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). diff --git a/sysdeps/powerpc/powerpc32/power4/memcpy.S b/sysdeps/powerpc/powerpc32/power4/memcpy.S index b844e10288..44866d6b88 100644 --- a/sysdeps/powerpc/powerpc32/power4/memcpy.S +++ b/sysdeps/powerpc/powerpc32/power4/memcpy.S @@ -1,5 +1,5 @@ /* Optimized memcpy implementation for PowerPC32 on PowerPC64. - Copyright (C) 2003-2016 Free Software Foundation, Inc. + Copyright (C) 2003-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,7 +18,7 @@ #include <sysdep.h> -/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); +/* void * [r3] memcpy (void *dst [r3], void *src [r4], size_t len [r5]); Returns 'dst'. Memcpy handles short copies (< 32-bytes) using a binary move blocks diff --git a/sysdeps/powerpc/powerpc32/power4/memset.S b/sysdeps/powerpc/powerpc32/power4/memset.S index 32866c1aaa..7e8249ed24 100644 --- a/sysdeps/powerpc/powerpc32/power4/memset.S +++ b/sysdeps/powerpc/powerpc32/power4/memset.S @@ -1,5 +1,5 @@ /* Optimized memset implementation for PowerPC64. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,7 +18,7 @@ #include <sysdep.h> -/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5])); +/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5])); Returns 's'. The memset is done in three sizes: byte (8 bits), word (32 bits), diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power6.S b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power6.S index 84c991188c..bdadd8b59b 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power6.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power6.S @@ -1,5 +1,5 @@ /* Optimized bzero implementation for PowerPC32/POWER6. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power7.S index d77f79b52d..30ef633b9c 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-power7.S @@ -1,5 +1,5 @@ /* Optimized bzero implementation for PowerPC32/POWER7. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S index cf54089fe8..1af0a5aa61 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S @@ -1,5 +1,5 @@ /* Optimized bzero implementation for PowerPC32/PPC32. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c index b7304031d5..95a5c8c48f 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c @@ -1,5 +1,5 @@ /* Multiple versions of bzero. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c b/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c index 231a5260d9..3ddc33fa60 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/ifunc-impl-list.c @@ -1,5 +1,5 @@ /* Enumerate available IFUNC implementations of a function. PowerPC32 version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h b/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h index 584e720539..cf906ff227 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h @@ -1,5 +1,5 @@ /* This file is part of the GNU C Library. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -37,6 +37,8 @@ #define INIT_ARCH() \ unsigned long int hwcap = __GLRO(dl_hwcap); \ unsigned long int __attribute__((unused)) hwcap2 = __GLRO(dl_hwcap2); \ + bool __attribute__((unused)) use_cached_memopt = \ + GLRO(dl_powerpc_cpu_features).use_cached_memopt; \ if (hwcap & PPC_FEATURE_ARCH_2_06) \ hwcap |= PPC_FEATURE_ARCH_2_05 | \ PPC_FEATURE_POWER5_PLUS | \ diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memchr-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memchr-power7.S index 42ca27c5d7..e8e5f38199 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memchr-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memchr-power7.S @@ -1,5 +1,5 @@ /* Optimized memchr implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memchr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memchr-ppc32.c index 9861337693..9333b54257 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memchr-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memchr-ppc32.c @@ -1,5 +1,5 @@ /* PowerPC32 default implementation of memchr. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c index 7f3ad5532a..ac3d01ef52 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memchr.c @@ -1,5 +1,5 @@ /* Multiple versions of memchr. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-power7.S index c6af1b5b6d..0fcb0e8a63 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-power7.S @@ -1,5 +1,5 @@ /* Optimized memcmp implementation for POWER7/PowerPC32. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-ppc32.S index b0de61c964..a58c6b88a6 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp-ppc32.S @@ -1,5 +1,5 @@ /* Default memcmp implementation for PowerPC32. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c index c08519c7a1..00e7e7d2a5 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcmp.c @@ -1,5 +1,5 @@ /* Multiple versions of memcmp. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,17 +18,19 @@ /* Define multiple versions only for definition in libc. */ #if IS_IN (libc) +# define memcmp __redirect_memcmp # include <string.h> # include <shlib-compat.h> # include "init-arch.h" extern __typeof (memcmp) __memcmp_ppc attribute_hidden; extern __typeof (memcmp) __memcmp_power7 attribute_hidden; +# undef memcmp /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ -libc_ifunc (memcmp, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __memcmp_power7 - : __memcmp_ppc); +libc_ifunc_redirected (__redirect_memcmp, memcmp, + (hwcap & PPC_FEATURE_HAS_VSX) + ? __memcmp_power7 + : __memcmp_ppc); #endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-a2.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-a2.S index dfcd7a7e83..539e260e30 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-a2.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-a2.S @@ -1,5 +1,5 @@ /* Optimized memcpy implementation for PowerPC A2. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-cell.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-cell.S index 99dde71108..cbf7ff5d55 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-cell.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-cell.S @@ -1,5 +1,5 @@ /* Optimized memcpy implementation for CELL BE PowerPC. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-power6.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-power6.S index 34153aa709..16f05bf4bc 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-power6.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-power6.S @@ -1,5 +1,5 @@ /* Optimized memcpy implementation for PowerPC32 on POWER6. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-power7.S index f8b870cacf..a35b02aa15 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-power7.S @@ -1,5 +1,5 @@ /* Optimized memcpy implementation for PowerPC32/POWER7. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-ppc32.S index 8f9e6f9221..7c11b12cfe 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy-ppc32.S @@ -1,5 +1,5 @@ /* Default memcpy implementation for PowerPC32. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c index f379e479a2..7db588fb76 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memcpy.c @@ -1,5 +1,5 @@ /* Multiple versions of memcpy. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,8 @@ DSO. In static binaries we need memcpy before the initialization happened. */ #if defined SHARED && IS_IN (libc) +# undef memcpy +# define memcpy __redirect_memcpy # include <string.h> # include <shlib-compat.h> # include "init-arch.h" @@ -29,17 +31,18 @@ extern __typeof (memcpy) __memcpy_cell attribute_hidden; extern __typeof (memcpy) __memcpy_power6 attribute_hidden; extern __typeof (memcpy) __memcpy_a2 attribute_hidden; extern __typeof (memcpy) __memcpy_power7 attribute_hidden; +# undef memcpy /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ -libc_ifunc (memcpy, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __memcpy_power7 : - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __memcpy_a2 : - (hwcap & PPC_FEATURE_ARCH_2_05) - ? __memcpy_power6 : - (hwcap & PPC_FEATURE_CELL_BE) - ? __memcpy_cell - : __memcpy_ppc); +libc_ifunc_redirected (__redirect_memcpy, memcpy, + (hwcap & PPC_FEATURE_HAS_VSX) + ? __memcpy_power7 + : (hwcap & PPC_FEATURE_ARCH_2_06) + ? __memcpy_a2 + : (hwcap & PPC_FEATURE_ARCH_2_05) + ? __memcpy_power6 + : (hwcap & PPC_FEATURE_CELL_BE) + ? __memcpy_cell + : __memcpy_ppc); #endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c index ea37481590..1b9d70ec80 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c @@ -1,5 +1,5 @@ /* Power7 multiarch memmove. - Copyright (C) 2014-2016 Free Software Foundation, Inc. + Copyright (C) 2014-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c index aad861d5df..3f300a7db3 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c @@ -1,5 +1,5 @@ /* Power7 multiarch memmove. - Copyright (C) 2014-2016 Free Software Foundation, Inc. + Copyright (C) 2014-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c index 417318461b..3634f3fcfb 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove.c @@ -1,5 +1,5 @@ /* Multiple versions of memmove. PowerPC32 version. - Copyright (C) 2014-2016 Free Software Foundation, Inc. + Copyright (C) 2014-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,16 +19,18 @@ #if defined SHARED && IS_IN (libc) /* Redefine memmove so that the compiler won't complain about the type mismatch with the IFUNC selector in strong_alias, below. */ +# define memmove __redirect_memmove # include <string.h> # include "init-arch.h" extern __typeof (memmove) __memmove_ppc attribute_hidden; extern __typeof (memmove) __memmove_power7 attribute_hidden; +# undef memmove -libc_ifunc (memmove, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __memmove_power7 - : __memmove_ppc); +libc_ifunc_redirected (__redirect_memmove, memmove, + (hwcap & PPC_FEATURE_HAS_VSX) + ? __memmove_power7 + : __memmove_ppc); #else # include <string/memmove.c> #endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy-power7.S index e4200560f4..05f027158b 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy-power7.S @@ -1,5 +1,5 @@ /* Optimized mempcpy implementation for POWER7. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy-ppc32.c index 7e00f34e38..441f7db653 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy-ppc32.c @@ -1,5 +1,5 @@ /* PowerPC32 default implementation of mempcpy. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c b/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c index 3c77b5f1bd..caa77de8c4 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/mempcpy.c @@ -1,5 +1,5 @@ /* Multiple versions of mempcpy. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,23 +17,27 @@ <http://www.gnu.org/licenses/>. */ #if IS_IN (libc) +# define mempcpy __redirect_mempcpy +# define __mempcpy __redirect___mempcpy # define NO_MEMPCPY_STPCPY_REDIRECT +# define __NO_STRING_INLINES # include <string.h> # include <shlib-compat.h> # include "init-arch.h" extern __typeof (__mempcpy) __mempcpy_ppc attribute_hidden; extern __typeof (__mempcpy) __mempcpy_power7 attribute_hidden; +# undef mempcpy +# undef __mempcpy /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ -libc_ifunc (__mempcpy, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __mempcpy_power7 - : __mempcpy_ppc); +libc_ifunc_redirected (__redirect___mempcpy, __mempcpy, + (hwcap & PPC_FEATURE_HAS_VSX) + ? __mempcpy_power7 + : __mempcpy_ppc); weak_alias (__mempcpy, mempcpy) -libc_hidden_def (mempcpy) #else # include <string/mempcpy.c> #endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-power7.S index 1e2cf04d82..faf7e86a9c 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-power7.S @@ -1,5 +1,5 @@ /* Optimized memrchr implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c index d123be8f34..8f9f279c00 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr-ppc32.c @@ -1,5 +1,5 @@ /* PowerPC32 default implementation of memrchr. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c index 7603343947..46e20df350 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c @@ -1,5 +1,5 @@ /* Multiple versions of memrchr. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memset-power6.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memset-power6.S index f54612d599..f1cd354853 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memset-power6.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memset-power6.S @@ -1,5 +1,5 @@ /* Optimized 32-bit memset implementation for POWER6. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memset-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memset-power7.S index ec2b434d65..8c488ee36c 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memset-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memset-power7.S @@ -1,5 +1,5 @@ /* Optimized memset implementation for PowerPC32/POWER7. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memset-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/memset-ppc32.S index 64e1a83134..f2278b48d3 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memset-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memset-ppc32.S @@ -1,5 +1,5 @@ /* Default memset implementation for PowerPC32. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memset.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memset.c index 1d7fc7f2c8..3a2eb17a24 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memset.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memset.c @@ -1,5 +1,5 @@ /* Multiple versions of memset. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ /* Define multiple versions only for definition in libc. */ #if defined SHARED && IS_IN (libc) +# define memset __redirect_memset # include <string.h> # include <shlib-compat.h> # include "init-arch.h" @@ -25,13 +26,14 @@ extern __typeof (memset) __memset_ppc attribute_hidden; extern __typeof (memset) __memset_power6 attribute_hidden; extern __typeof (memset) __memset_power7 attribute_hidden; +# undef memset /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ -libc_ifunc (memset, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __memset_power7 : - (hwcap & PPC_FEATURE_ARCH_2_05) - ? __memset_power6 - : __memset_ppc); +libc_ifunc_redirected (__redirect_memset, memset, + (hwcap & PPC_FEATURE_HAS_VSX) + ? __memset_power7 + : (hwcap & PPC_FEATURE_ARCH_2_05) + ? __memset_power6 + : __memset_ppc); #endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr-power7.S index 733c85b662..494084f061 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr-power7.S @@ -1,5 +1,5 @@ /* Optimized rawrawmemchr implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr-ppc32.c index beb1f2cff0..8ebd039697 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr-ppc32.c @@ -1,5 +1,5 @@ /* PowerPC32 default implementation of rawmemchr. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c index f06030eeeb..14aaf8ea32 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/rawmemchr.c @@ -1,5 +1,5 @@ /* Multiple versions of rawmemchr. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,20 +17,21 @@ <http://www.gnu.org/licenses/>. */ #if IS_IN (libc) +# define __rawmemchr __redirect___rawmemchr # include <string.h> # include <shlib-compat.h> # include "init-arch.h" extern __typeof (__rawmemchr) __rawmemchr_ppc attribute_hidden; extern __typeof (__rawmemchr) __rawmemchr_power7 attribute_hidden; +# undef __rawmemchr /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ -libc_ifunc (__rawmemchr, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __rawmemchr_power7 - : __rawmemchr_ppc); - +libc_ifunc_redirected (__redirect___rawmemchr, __rawmemchr, + (hwcap & PPC_FEATURE_HAS_VSX) + ? __rawmemchr_power7 + : __rawmemchr_ppc); weak_alias (__rawmemchr, rawmemchr) #else #include <string/rawmemchr.c> diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-memcmp.S b/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-memcmp.S index 0b389fa75b..2ffce4b887 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-memcmp.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-memcmp.S @@ -1,5 +1,5 @@ /* Loader memcmp implementation for PowerPC32. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-memset.S b/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-memset.S index e83ac103d8..3db95ad256 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-memset.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-memset.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-strchr.S b/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-strchr.S index b6a8aa034e..bc7eaed61c 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-strchr.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-strchr.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-strnlen.c b/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-strnlen.c index 9f82e2fa81..fd8aed4112 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-strnlen.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/rtld-strnlen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp-power7.S index 101ef57008..18695a078a 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp-power7.S @@ -1,5 +1,5 @@ /* Optimized strcasecmp implementation for PowerPC32. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c index 547660f265..e05975981b 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp.c @@ -1,5 +1,5 @@ /* Multiple versions of strcasecmp. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l-power7.S index e89e66a16c..8d00d285ea 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l-power7.S @@ -1,5 +1,5 @@ /* Default strcasecmp implementation for PowerPC32. - Copyright (C) 2011-2016 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c index 3b1bad516a..3a1a84768e 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strcasecmp_l.c @@ -1,5 +1,5 @@ /* Multiple versions of strcasecmp. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strchr-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strchr-power7.S index f229c96ffe..bfa7a7f121 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strchr-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strchr-power7.S @@ -1,5 +1,5 @@ /* Optimized strchr implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strchr-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strchr-ppc32.S index 5f3f4d9c93..7acf9022bd 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strchr-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strchr-ppc32.S @@ -1,5 +1,5 @@ /* PowerPC32 default implementation of strchr. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c index 2cfde632cb..832914916c 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strchr.c @@ -1,5 +1,5 @@ /* Multiple versions of strchr. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,18 +18,22 @@ /* Define multiple versions only for definition in libc. */ #if defined SHARED && IS_IN (libc) +# define strchr __redirect_strchr +/* Omit the strchr inline definitions because it would redefine strchr. */ +# define __NO_STRING_INLINES # include <string.h> # include <shlib-compat.h> # include "init-arch.h" extern __typeof (strchr) __strchr_ppc attribute_hidden; extern __typeof (strchr) __strchr_power7 attribute_hidden; +# undef strchr /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ -libc_ifunc (strchr, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __strchr_power7 - : __strchr_ppc); +libc_ifunc_redirected (__redirect_strchr, strchr, + (hwcap & PPC_FEATURE_HAS_VSX) + ? __strchr_power7 + : __strchr_ppc); weak_alias (strchr, index) #endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul-power7.S index ac5eca2086..5851294e5e 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul-power7.S @@ -1,5 +1,5 @@ /* Optimized strchrnul implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul-ppc32.c index fa5ba605f8..7ae631f4ee 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul-ppc32.c @@ -1,5 +1,5 @@ /* PowerPC32 default implementation of strchrnul. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c index 682aa0fef7..527160f7eb 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c @@ -1,5 +1,5 @@ /* Multiple versions of strchrnul. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strlen-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strlen-power7.S index f2925e0245..d7b0dfa62e 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strlen-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strlen-power7.S @@ -1,5 +1,5 @@ /* Optimized strlen implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strlen-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strlen-ppc32.S index 4ca5beefba..99de9ca41f 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strlen-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strlen-ppc32.S @@ -1,5 +1,5 @@ /* Default strlen implementation for PowerPC32. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c index af5921a15a..3ce050b8f2 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strlen.c @@ -1,5 +1,5 @@ /* Multiple versions of strlen. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,15 +17,17 @@ <http://www.gnu.org/licenses/>. */ #if defined SHARED && IS_IN (libc) +# define strlen __redirect_strlen # include <string.h> # include <shlib-compat.h> # include "init-arch.h" extern __typeof (strlen) __strlen_ppc attribute_hidden; extern __typeof (strlen) __strlen_power7 attribute_hidden; +# undef strlen -libc_ifunc (strlen, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __strlen_power7 - : __strlen_ppc); +libc_ifunc_redirected (__redirect_strlen, strlen, + (hwcap & PPC_FEATURE_HAS_VSX) + ? __strlen_power7 + : __strlen_ppc); #endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase-power7.c index 26bc96bfdf..d29fb55eef 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase-power7.c @@ -1,5 +1,5 @@ /* Optimized strcasecmp_l implememtation for POWER7. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c index f7a97b2cf6..a286a7b92e 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase.c @@ -1,5 +1,5 @@ /* Multiple versions of strncasecmp. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l-power7.c index 1ef1fa13e1..5540a443a0 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l-power7.c @@ -1,5 +1,5 @@ /* Optimized strcasecmp_l implememtation for POWER7. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c index 072698a86d..21ce9ec13d 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strncase_l.c @@ -1,5 +1,5 @@ /* Multiple versions of strncasecmp_l. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-power7.S index 7f0f38ceb6..f1df407361 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-power7.S @@ -1,5 +1,5 @@ /* Optimized strcmp implementation for POWER7/PowerPC32. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-ppc32.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-ppc32.S index 8747c0aa22..59dd36daee 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-ppc32.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp-ppc32.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c index 7cc7628091..cb1cbe72fe 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strncmp.c @@ -1,5 +1,5 @@ /* Multiple versions of strncmp. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,9 @@ /* Define multiple versions only for definition in libc. */ #if defined SHARED && IS_IN (libc) +# define strncmp __redirect_strncmp +/* Omit the strncmp inline definitions because it would redefine strncmp. */ +# define __NO_STRING_INLINES # include <string.h> # include <shlib-compat.h> # include "init-arch.h" @@ -25,11 +28,12 @@ extern __typeof (strncmp) __strncmp_ppc attribute_hidden; extern __typeof (strncmp) __strncmp_power4 attribute_hidden; extern __typeof (strncmp) __strncmp_power7 attribute_hidden; +# undef strncmp /* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle ifunc symbol properly. */ -libc_ifunc (strncmp, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __strncmp_power7 - : __strncmp_ppc); +libc_ifunc_redirected (__redirect_strncmp, strncmp, + (hwcap & PPC_FEATURE_HAS_VSX) + ? __strncmp_power7 + : __strncmp_ppc); #endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen-power7.S b/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen-power7.S index 3251adcefb..d5137f619c 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen-power7.S +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen-power7.S @@ -1,5 +1,5 @@ /* Optimized strnlen implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen-ppc32.c index 7cedb7f804..df940d333f 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen-ppc32.c @@ -1,5 +1,5 @@ /* Default strnlen implementation for PowerPC32. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c index 8f1e7c9e54..d056b74305 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strnlen.c @@ -1,5 +1,5 @@ /* Multiple versions of strnlen. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,17 +17,20 @@ <http://www.gnu.org/licenses/>. */ #if IS_IN (libc) +# define strnlen __redirect_strnlen +# define __strnlen __redirect___strnlen # include <string.h> # include <shlib-compat.h> # include "init-arch.h" extern __typeof (__strnlen) __strnlen_ppc attribute_hidden; extern __typeof (__strnlen) __strnlen_power7 attribute_hidden; +# undef strnlen +# undef __strnlen -libc_ifunc (__strnlen, - (hwcap & PPC_FEATURE_HAS_VSX) - ? __strnlen_power7 - : __strnlen_ppc); +libc_ifunc_redirected (__redirect___strnlen, __strnlen, + (hwcap & PPC_FEATURE_HAS_VSX) + ? __strnlen_power7 + : __strnlen_ppc); weak_alias (__strnlen, strnlen) -libc_hidden_def (strnlen) #endif diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power6.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power6.c index 9db91ae14f..dacc8af2b7 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power6.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power6.c @@ -1,5 +1,5 @@ /* wcschr.c - Wide Character Search for powerpc32/power6. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power7.c index 1a97d88e5b..2c284076f9 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-power7.c @@ -1,5 +1,5 @@ /* wcschr.c - Wide Character Search for powerpc32/power7. - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c index c159c2ead5..340d4f1473 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr-ppc32.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c index add1fa1c52..97d55dc11c 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcschr.c @@ -1,5 +1,5 @@ /* Multiple versions of wcschr - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power6.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power6.c index 2304f9e7dd..9f0ae48363 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power6.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power6.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power7.c index 8e0fc288a5..c4d6da5539 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-power7.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c index 62b15b7db5..b5d27ac7db 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy-ppc32.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c index 4392cb285d..85bb8da3c2 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcscpy.c @@ -1,5 +1,5 @@ /* Multiple versions of wcscpy - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c index a959771abd..230279368c 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power6.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c index fb677efaed..f6f79b8c56 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-power7.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c index 4fa56f7546..86d1efeee0 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr-ppc32.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c index bb6ef643c9..b0a82bb365 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wcsrchr.c @@ -1,5 +1,5 @@ /* Multiple versions of wcsrchr - Copyright (C) 2013-2016 Free Software Foundation, Inc. + Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-power7.c index 953f9b65b0..6d65ce6fe4 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-power7.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-power7.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-ppc32.c b/sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-ppc32.c index 6bc79428aa..f409a34612 100644 --- a/sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-ppc32.c +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-ppc32.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Copyright (C) 2013-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/strncmp.S b/sysdeps/powerpc/powerpc32/power4/strncmp.S index 75b37c7c04..ac806744eb 100644 --- a/sysdeps/powerpc/powerpc32/power4/strncmp.S +++ b/sysdeps/powerpc/powerpc32/power4/strncmp.S @@ -1,5 +1,5 @@ /* Optimized strcmp implementation for PowerPC32. - Copyright (C) 2003-2016 Free Software Foundation, Inc. + Copyright (C) 2003-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S index f61c86f00d..356c7a79ed 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S @@ -1,5 +1,5 @@ /* ceil function. PowerPC32/power5+ version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-double.h> .machine "power5" EALIGN (__ceil, 4, 0) @@ -25,12 +26,4 @@ EALIGN (__ceil, 4, 0) blr END (__ceil) -weak_alias (__ceil, ceil) - -#ifdef NO_LONG_DOUBLE -weak_alias (__ceil, ceill) -strong_alias (__ceil, __ceill) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __ceil, ceill, GLIBC_2_0) -#endif +libm_alias_double (__ceil, ceil) diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S index 9febe2fe35..a0bcda17fd 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S @@ -1,5 +1,5 @@ /* ceilf function. PowerPC32/power5+ version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <libm-alias-float.h> .machine "power5" EALIGN (__ceilf, 4, 0) @@ -25,5 +26,5 @@ EALIGN (__ceilf, 4, 0) blr END (__ceilf) -weak_alias (__ceilf, ceilf) +libm_alias_float (__ceil, ceil) diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S index 03547f496c..e8a15f6c09 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_floor.S @@ -1,5 +1,5 @@ /* floor function. PowerPC32/power5+ version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-double.h> .machine "power5" EALIGN (__floor, 4, 0) @@ -25,12 +26,4 @@ EALIGN (__floor, 4, 0) blr END (__floor) -weak_alias (__floor, floor) - -#ifdef NO_LONG_DOUBLE -weak_alias (__floor, floorl) -strong_alias (__floor, __floorl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __floor, floorl, GLIBC_2_0) -#endif +libm_alias_double (__floor, floor) diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_floorf.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_floorf.S index 4932f571bd..385c40cdef 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_floorf.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_floorf.S @@ -1,5 +1,5 @@ /* floorf function. PowerPC32/power5+ version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <libm-alias-float.h> .machine "power5" EALIGN (__floorf, 4, 0) @@ -25,5 +26,5 @@ EALIGN (__floorf, 4, 0) blr END (__floorf) -weak_alias (__floorf, floorf) +libm_alias_float (__floor, floor) diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S index e33476ed0f..c70c0bd70b 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S @@ -1,5 +1,5 @@ /* lround function. POWER5+, PowerPC32 version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,8 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-float.h> +#include <libm-alias-double.h> /* long [r3] llround (float x [fp1]) IEEE 1003.1 lround function. IEEE specifies "round to the nearest @@ -45,15 +47,7 @@ ENTRY (__llround) blr END (__llround) -weak_alias (__llround, llround) +libm_alias_double (__llround, llround) strong_alias (__llround, __llroundf) -weak_alias (__llround, llroundf) - -#ifdef NO_LONG_DOUBLE -weak_alias (__llround, llroundl) -strong_alias (__llround, __llroundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __llround, llroundl, GLIBC_2_1) -#endif +libm_alias_float (__llround, llround) diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S index d86c3807a8..09fa022e9e 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S @@ -1,5 +1,5 @@ /* lround function. POWER5+, PowerPC32 version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,8 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-float.h> +#include <libm-alias-double.h> /* long [r3] lround (float x [fp1]) IEEE 1003.1 lround function. IEEE specifies "round to the nearest @@ -43,15 +45,7 @@ ENTRY (__lround) blr END (__lround) -weak_alias (__lround, lround) +libm_alias_double (__lround, lround) strong_alias (__lround, __lroundf) -weak_alias (__lround, lroundf) - -#ifdef NO_LONG_DOUBLE -weak_alias (__lround, lroundl) -strong_alias (__lround, __lroundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __lround, lroundl, GLIBC_2_1) -#endif +libm_alias_float (__lround, lround) diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S index 2c107b145b..36c9bd3bee 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_round.S @@ -1,5 +1,5 @@ /* round function. PowerPC32/power5+ version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-double.h> .machine "power5" EALIGN (__round, 4, 0) @@ -25,12 +26,4 @@ EALIGN (__round, 4, 0) blr END (__round) -weak_alias (__round, round) - -#ifdef NO_LONG_DOUBLE -weak_alias (__round, roundl) -strong_alias (__round, __roundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __round, roundl, GLIBC_2_1) -#endif +libm_alias_double (__round, round) diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_roundf.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_roundf.S index 94754a569e..c720e77136 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_roundf.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_roundf.S @@ -1,5 +1,5 @@ /* roundf function. PowerPC32/power5+ version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <libm-alias-float.h> .machine "power5" EALIGN (__roundf, 4, 0) @@ -25,5 +26,5 @@ EALIGN (__roundf, 4, 0) blr END (__roundf) -weak_alias (__roundf, roundf) +libm_alias_float (__round, round) diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S index f77004cbf5..14007e9632 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_trunc.S @@ -1,5 +1,5 @@ /* trunc function. PowerPC32/power5+ version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-double.h> .machine "power5" EALIGN (__trunc, 4, 0) @@ -25,12 +26,4 @@ EALIGN (__trunc, 4, 0) blr END (__trunc) -weak_alias (__trunc, trunc) - -#ifdef NO_LONG_DOUBLE -weak_alias (__trunc, truncl) -strong_alias (__trunc, __truncl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __trunc, truncl, GLIBC_2_1) -#endif +libm_alias_double (__trunc, trunc) diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_truncf.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_truncf.S index 1028b7d4d9..092bae7a2d 100644 --- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_truncf.S +++ b/sysdeps/powerpc/powerpc32/power5+/fpu/s_truncf.S @@ -1,5 +1,5 @@ /* truncf function. PowerPC32/power5+ version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <libm-alias-float.h> .machine "power5" EALIGN (__truncf, 4, 0) @@ -25,5 +26,5 @@ EALIGN (__truncf, 4, 0) blr END (__truncf) -weak_alias (__truncf, truncf) +libm_alias_float (__trunc, trunc) diff --git a/sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S b/sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S index 1f7306ec77..f159454e0d 100644 --- a/sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S +++ b/sysdeps/powerpc/powerpc32/power5/fpu/s_isnan.S @@ -1,5 +1,5 @@ /* isnan(). PowerPC32 version. - Copyright (C) 2008-2016 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power5/fpu/s_isnanf.S b/sysdeps/powerpc/powerpc32/power5/fpu/s_isnanf.S index 36627a7663..c45e4563da 100644 --- a/sysdeps/powerpc/powerpc32/power5/fpu/s_isnanf.S +++ b/sysdeps/powerpc/powerpc32/power5/fpu/s_isnanf.S @@ -1,5 +1,5 @@ /* isnan(). PowerPC32 version. - Copyright (C) 2008-2016 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S b/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S deleted file mode 100644 index 1ee8a44df3..0000000000 --- a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S +++ /dev/null @@ -1,107 +0,0 @@ -/* sqrt function. PowerPC32 version. - Copyright (C) 2007-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> -#include <math_ldbl_opt.h> - -/* double [fp1] sqrt (double x [fp1]) - Power4 (ISA V2.0) and above implement sqrt in hardware (not optional). - The fsqrt instruction generates the correct value for all inputs and - sets the appropriate floating point exceptions. Extended checking is - only needed to set errno (via __kernel_standard) if the input value - is negative. - - So compare the input value against the absolute value of itself. - This will compare equal unless the value is negative (EDOM) or a NAN, - in which case we branch to the extend wrapper. If equal we can return - the result directly. - - This part of the function looks like a leaf routine, so no need to - stack a frame or execute prologue/epilogue code. It is safe to - branch directly to w_sqrt as long as the input value (f1) is - preserved. Putting the sqrt result into f2 (float parameter 2) - allows passing both the input value and sqrt result into the extended - wrapper so there is no need to recompute. - - This tactic avoids the overhead of stacking a frame for the normal - (non-error) case. Until gcc supports prologue shrink-wrapping - this is the best we can do. */ - - .section ".text" - .machine power4 -EALIGN (__sqrt, 5, 0) - fabs fp0,fp1 - fsqrt fp2,fp1 - fcmpu cr1,fp0,fp1 - bne- cr1,.Lw_sqrt - fmr fp1,fp2 - blr - .align 4 -.Lw_sqrt: - mflr r0 - stwu r1,-16(r1) - cfi_adjust_cfa_offset(16) - fmr fp12,fp2 - stw r0,20(r1) - stw r30,8(r1) - cfi_offset(lr,20-16) - cfi_offset(r30,8-16) -#ifdef SHARED - SETUP_GOT_ACCESS(r30,got_label) - addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha - addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l - lwz r9,_LIB_VERSION@got(30) - lwz r0,0(r9) -#else - lis r9,_LIB_VERSION@ha - lwz r0,_LIB_VERSION@l(r9) -#endif -/* if (_LIB_VERSION == _IEEE_) return z; */ - cmpwi cr7,r0,-1 - beq- cr7,.L4 -/* if (x != x) return z; !isnan*/ - fcmpu cr7,fp1,fp1 - bne- cr7,.L4 -/* if (x < 0.0) - return __kernel_standard (x, x, 26) */ - fmr fp2,fp1 - li r3,26 - bne- cr1,.L11 -.L4: - lwz r0,20(r1) - fmr fp1,fp12 - lwz r30,8(r1) - addi r1,r1,16 - mtlr r0 - blr -.L11: - bl __kernel_standard@plt - fmr fp12,fp1 - b .L4 - END (__sqrt) - -weak_alias (__sqrt, sqrt) - -#ifdef NO_LONG_DOUBLE -weak_alias (__sqrt, sqrtl) -strong_alias (__sqrt, __sqrtl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0) -#endif - diff --git a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S b/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S deleted file mode 100644 index 998434c96f..0000000000 --- a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S +++ /dev/null @@ -1,99 +0,0 @@ -/* sqrtf function. PowerPC32 version. - Copyright (C) 2007-2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> -#include <math_ldbl_opt.h> - -/* float [fp1] sqrts (float x [fp1]) - Power4 (ISA V2.0) and above implement sqrt in hardware (not optional). - The fsqrts instruction generates the correct value for all inputs and - sets the appropriate floating point exceptions. Extended checking is - only needed to set errno (via __kernel_standard) if the input value - is negative. - - So compare the input value against the absolute value of itself. - This will compare equal unless the value is negative (EDOM) or a NAN, - in which case we branch to the extend wrapper. If equal we can return - the result directly. - - This part of the function looks like a leaf routine, so no need to - stack a frame or execute prologue/epilogue code. It is safe to - branch directly to w_sqrt as long as the input value (f1) is - preserved. Putting the sqrt result into f2 (float parameter 2) - allows passing both the input value and sqrt result into the extended - wrapper so there is no need to recompute. - - This tactic avoids the overhead of stacking a frame for the normal - (non-error) case. Until gcc supports prologue shrink-wrapping - this is the best we can do. */ - - .section ".text" - .machine power4 -EALIGN (__sqrtf, 5, 0) - fabs fp0,fp1 - fsqrts fp2,fp1 - fcmpu cr1,fp0,fp1 - bne- cr1,.Lw_sqrtf - fmr fp1,fp2 - blr - .align 4 -.Lw_sqrtf: - mflr r0 - stwu r1,-16(r1) - cfi_adjust_cfa_offset(16) - fmr fp12,fp2 - stw r0,20(r1) - stw r30,8(r1) - cfi_offset(lr,20-16) - cfi_offset(r30,8-16) -#ifdef SHARED - SETUP_GOT_ACCESS(r30,got_label) - addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha - addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l - lwz r9,_LIB_VERSION@got(30) - lwz r0,0(r9) -#else - lis r9,_LIB_VERSION@ha - lwz r0,_LIB_VERSION@l(r9) -#endif -/* if (_LIB_VERSION == _IEEE_) return z; */ - cmpwi cr7,r0,-1 - beq- cr7,.L4 -/* if (x != x, 0) return z; !isnan */ - fcmpu cr7,fp1,fp1 - bne- cr7,.L4 -/* if (x < 0.0) - return __kernel_standard (x, x, 126) */ - fmr fp2,fp1 - li r3,126 - bne- cr1,.L11 -.L4: - lwz r0,20(r1) - fmr fp1,fp12 - lwz r30,8(r1) - addi r1,r1,16 - mtlr r0 - blr -.L11: - bl __kernel_standard@plt - fmr fp12,fp1 - b .L4 - END (__sqrtf) - -weak_alias (__sqrtf, sqrtf) - diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S index caf768fd1b..6069b29644 100644 --- a/sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S +++ b/sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S @@ -1,5 +1,5 @@ /* copysign(). PowerPC32/POWER6 version. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. @@ -19,6 +19,8 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-float.h> +#include <libm-alias-double.h> /* double [f1] copysign (double [f1] x, double [f2] y); copysign(x,y) returns a value with the magnitude of x and @@ -34,25 +36,14 @@ EALIGN (__copysign, 4, 0) END (__copysign) hidden_def (__copysign) -weak_alias (__copysign, copysign) +libm_alias_double (__copysign, copysign) /* It turns out that the 'double' version will also always work for single-precision. */ strong_alias (__copysign, __copysignf) hidden_def (__copysignf) -weak_alias (__copysignf, copysignf) +libm_alias_float (__copysign, copysign) -#ifdef NO_LONG_DOUBLE -strong_alias (__copysign, __copysignl) -weak_alias (__copysign, copysignl) -#endif - -#if IS_IN (libm) -# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0) -compat_symbol (libm, copysign, copysignl, GLIBC_2_0) -# endif -#else -# if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) +#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) compat_symbol (libc, copysign, copysignl, GLIBC_2_0); -# endif #endif diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S index a01f6574ad..cecc7c8509 100644 --- a/sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S +++ b/sysdeps/powerpc/powerpc32/power6/fpu/s_isnan.S @@ -1,5 +1,5 @@ /* isnan(). PowerPC32 version. - Copyright (C) 2008-2016 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_isnanf.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_isnanf.S index 8fa8ec1019..8faac974fd 100644 --- a/sysdeps/powerpc/powerpc32/power6/fpu/s_isnanf.S +++ b/sysdeps/powerpc/powerpc32/power6/fpu/s_isnanf.S @@ -1,5 +1,5 @@ /* isnanf(). PowerPC32 version. - Copyright (C) 2008-2016 Free Software Foundation, Inc. + Copyright (C) 2008-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S index 04d2c96ec5..4ec398fa99 100644 --- a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S +++ b/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S @@ -1,5 +1,5 @@ /* Round double to long int. PowerPC32 on PowerPC64 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-double.h> /* long long int[r3, r4] __llrint (double x[fp1]) */ ENTRY (__llrint) @@ -35,12 +36,4 @@ ENTRY (__llrint) blr END (__llrint) -weak_alias (__llrint, llrint) - -#ifdef NO_LONG_DOUBLE -strong_alias (__llrint, __llrintl) -weak_alias (__llrint, llrintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __llrint, llrintl, GLIBC_2_1) -#endif +libm_alias_double (__llrint, llrint) diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S index 50fe46a4a2..bb6b6bc3a2 100644 --- a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S +++ b/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S @@ -1,5 +1,5 @@ /* Round float to long int. PowerPC32 on PowerPC64 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <libm-alias-float.h> /* long long int[r3, r4] __llrintf (float x[fp1]) */ ENTRY (__llrintf) @@ -34,5 +35,5 @@ ENTRY (__llrintf) blr END (__llrintf) -weak_alias (__llrintf, llrintf) +libm_alias_float (__llrint, llrint) diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S index ece4765d83..fc22a557ad 100644 --- a/sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S +++ b/sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S @@ -1,5 +1,5 @@ /* lround function. POWER5+, PowerPC32 version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,8 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-float.h> +#include <libm-alias-double.h> /* long [r3] llround (float x [fp1]) IEEE 1003.1 lround function. IEEE specifies "round to the nearest @@ -45,15 +47,7 @@ ENTRY (__llround) blr END (__llround) -weak_alias (__llround, llround) +libm_alias_double (__llround, llround) strong_alias (__llround, __llroundf) -weak_alias (__llround, llroundf) - -#ifdef NO_LONG_DOUBLE -weak_alias (__llround, llroundl) -strong_alias (__llround, __llroundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __llround, llroundl, GLIBC_2_1) -#endif +libm_alias_float (__llround, llround) diff --git a/sysdeps/powerpc/powerpc32/power6/memcpy.S b/sysdeps/powerpc/powerpc32/power6/memcpy.S index 6dff0ed6df..3ca26a2344 100644 --- a/sysdeps/powerpc/powerpc32/power6/memcpy.S +++ b/sysdeps/powerpc/powerpc32/power6/memcpy.S @@ -1,5 +1,5 @@ /* Optimized memcpy implementation for PowerPC32 on POWER6. - Copyright (C) 2003-2016 Free Software Foundation, Inc. + Copyright (C) 2003-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,7 +18,7 @@ #include <sysdep.h> -/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); +/* void * [r3] memcpy (void *dst [r3], void *src [r4], size_t len [r5]); Returns 'dst'. Memcpy handles short copies (< 32-bytes) using a binary move blocks @@ -46,8 +46,8 @@ EALIGN (memcpy, 5, 0) ble- cr1,L(word_unaligned_short) /* If move < 32 bytes. */ cmplw cr6,10,11 stw 31,24(1) - cfi_offset(31,(24-32)) stw 30,20(1) + cfi_offset(31,(24-32)) cfi_offset(30,(20-32)) mr 30,3 beq .L0 diff --git a/sysdeps/powerpc/powerpc32/power6/memset.S b/sysdeps/powerpc/powerpc32/power6/memset.S index b2a222edd2..8f5e862199 100644 --- a/sysdeps/powerpc/powerpc32/power6/memset.S +++ b/sysdeps/powerpc/powerpc32/power6/memset.S @@ -1,5 +1,5 @@ /* Optimized 32-bit memset implementation for POWER6. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,7 +18,7 @@ #include <sysdep.h> -/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5])); +/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5])); Returns 's'. The memset is done in three sizes: byte (8 bits), word (32 bits), @@ -394,7 +394,7 @@ L(cacheAlignedx): /* A simple loop for the longer (>640 bytes) lengths. This form limits the branch miss-predicted to exactly 1 at loop exit.*/ L(cacheAligned512): - cmpli cr1,rLEN,128 + cmplwi cr1,rLEN,128 blt cr1,L(cacheAligned1) dcbz 0,rMEMP addi rLEN,rLEN,-128 diff --git a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S b/sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S index 8e18f5c3f8..ad4a010425 100644 --- a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S +++ b/sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S @@ -1,5 +1,5 @@ /* Round double to long int. POWER6x PowerPC32 version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,8 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-float.h> +#include <libm-alias-double.h> .machine "power6" /* long int[r3] __lrint (double x[fp1]) */ @@ -27,15 +29,7 @@ ENTRY (__lrint) blr END (__lrint) -weak_alias (__lrint, lrint) +libm_alias_double (__lrint, lrint) strong_alias (__lrint, __lrintf) -weak_alias (__lrint, lrintf) - -#ifdef NO_LONG_DOUBLE -strong_alias (__lrint, __lrintl) -weak_alias (__lrint, lrintl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __lrint, lrintl, GLIBC_2_1) -#endif +libm_alias_float (__lrint, lrint) diff --git a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S b/sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S index e7deaee776..5131d11e17 100644 --- a/sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S +++ b/sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S @@ -1,5 +1,5 @@ /* lround function. POWER6x, PowerPC32 version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,8 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-float.h> +#include <libm-alias-double.h> /* long [r3] lround (float x [fp1]) IEEE 1003.1 lround function. IEEE specifies "round to the nearest @@ -37,15 +39,7 @@ ENTRY (__lround) blr END (__lround) -weak_alias (__lround, lround) +libm_alias_double (__lround, lround) strong_alias (__lround, __lroundf) -weak_alias (__lround, lroundf) - -#ifdef NO_LONG_DOUBLE -weak_alias (__lround, lroundl) -strong_alias (__lround, __lroundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __lround, lroundl, GLIBC_2_1) -#endif +libm_alias_float (__lround, lround) diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S b/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S index b0dfed49d8..793cf0da94 100644 --- a/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S +++ b/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S @@ -1,5 +1,5 @@ /* finite(). PowerPC32/POWER7 version. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S b/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S index 76ed3346cb..400fec7fdc 100644 --- a/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S +++ b/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S @@ -1,5 +1,5 @@ /* isinf(). PowerPC32/POWER7 version. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S b/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S index 873e0d60fe..b8bb0e667e 100644 --- a/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S +++ b/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S @@ -1,5 +1,5 @@ /* isnan(). PowerPC32/POWER7 version. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power7/memchr.S b/sysdeps/powerpc/powerpc32/power7/memchr.S index 318168b4cf..ec78709c35 100644 --- a/sysdeps/powerpc/powerpc32/power7/memchr.S +++ b/sysdeps/powerpc/powerpc32/power7/memchr.S @@ -1,5 +1,5 @@ /* Optimized memchr implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. @@ -26,7 +26,16 @@ ENTRY (__memchr) dcbt 0,r3 clrrwi r8,r3,2 insrwi r4,r4,8,16 /* Replicate byte to word. */ - add r7,r3,r5 /* Calculate the last acceptable address. */ + + /* Calculate the last acceptable address and check for possible + addition overflow by using satured math: + r7 = r3 + r5 + r7 |= -(r7 < x) */ + add r7,r3,r5 + subfc r6,r3,r7 + subfe r9,r9,r9 + or r7,r7,r9 + insrwi r4,r4,16,0 cmplwi r5,16 li r9, -1 diff --git a/sysdeps/powerpc/powerpc32/power7/memcmp.S b/sysdeps/powerpc/powerpc32/power7/memcmp.S index 9c06a89491..8c1a00d635 100644 --- a/sysdeps/powerpc/powerpc32/power7/memcmp.S +++ b/sysdeps/powerpc/powerpc32/power7/memcmp.S @@ -1,5 +1,5 @@ /* Optimized memcmp implementation for POWER7/PowerPC32. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -54,8 +54,8 @@ EALIGN (memcmp, 4, 0) stwu 1, -64(r1) cfi_adjust_cfa_offset(64) stw rWORD8, 48(r1) - cfi_offset(rWORD8, (48-64)) stw rWORD7, 44(r1) + cfi_offset(rWORD8, (48-64)) cfi_offset(rWORD7, (44-64)) bne L(unaligned) /* At this point we know both strings have the same alignment and the @@ -747,18 +747,18 @@ L(unaligned): the actual start of rSTR2. */ clrrwi rSTR2, rSTR2, 2 stw rWORD2_SHIFT, 28(r1) - cfi_offset(rWORD2_SHIFT, (28-64)) /* Compute the left/right shift counts for the unaligned rSTR2, compensating for the logical (W aligned) start of rSTR1. */ clrlwi rSHL, rWORD8_SHIFT, 30 clrrwi rSTR1, rSTR1, 2 stw rWORD4_SHIFT, 24(r1) - cfi_offset(rWORD4_SHIFT, (24-64)) slwi rSHL, rSHL, 3 cmplw cr5, rWORD8_SHIFT, rSTR2 add rN, rN, r12 slwi rWORD6, r12, 3 stw rWORD6_SHIFT, 20(r1) + cfi_offset(rWORD2_SHIFT, (28-64)) + cfi_offset(rWORD4_SHIFT, (24-64)) cfi_offset(rWORD6_SHIFT, (20-64)) subfic rSHR, rSHL, 32 srwi r0, rN, 4 /* Divide by 16 */ @@ -852,15 +852,15 @@ L(duPs4): .align 4 L(Wunaligned): stw rWORD8_SHIFT, 32(r1) - cfi_offset(rWORD8_SHIFT, (32-64)) clrrwi rSTR2, rSTR2, 2 stw rWORD2_SHIFT, 28(r1) - cfi_offset(rWORD2_SHIFT, (28-64)) srwi r0, rN, 4 /* Divide by 16 */ stw rWORD4_SHIFT, 24(r1) - cfi_offset(rWORD4_SHIFT, (24-64)) andi. r12, rN, 12 /* Get the W remainder */ stw rWORD6_SHIFT, 20(r1) + cfi_offset(rWORD8_SHIFT, (32-64)) + cfi_offset(rWORD2_SHIFT, (28-64)) + cfi_offset(rWORD4_SHIFT, (24-64)) cfi_offset(rWORD6_SHIFT, (20-64)) slwi rSHL, rSHL, 3 #ifdef __LITTLE_ENDIAN__ diff --git a/sysdeps/powerpc/powerpc32/power7/memcpy.S b/sysdeps/powerpc/powerpc32/power7/memcpy.S index 2bc7ee268e..76b1c53c43 100644 --- a/sysdeps/powerpc/powerpc32/power7/memcpy.S +++ b/sysdeps/powerpc/powerpc32/power7/memcpy.S @@ -1,5 +1,5 @@ /* Optimized memcpy implementation for PowerPC32/POWER7. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. @@ -19,7 +19,7 @@ #include <sysdep.h> -/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); +/* void * [r3] memcpy (void *dst [r3], void *src [r4], size_t len [r5]); Returns 'dst'. */ .machine power7 diff --git a/sysdeps/powerpc/powerpc32/power7/mempcpy.S b/sysdeps/powerpc/powerpc32/power7/mempcpy.S index f4041f3278..1a3f4ebea1 100644 --- a/sysdeps/powerpc/powerpc32/power7/mempcpy.S +++ b/sysdeps/powerpc/powerpc32/power7/mempcpy.S @@ -1,5 +1,5 @@ /* Optimized mempcpy implementation for POWER7. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. @@ -19,7 +19,7 @@ #include <sysdep.h> -/* __ptr_t [r3] __mempcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]); +/* void * [r3] __mempcpy (void *dst [r3], void *src [r4], size_t len [r5]); Returns 'dst' + 'len'. */ .machine power7 diff --git a/sysdeps/powerpc/powerpc32/power7/memrchr.S b/sysdeps/powerpc/powerpc32/power7/memrchr.S index 831bded075..aedae95914 100644 --- a/sysdeps/powerpc/powerpc32/power7/memrchr.S +++ b/sysdeps/powerpc/powerpc32/power7/memrchr.S @@ -1,5 +1,5 @@ /* Optimized memrchr implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power7/memset.S b/sysdeps/powerpc/powerpc32/power7/memset.S index 9cee5f1677..26fa736ab2 100644 --- a/sysdeps/powerpc/powerpc32/power7/memset.S +++ b/sysdeps/powerpc/powerpc32/power7/memset.S @@ -1,5 +1,5 @@ /* Optimized memset implementation for PowerPC32/POWER7. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. @@ -19,7 +19,7 @@ #include <sysdep.h> -/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5])); +/* void * [r3] memset (void *s [r3], int c [r4], size_t n [r5])); Returns 's'. */ .machine power7 diff --git a/sysdeps/powerpc/powerpc32/power7/rawmemchr.S b/sysdeps/powerpc/powerpc32/power7/rawmemchr.S index 264ff00854..a886e13c90 100644 --- a/sysdeps/powerpc/powerpc32/power7/rawmemchr.S +++ b/sysdeps/powerpc/powerpc32/power7/rawmemchr.S @@ -1,5 +1,5 @@ /* Optimized rawmemchr implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power7/strcasecmp.S b/sysdeps/powerpc/powerpc32/power7/strcasecmp.S index 9a414ac0f0..7bd8b43166 100644 --- a/sysdeps/powerpc/powerpc32/power7/strcasecmp.S +++ b/sysdeps/powerpc/powerpc32/power7/strcasecmp.S @@ -1,5 +1,5 @@ /* Optimized strcasecmp implementation for PowerPC32. - Copyright (C) 2011-2016 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ or if defined USE_IN_EXTENDED_LOCALE_MODEL: int [r3] strcasecmp_l (const char *s1 [r3], const char *s2 [r4], - __locale_t loc [r5]) */ + locale_t loc [r5]) */ #ifndef STRCMP # define __STRCMP __strcasecmp diff --git a/sysdeps/powerpc/powerpc32/power7/strchr.S b/sysdeps/powerpc/powerpc32/power7/strchr.S index fa09e144a7..54bb4ad502 100644 --- a/sysdeps/powerpc/powerpc32/power7/strchr.S +++ b/sysdeps/powerpc/powerpc32/power7/strchr.S @@ -1,5 +1,5 @@ /* Optimized strchr implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power7/strchrnul.S b/sysdeps/powerpc/powerpc32/power7/strchrnul.S index a9b785b04f..634bf56e62 100644 --- a/sysdeps/powerpc/powerpc32/power7/strchrnul.S +++ b/sysdeps/powerpc/powerpc32/power7/strchrnul.S @@ -1,5 +1,5 @@ /* Optimized strchrnul implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power7/strlen.S b/sysdeps/powerpc/powerpc32/power7/strlen.S index ecc1c8e105..f7d1ebb8d4 100644 --- a/sysdeps/powerpc/powerpc32/power7/strlen.S +++ b/sysdeps/powerpc/powerpc32/power7/strlen.S @@ -1,5 +1,5 @@ /* Optimized strlen implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power7/strncmp.S b/sysdeps/powerpc/powerpc32/power7/strncmp.S index 0e96c6d74e..9fe8e419ae 100644 --- a/sysdeps/powerpc/powerpc32/power7/strncmp.S +++ b/sysdeps/powerpc/powerpc32/power7/strncmp.S @@ -1,5 +1,5 @@ /* Optimized strcmp implementation for POWER7/PowerPC32. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power7/strnlen.S b/sysdeps/powerpc/powerpc32/power7/strnlen.S index 00d80dd330..2f28acc99a 100644 --- a/sysdeps/powerpc/powerpc32/power7/strnlen.S +++ b/sysdeps/powerpc/powerpc32/power7/strnlen.S @@ -1,5 +1,5 @@ /* Optimized strnlen implementation for PowerPC32/POWER7 using cmpb insn. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2018 Free Software Foundation, Inc. Contributed by Luis Machado <luisgpm@br.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/powerpc/powerpc32/power9/multiarch/Implies b/sysdeps/powerpc/powerpc32/power9/multiarch/Implies index 4393b56872..1a46ef0035 100644 --- a/sysdeps/powerpc/powerpc32/power9/multiarch/Implies +++ b/sysdeps/powerpc/powerpc32/power9/multiarch/Implies @@ -1 +1 @@ -powerpc/powerpc32/power8/fpu/multiarch +powerpc/powerpc32/power8/multiarch diff --git a/sysdeps/powerpc/powerpc32/ppc-mcount.S b/sysdeps/powerpc/powerpc32/ppc-mcount.S index 68df440cf3..b3cf011ff5 100644 --- a/sysdeps/powerpc/powerpc32/ppc-mcount.S +++ b/sysdeps/powerpc/powerpc32/ppc-mcount.S @@ -1,5 +1,5 @@ /* PowerPC-specific implementation of profiling support. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -40,22 +40,38 @@ */ ENTRY(_mcount) +#if defined PIC && !defined SHARED +# define CALLER_LR_OFFSET 68 + stwu r1,-64(r1) + cfi_adjust_cfa_offset (64) + stw r30, 48(r1) + cfi_rel_offset (r30, 48) +#else +# define CALLER_LR_OFFSET 52 stwu r1,-48(r1) cfi_adjust_cfa_offset (48) +#endif /* We need to save the parameter-passing registers. */ stw r3, 12(r1) stw r4, 16(r1) stw r5, 20(r1) stw r6, 24(r1) mflr r4 - lwz r3, 52(r1) +#if defined PIC && !defined SHARED + bcl 20,31,0f +0: + mflr r30 + addis r30, r30, _GLOBAL_OFFSET_TABLE_-0b@ha + addi r30, r30, _GLOBAL_OFFSET_TABLE_-0b@l +#endif + lwz r3, CALLER_LR_OFFSET(r1) mfcr r5 stw r7, 28(r1) stw r8, 32(r1) stw r9, 36(r1) stw r10,40(r1) stw r4, 44(r1) - cfi_offset (lr, -4) + cfi_rel_offset (lr, 44) stw r5, 8(r1) #ifndef SHARED bl JUMPTARGET(__mcount_internal) @@ -71,13 +87,18 @@ ENTRY(_mcount) mtcrf 0xff,r6 lwz r5, 20(r1) lwz r6, 24(r1) - lwz r0, 52(r1) + lwz r0, CALLER_LR_OFFSET(r1) lwz r7, 28(r1) lwz r8, 32(r1) mtlr r0 lwz r9, 36(r1) lwz r10,40(r1) /* ...unwind the stack frame, and return to your usual programming. */ +#if defined PIC && !defined SHARED + lwz r30, 48(r1) + addi r1,r1,64 +#else addi r1,r1,48 +#endif bctr END(_mcount) diff --git a/sysdeps/powerpc/powerpc32/register-dump.h b/sysdeps/powerpc/powerpc32/register-dump.h index f98bc59be3..e4b1f25233 100644 --- a/sysdeps/powerpc/powerpc32/register-dump.h +++ b/sysdeps/powerpc/powerpc32/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 1998-2016 Free Software Foundation, Inc. + Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/rshift.S b/sysdeps/powerpc/powerpc32/rshift.S index dca9fd15e1..90e3c7898c 100644 --- a/sysdeps/powerpc/powerpc32/rshift.S +++ b/sysdeps/powerpc/powerpc32/rshift.S @@ -1,5 +1,5 @@ /* Shift a limb right, low level routine. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/setjmp-common.S b/sysdeps/powerpc/powerpc32/setjmp-common.S index 7dd0b5f497..f271d244e9 100644 --- a/sysdeps/powerpc/powerpc32/setjmp-common.S +++ b/sysdeps/powerpc/powerpc32/setjmp-common.S @@ -1,5 +1,5 @@ /* setjmp for PowerPC. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/setjmp.S b/sysdeps/powerpc/powerpc32/setjmp.S index 88f7f828ce..ba69bdc279 100644 --- a/sysdeps/powerpc/powerpc32/setjmp.S +++ b/sysdeps/powerpc/powerpc32/setjmp.S @@ -1,5 +1,5 @@ /* non altivec (old) version of setjmp for PowerPC. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -31,6 +31,7 @@ versioned_symbol (libc, __vmx__sigsetjmp, __sigsetjmp, GLIBC_2_3_4) # define __sigsetjmp_symbol __vmx__sigsetjmp # define __sigjmp_save_symbol __vmx__sigjmp_save # include "setjmp-common.S" +libc_hidden_ver (__vmx__sigsetjmp, __sigsetjmp) # if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) # define __NO_VMX__ diff --git a/sysdeps/powerpc/powerpc32/start.S b/sysdeps/powerpc/powerpc32/start.S index 243cb8e744..5c10a22f8a 100644 --- a/sysdeps/powerpc/powerpc32/start.S +++ b/sysdeps/powerpc/powerpc32/start.S @@ -1,5 +1,5 @@ /* Startup code for programs linked with GNU libc. - Copyright (C) 1998-2016 Free Software Foundation, Inc. + Copyright (C) 1998-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/stpcpy.S b/sysdeps/powerpc/powerpc32/stpcpy.S index c8c4213a31..bb7a0f4e00 100644 --- a/sysdeps/powerpc/powerpc32/stpcpy.S +++ b/sysdeps/powerpc/powerpc32/stpcpy.S @@ -1,5 +1,5 @@ /* Optimized stpcpy implementation for PowerPC. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/strchr.S b/sysdeps/powerpc/powerpc32/strchr.S index 40e4c95cc3..38983a2d9e 100644 --- a/sysdeps/powerpc/powerpc32/strchr.S +++ b/sysdeps/powerpc/powerpc32/strchr.S @@ -1,5 +1,5 @@ /* Optimized strchr implementation for PowerPC. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/strcmp.S b/sysdeps/powerpc/powerpc32/strcmp.S index 67ca856b72..bd038dbe5b 100644 --- a/sysdeps/powerpc/powerpc32/strcmp.S +++ b/sysdeps/powerpc/powerpc32/strcmp.S @@ -1,5 +1,5 @@ /* Optimized strcmp implementation for PowerPC. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/strcpy.S b/sysdeps/powerpc/powerpc32/strcpy.S index 05fcc52d0c..757dad9f08 100644 --- a/sysdeps/powerpc/powerpc32/strcpy.S +++ b/sysdeps/powerpc/powerpc32/strcpy.S @@ -1,5 +1,5 @@ /* Optimized strcpy implementation for PowerPC. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/strlen.S b/sysdeps/powerpc/powerpc32/strlen.S index 9582bf142b..23a6f8a7a2 100644 --- a/sysdeps/powerpc/powerpc32/strlen.S +++ b/sysdeps/powerpc/powerpc32/strlen.S @@ -1,5 +1,5 @@ /* Optimized strlen implementation for PowerPC. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/strncmp.S b/sysdeps/powerpc/powerpc32/strncmp.S index b7ae2fc95c..2bbd4a455b 100644 --- a/sysdeps/powerpc/powerpc32/strncmp.S +++ b/sysdeps/powerpc/powerpc32/strncmp.S @@ -1,5 +1,5 @@ /* Optimized strcmp implementation for PowerPC32. - Copyright (C) 2003-2016 Free Software Foundation, Inc. + Copyright (C) 2003-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/sub_n.S b/sysdeps/powerpc/powerpc32/sub_n.S index 2f8517f034..698e71c6aa 100644 --- a/sysdeps/powerpc/powerpc32/sub_n.S +++ b/sysdeps/powerpc/powerpc32/sub_n.S @@ -1,5 +1,5 @@ /* Subtract two limb vectors of equal, non-zero length for PowerPC. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/submul_1.S b/sysdeps/powerpc/powerpc32/submul_1.S index 7e54529dfb..8522a545d2 100644 --- a/sysdeps/powerpc/powerpc32/submul_1.S +++ b/sysdeps/powerpc/powerpc32/submul_1.S @@ -1,5 +1,5 @@ /* Multiply a limb vector by a single limb, for PowerPC. - Copyright (C) 1993-2016 Free Software Foundation, Inc. + Copyright (C) 1993-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-ppc32.S b/sysdeps/powerpc/powerpc32/symbol-hacks.h index f9d1cfef53..b986020b33 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/w_sqrtf-ppc32.S +++ b/sysdeps/powerpc/powerpc32/symbol-hacks.h @@ -1,5 +1,5 @@ -/* sqrtf function. PowerPC32 default version. - Copyright (C) 2013-2016 Free Software Foundation, Inc. +/* Hacks needed for symbol manipulation. powerpc version. + Copyright (C) 2017-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,11 +16,6 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sysdep.h> +#include <sysdeps/wordsize-32/divdi3-symbol-hacks.h> -#undef weak_alias -#define weak_alias(a,b) - -#define __sqrtf __sqrtf_ppc32 - -#include <sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S> +#include_next "symbol-hacks.h" diff --git a/sysdeps/powerpc/powerpc32/sysdep.h b/sysdeps/powerpc/powerpc32/sysdep.h index 241cc8069d..5f1294ead3 100644 --- a/sysdeps/powerpc/powerpc32/sysdep.h +++ b/sysdeps/powerpc/powerpc32/sysdep.h @@ -1,5 +1,5 @@ /* Assembly macros for 32-bit PowerPC. - Copyright (C) 1999-2016 Free Software Foundation, Inc. + Copyright (C) 1999-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -43,6 +43,8 @@ cfi_startproc; \ CALL_MCOUNT +#define ENTRY_TOCLESS(name) ENTRY(name) + /* helper macro for accessing the 32-bit powerpc GOT. */ #define SETUP_GOT_ACCESS(regname,GOT_LABEL) \ @@ -88,8 +90,8 @@ GOT_LABEL: ; \ cfi_endproc; \ ASM_SIZE_DIRECTIVE(name) -#if ! IS_IN(rtld) && defined (ENABLE_LOCK_ELISION) -# define ABORT_TRANSACTION \ +#if !IS_IN(rtld) && !defined(__SPE__) +# define ABORT_TRANSACTION_IMPL \ cmpwi 2,0; \ beq 1f; \ lwz 0,TM_CAPABLE(2); \ @@ -100,8 +102,9 @@ GOT_LABEL: ; \ .align 4; \ 1: #else -# define ABORT_TRANSACTION +# define ABORT_TRANSACTION_IMPL #endif +#define ABORT_TRANSACTION ABORT_TRANSACTION_IMPL #define DO_CALL(syscall) \ ABORT_TRANSACTION \ diff --git a/sysdeps/powerpc/powerpc32/tst-audit.h b/sysdeps/powerpc/powerpc32/tst-audit.h index 8e9a02c30b..735f94edcf 100644 --- a/sysdeps/powerpc/powerpc32/tst-audit.h +++ b/sysdeps/powerpc/powerpc32/tst-audit.h @@ -1,6 +1,6 @@ /* Definitions for testing PLT entry/exit auditing. PowerPC32 version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. |