aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc32/power6/fpu
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-03-18 02:01:03 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-06-17 09:27:02 -0300
commit2166283fcc8ba3b4a4505acd2a91f2e7decf689c (patch)
tree961121341f98f1464fec4d4962398bb9422b0672 /sysdeps/powerpc/powerpc32/power6/fpu
parent78049de0a995df1a81c934c186816e4114aed4bd (diff)
downloadglibc-2166283fcc8ba3b4a4505acd2a91f2e7decf689c.tar
glibc-2166283fcc8ba3b4a4505acd2a91f2e7decf689c.tar.gz
glibc-2166283fcc8ba3b4a4505acd2a91f2e7decf689c.tar.bz2
glibc-2166283fcc8ba3b4a4505acd2a91f2e7decf689c.zip
powerpc: Refactor powerpc32 lrint/lrintf/llrint/llrintf
This patches consolidates all the powerpc llrint{f} implementations on the generic sysdeps/powerpc/powerpc32/fpu/s_llrint{f}. Checked on powerpc-linux-gnu (built without --with-cpu, with --with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch), powerpc64-linux-gnu (built without --with-cpu and with --with-cpu=power5+ and --disable-multi-arch). * sysdeps/powerpc/fpu/s_lrintf.S: Remove file. * sysdeps/powerpc/powerpc64/fpu/s_lrintf.c: Move to ... * sysdeps/powerpc/fpu/s_lrintf.c: ... here. * sysdeps/powerpc/powerpc32/fpu/Makefile [$(subdir) == math] (CFLAGS-s_lrint.c): New rule. * sysdeps/powerpc/powerpc32/fpu/s_llrint.c (__llrint): Add power4 optimization. * sysdeps/powerpc/powerpc32/fpu/s_llrintf.c (__llrintf): Likewise. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Remove file. * sysdeps/powerpc/powerpc32/fpu/s_lrint.c: New file. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile (CFLAGS-s_llrintf-power6.c, CFLAGS-s_llrintf-ppc32.c, CFLAGS-s_llrint-power6.c, CFLAGS-s_llrint-ppc32.c, CFLAGS-s_lrint-ppc32.c): New rule. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S: Remove file. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S: Likewise. * sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S: Likewise. * sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.c: New file. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.c: Likewise. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.c: Likewise. Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
Diffstat (limited to 'sysdeps/powerpc/powerpc32/power6/fpu')
-rw-r--r--sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S39
-rw-r--r--sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S39
2 files changed, 0 insertions, 78 deletions
diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S
deleted file mode 100644
index e8134f7451..0000000000
--- a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Round double to long int. PowerPC32 on PowerPC64 version.
- Copyright (C) 2004-2019 Free Software 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>
-#include <libm-alias-double.h>
-
-/* long long int[r3, r4] __llrint (double x[fp1]) */
-ENTRY (__llrint)
- CALL_MCOUNT
- stwu r1,-16(r1)
- cfi_adjust_cfa_offset (16)
- fctid fp13,fp1
- stfd fp13,8(r1)
-/* Insure the following load is in a different dispatch group by
- inserting "group ending nop". */
- ori r1,r1,0
- lwz r3,8+HIWORD(r1)
- lwz r4,8+LOWORD(r1)
- addi r1,r1,16
- blr
- END (__llrint)
-
-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
deleted file mode 100644
index b4d013f7a3..0000000000
--- a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Round float to long int. PowerPC32 on PowerPC64 version.
- Copyright (C) 2004-2019 Free Software 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 <libm-alias-float.h>
-
-/* long long int[r3, r4] __llrintf (float x[fp1]) */
-ENTRY (__llrintf)
- CALL_MCOUNT
- stwu r1,-16(r1)
- cfi_adjust_cfa_offset (16)
- fctid fp13,fp1
- stfd fp13,8(r1)
-/* Insure the following load is in a different dispatch group by
- inserting "group ending nop". */
- ori r1,r1,0
- lwz r3,8+HIWORD(r1)
- lwz r4,8+LOWORD(r1)
- addi r1,r1,16
- blr
- END (__llrintf)
-
-libm_alias_float (__llrint, llrint)
-