about summary refs log tree commit diff
path: root/sysdeps/aarch64/fpu/s_truncf.c
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2020-05-29 16:06:59 -0700
committerVineet Gupta <vgupta@synopsys.com>2020-06-03 10:23:33 -0700
commitc9feb1be938c3b259ece1a07ef78ddcf89194f31 (patch)
treef3298924e8a4c0d66672e01218f3fd9813ae0cce /sysdeps/aarch64/fpu/s_truncf.c
parent628d90c5f97b6f0f8b79a079b682febb1f486a38 (diff)
downloadglibc-c9feb1be938c3b259ece1a07ef78ddcf89194f31.tar.gz
glibc-c9feb1be938c3b259ece1a07ef78ddcf89194f31.tar.xz
glibc-c9feb1be938c3b259ece1a07ef78ddcf89194f31.zip
aarch/fpu: use generic builtins based math functions
introduce sysdep header math-use-builtins.h to replace aarch64
implementations with corresponding generic ones.

 - newly inroduced generic sqrt{,f}, fma{,f}
 - existing floor{,f}, nearbyint{,f}, rint{,f}, round{,f}, trunc{,f}
 - Note that generic copysign was already enabled (via generic
   math-use-builtins.h) now thru sysdep header

Tested with build-many-glibcs for aarch64-linux-gnu

This is a non functional change and aarch64 libm before/after was
byte invariant as compared below:

| cd /SCRATCH/vgupta/gnu/install-glibc-A-baseline
| for i in `find . -name libm-2.31.9000.so`; do
|   echo $i; diff $i /SCRATCH/vgupta/gnu/install-glibc-C-reduce-scope/$i ;
|   echo $?;
| done

| ./aarch64-linux-gnu/lib64/libm-2.31.9000.so
| 0
| ./arm-linux-gnueabi/lib/libm-2.31.9000.so
| 0
| ./x86_64-linux-gnu/lib64/libm-2.31.9000.so
| 0
| ./arm-linux-gnueabihf/lib/libm-2.31.9000.so
| 0
| ./riscv64-linux-gnu-rv64imac-lp64/lib64/lp64/libm-2.31.9000.so
| 0
| ./riscv64-linux-gnu-rv64imafdc-lp64/lib64/lp64/libm-2.31.9000.so
| 0
| ./powerpc-linux-gnu/lib/libm-2.31.9000.so
| 0
| ./microblaze-linux-gnu/lib/libm-2.31.9000.so
| 0
| ./nios2-linux-gnu/lib/libm-2.31.9000.so
| 0
| ./hppa-linux-gnu/lib/libm-2.31.9000.so
| 0
| ./s390x-linux-gnu/lib64/libm-2.31.9000.so
| 0

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/aarch64/fpu/s_truncf.c')
-rw-r--r--sysdeps/aarch64/fpu/s_truncf.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/sysdeps/aarch64/fpu/s_truncf.c b/sysdeps/aarch64/fpu/s_truncf.c
deleted file mode 100644
index 6a025c084a..0000000000
--- a/sysdeps/aarch64/fpu/s_truncf.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (C) 2011-2020 Free Software 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
-   <https://www.gnu.org/licenses/>.  */
-
-#define NO_MATH_REDIRECT
-#include <math.h>
-#include <libm-alias-float.h>
-
-float
-__truncf (float x)
-{
-  return __builtin_truncf (x);
-}
-
-libm_alias_float (__trunc, trunc)