about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/le/fpu
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-028-8/+8
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* powerpc64le: ifunc select *f128 routines in multiarch modePaul E. Murphy2020-11-3015-197/+814
| | | | | | | | | | | | | | | | | | | | | | | | | Programatically generate simple wrappers for interesting libm *f128 objects. Selected functions are transcendental functions or those with trivial compiler builtins. This can result in a 2-3x speedup (e.g logf128 and expf128). A second set of implementation files are generated which include the first implementation encountered along the search path. This usually works, except when a wrapper is overriden and makefile search order slightly diverges from include order. Likewise, wrapper object files are created for each generated file. These hold the ifunc selection routines which export ABI. Next, several shared headers are intercepted to control renaming of asm function redirects are used first, and sometimes macro renames if the former is impractical. Notably, if the request machine supports hardware IEEE128 (i.e POWER9 and newer) this ifunc machinery is disabled. Likewise existing ifunc support for float128 is consolidated into this (e.g sqrtf128 and fmaf128). Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* powerpc64le: refactor e_sqrtf128.cPaul E. Murphy2020-06-161-1/+7
| | | | | Combine both implementations into a single file to allow building twice with appropriate multiarch support when possible.
* powerpc64le: use common fmaf128 implementationPaul E. Murphy2020-06-051-1/+3
| | | | | | | | | This defines the macro such that it should behave best on all supported powerpc targets. Likewise, this allows us to remove the ppc64le specific s_fmaf128.c. I have verified powerpc64le multiarch and powerpc64le power9 no-multiarch builds continue to generate optimize fmaf128.
* powerpc64le: Enforce -mabi=ibmlongdouble when -mfloat128 usedPaul E. Murphy2020-04-061-4/+4
| | | | | | | | | | | | | | | | | | I have observed a bug on 7.4.0 whereby __mulkc3 calls are swapped with __multc3 depending on ABI selection. For the sake of being overly cautious, build all _Float128 files with ibm128 to workaround these compilers. This has been noted in GCC BZ 84914, and will not be fixed for GCC 7. Likewise, non-math files built with _Float128 are assumed to have ibm long double. Explicilty preserve this assumption. Finally, add some bootstrapping code to avoid applying these options until IEEE long double is enabled as they require GCC 7 and above. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* powerpc64le/multiarch: don't generate strong aliases for fmaf128-ppc64Paul E. Murphy2020-04-061-0/+2
| | | | | This prevents generating a second alias for __fmaieee128 when compiling with ldouble == ieee128 redirects.
* powerpc: Add support for fmaf128() in hardwareRaphael Moreira Zinsly2020-03-304-1/+91
| | | | | | | | Adds a POWER9 version of fmaf128 that uses the xsmaddqp instruction. Co-authored-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* powerpc64le: add -mno-gnu-attribute to *f128 objects and difftimePaul E. Murphy2020-03-251-2/+2
| | | | | | | | | | | | | In practice, this flag should be applied globally, but it makes a good sanity check to ensure ibm128 and ieee128 long double files are not getting mismatched. _Float128 files use no long double, thus are always safe to use this option. Similarly, when investigating the linker complaints, difftime makes trivial, self contained, usage of long double, so thus it is also explicitly marked as such. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* Add libm_alias_finite for _finite symbolsWilco Dijkstra2020-01-031-1/+2
| | | | | | | | | | | | | | | | | | | This patch adds a new macro, libm_alias_finite, to define all _finite symbol. It sets all _finite symbol as compat symbol based on its first version (obtained from the definition at built generated first-versions.h). The <fn>f128_finite symbols were introduced in GLIBC 2.26 and so need special treatment in code that is shared between long double and float128. It is done by adding a list, similar to internal symbol redifinition, on sysdeps/ieee754/float128/float128_private.h. Alpha also needs some tricky changes to ensure we still emit 2 compat symbols for sqrt(f). Passes buildmanyglibc. Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-014-4/+4
|
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-074-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* [powerpc] Use __builtin_{mffs,mtfsf}Paul A. Clarke2019-03-291-2/+1
| | | | | | | | | | | | | | | | | | | Replace inline asm uses of the "mffs" and "mtfsf" instructions with the analogous GCC builtins. __builtin_mffs and __builtin_mtfsf are both available in GCC 5 and above. Given the minimum GCC level for GLibC is now GCC 6.2, it is safe to use these builtins without restriction. 2019-03-29 Paul A. Clarke <pc@us.ibm.com> * sysdeps/powerpc/fpu/fenv_libc.h (fegetenv_register): Replace inline asm with builtin. * sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h (FP_INIT_ROUNDMODE): Likewise. * sysdeps/powerpc/fpu/tst-setcontext-fpscr.c (_GET_DI_FPSCR): Likewise. (_GET_SI_FPSCR): Likewise. (_SET_SI_FPSCR): Likewise.
* Add more spaces before '('.Joseph Myers2019-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes more places where a space should have been present before '(' in accordance with the GNU Coding Standards (as with the previous patch, mainly for calls to sizeof). Tested with build-many-glibcs.py. * sysdeps/powerpc/powerpc32/dl-machine.c (__elf_machine_fixup_plt): Use space before '('. (__process_machine_rela): Likewise. * sysdeps/powerpc/powerpc32/register-dump.h (register_dump): Likewise. * sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h (TI_BITS): Likewise. * sysdeps/powerpc/powerpc64/register-dump.h (register_dump): Likewise. * sysdeps/powerpc/test-arith.c (union_t): Likewise. (pattern): Likewise. (delta): Likewise. (check_result): Likewise. (check_excepts): Likewise. (check_op): Likewise. (fail_xr): Likewise. * sysdeps/unix/alpha/sysdep.h (syscall_promote): Likewise. * sysdeps/unix/sysv/linux/alpha/a.out.h (AOUTHSZ): Likewise. (SCNHSZ): Likewise. * sysdeps/unix/sysv/linux/hppa/makecontext.c (FRAME_SIZE_BYTES): Likewise. (ARGS): Likewise. (__makecontext): Likewise. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (ucontext_t): Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-014-4/+4
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* powerpc64le: Fix TFtype in sqrtf128 when using -mabi=ieeelongdoubleTulio Magno Quites Machado Filho2018-06-061-3/+8
| | | | | | | | | | | | | | | | When building with -mlong-double-128 or -mabi=ibmlongdouble, TFtype represents the IBM 128-bit extended floating point type, while KFtype represents the IEEE 128-bit floating point type. The soft float implementation of e_sqrtf128 had to redefine TFtype and TF in order to workaround this issue. However, this behavior changes when -mabi=ieeelongdouble is used and the macros are not necessary. * sysdeps/powerpc/powerpc64/le/fpu/e_sqrtf128.c [__HAVE_FLOAT128_UNLIKE_LDBL] (TFtype, TF): Restrict TFtype and TF redirection to KFtype and KF only when the default long double type is not the IEEE 128-bit floating point type. Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* powerpc: Add multiarch sqrtf128 for ppc64leRajalakshmi Srinivasaraghavan2018-05-304-0/+107
| | | | | | | This patch creates ifunc for sqrtf128() to make use of new xssqrtqp instruction for POWER9 when --enable-multi-arch and --with-cpu=power8 options are used on power9 system. This is achieved by explicitly adding -mcpu=power9 flag for sqrtf128-power9.
* powerpc64*: fix the order of implied sysdeps directoriesGabriel F. T. Gomes2018-04-274-0/+168
The creation of the divergent sysdeps directory for powerpc64le commit 2f7f3cd8cd302bb10908c86f3f7b349df0a78e6a Author: Paul E. Murphy <murphyp@linux.vnet.ibm.com> Date: Fri Jul 15 18:04:40 2016 -0500 powerpc64le: Create divergent sysdep directory for powerpc64le. allowed float128 to be enabled for powerpc64le (little-endian) and not for powerpc64 (big-endian). Since the only intended difference between them was the presence or absence of the float128 interface, the sysdeps directory for powerpc64le explicitly reused the files from powerpc64 (through the use of Implies files). Although this works, it also means that files under the powerpc64 directory might be preferred over files under powerpc64le. For instance, on a build for powerpc64le with target set to power9, a file from powerpc64/power5 might get built, even though a file with the same name exists in powerpc64le/power8. That happens because the processor hierarchy was only defined in the sysdeps directory for powerpc64 (and borrowed by powerpc64le). This patch fixes this behavior, by creating new subdirectories under powerpc64 (i.e.: powerpc64/be and powerpc64/le) and creating new Implies files to provide the hierarchy of processors for powerpc64 and powerpc64le separately. These changes have no effect on installed, stripped binaries (which remain unchanged). Tested that installed stripped binaries are unchanged and that there are no regressions on powerpc64 and powerpc64le.