mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
PowerPC: multiarch finite/finitef for PowerPC32
This commit is contained in:
parent
64fffd65d7
commit
ae1a4cd9ff
19
ChangeLog
19
ChangeLog
@ -1,3 +1,22 @@
|
||||
2013-12-06 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/ieee754/dbl-64/s_finite.c (__finite): Redefine it if FINITE
|
||||
is defined.
|
||||
* sysdeps/ieee754/flt-32/s_finitef.c (__finitef): Redefine it if
|
||||
FINITEF is defined.
|
||||
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile: Add finite
|
||||
and finitef multiarch implementations.
|
||||
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite-power7.S:
|
||||
New file.
|
||||
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite-ppc32.c: New
|
||||
file.
|
||||
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c: New file:
|
||||
multiarch finite for PowerPC32.
|
||||
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef-ppc32.c:
|
||||
New file.
|
||||
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef.c: New
|
||||
file: multiarch finitef for PowerPC32.
|
||||
|
||||
2013-12-06 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile: Add isinf
|
||||
|
@ -23,8 +23,12 @@ static char rcsid[] = "$NetBSD: s_finite.c,v 1.8 1995/05/10 20:47:17 jtc Exp $";
|
||||
#include <math_private.h>
|
||||
|
||||
#undef __finite
|
||||
int
|
||||
__finite (double x)
|
||||
|
||||
#ifndef FINITE
|
||||
# define FINITE __finite
|
||||
#endif
|
||||
|
||||
int FINITE(double x)
|
||||
{
|
||||
int32_t hx;
|
||||
GET_HIGH_WORD (hx, x);
|
||||
|
@ -26,7 +26,12 @@ static char rcsid[] = "$NetBSD: s_finitef.c,v 1.4 1995/05/10 20:47:18 jtc Exp $"
|
||||
#include <math_private.h>
|
||||
|
||||
#undef __finitef
|
||||
int __finitef(float x)
|
||||
|
||||
#ifndef FINITEF
|
||||
# define FINITEF __finitef
|
||||
#endif
|
||||
|
||||
int FINITEF(float x)
|
||||
{
|
||||
int32_t ix;
|
||||
GET_FLOAT_WORD(ix,x);
|
||||
|
@ -1,7 +1,8 @@
|
||||
ifeq ($(subdir),math)
|
||||
sysdep_routines += 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_isinf-ppc32 s_isinff-ppc32 s_finite-power7 \
|
||||
s_finite-ppc32 s_finitef-ppc32
|
||||
|
||||
libm-sysdep_routines += s_llrintf-power6 s_llrintf-ppc32 s_llrint-power6 \
|
||||
s_llrint-ppc32 s_llround-power6 s_llround-power5+ \
|
||||
@ -9,5 +10,6 @@ libm-sysdep_routines += s_llrintf-power6 s_llrintf-ppc32 s_llrint-power6 \
|
||||
w_sqrtf-power5 w_sqrtf-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_isinf-ppc32 s_isinff-ppc32 s_finite-power7 \
|
||||
s_finite-ppc32 s_finitef-ppc32
|
||||
endif
|
||||
|
@ -0,0 +1,33 @@
|
||||
/* finite(). PowerPC32/POWER7 version.
|
||||
Copyright (C) 2013 Free Software 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>
|
||||
|
||||
#undef hidden_def
|
||||
#define hidden_def(name)
|
||||
#undef weak_alias
|
||||
#define weak_alias(name, alias)
|
||||
#undef strong_alias
|
||||
#define strong_alias(name, alias)
|
||||
#undef compat_symbol
|
||||
#define compat_symbol(lib, name, alias, ver)
|
||||
|
||||
#define __finite __finite_power7
|
||||
|
||||
#include <sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S>
|
@ -0,0 +1,33 @@
|
||||
/* finite(). PowerPC32 default version.
|
||||
Copyright (C) 2013 Free Software 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>
|
||||
|
||||
#undef weak_alias
|
||||
#define weak_alias(a, b)
|
||||
#undef strong_alias
|
||||
#define strong_alias(a, b)
|
||||
|
||||
#define FINITE __finite_ppc32
|
||||
#ifdef SHARED
|
||||
# undef hidden_def
|
||||
# define hidden_def(a) \
|
||||
__hidden_ver1 (__finite_ppc32, __GI___finite, __finite_ppc32);
|
||||
#endif
|
||||
|
||||
#include <sysdeps/ieee754/dbl-64/s_finite.c>
|
51
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c
Normal file
51
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finite.c
Normal file
@ -0,0 +1,51 @@
|
||||
/* Multiple versions of finite.
|
||||
Copyright (C) 2013 Free Software 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 (__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);
|
||||
|
||||
weak_alias (__finite, finite)
|
||||
|
||||
#ifdef NO_LONG_DOUBLE
|
||||
strong_alias (__finite, __finitel)
|
||||
weak_alias (__finite, finitel)
|
||||
#endif
|
||||
|
||||
#ifdef IS_IN_libm
|
||||
# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
|
||||
compat_symbol (libm, finite, finitel, GLIBC_2_0);
|
||||
# endif
|
||||
# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_1)
|
||||
compat_symbol (libm, __finite, __finitel, GLIBC_2_1);
|
||||
# endif
|
||||
#else
|
||||
# if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
|
||||
compat_symbol (libc, __finite, __finitel, GLIBC_2_0);
|
||||
compat_symbol (libc, finite, finitel, GLIBC_2_0);
|
||||
# endif
|
||||
#endif
|
@ -0,0 +1,31 @@
|
||||
/* finitef(). PowerPC32 default version.
|
||||
Copyright (C) 2013 Free Software 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>
|
||||
|
||||
#undef weak_alias
|
||||
#define weak_alias(a, b)
|
||||
|
||||
#define FINITEF __finitef_ppc32
|
||||
#ifdef SHARED
|
||||
# undef hidden_def
|
||||
# define hidden_def(a) \
|
||||
__hidden_ver1 (__finitef_ppc32, __GI___finitef, __finitef_ppc32);
|
||||
#endif
|
||||
|
||||
#include <sysdeps/ieee754/flt-32/s_finitef.c>
|
32
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef.c
Normal file
32
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_finitef.c
Normal file
@ -0,0 +1,32 @@
|
||||
/* Multiple versions of finitef.
|
||||
Copyright (C) 2013 Free Software 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 <shlib-compat.h>
|
||||
#include "init-arch.h"
|
||||
|
||||
extern __typeof (__finitef) __finitef_ppc32 attribute_hidden;
|
||||
/* The power7 finite(double) works for float. */
|
||||
extern __typeof (__finitef) __finite_power7 attribute_hidden;
|
||||
|
||||
libc_ifunc (__finitef,
|
||||
(hwcap & PPC_FEATURE_ARCH_2_06)
|
||||
? __finite_power7
|
||||
: __finitef_ppc32);
|
||||
|
||||
weak_alias (__finitef, finitef)
|
Loading…
Reference in New Issue
Block a user