mirror of git://sourceware.org/git/glibc.git
PowerPC: multiarch lround/lrounf for PowerPC32
This commit is contained in:
parent
264b036bea
commit
deb6648026
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
||||||
|
2013-12-06 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||||
|
|
||||||
|
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile: Add lround
|
||||||
|
and lroundf multiarch implementations.
|
||||||
|
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-power5+.S:
|
||||||
|
New file.
|
||||||
|
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-power6.S:
|
||||||
|
New file.
|
||||||
|
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround-ppc32.S:
|
||||||
|
New file.
|
||||||
|
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lround.c: New file:
|
||||||
|
multiarch lround for PowerPC32.
|
||||||
|
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lroundf.c: New
|
||||||
|
file: multiarch lroundf for PowerPC32.
|
||||||
|
|
||||||
2013-12-06 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
2013-12-06 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
|
||||||
|
|
||||||
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile: Add
|
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile: Add
|
||||||
|
|
|
@ -18,5 +18,6 @@ libm-sysdep_routines += s_llrintf-power6 s_llrintf-ppc32 s_llrint-power6 \
|
||||||
s_floorf-ppc32 s_round-power5+ s_round-ppc32 \
|
s_floorf-ppc32 s_round-power5+ s_round-ppc32 \
|
||||||
s_roundf-power5+ s_roundf-ppc32 s_trunc-power5+ \
|
s_roundf-power5+ s_roundf-ppc32 s_trunc-power5+ \
|
||||||
s_trunc-ppc32 s_truncf-power5+ s_truncf-ppc32 \
|
s_trunc-ppc32 s_truncf-power5+ s_truncf-ppc32 \
|
||||||
s_copysign-power6 s_copysign-ppc32
|
s_copysign-power6 s_copysign-ppc32 s_lround-power6x \
|
||||||
|
s_lround-power5+ s_lround-ppc32
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
/* lround function. POWER5+, PowerPC32 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 __lround __lround_power5plus
|
||||||
|
|
||||||
|
#include <sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S>
|
|
@ -0,0 +1,33 @@
|
||||||
|
/* lround function. POWER6x, PowerPC32 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 __lround __lround_power6x
|
||||||
|
|
||||||
|
#include <sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S>
|
|
@ -0,0 +1,31 @@
|
||||||
|
/* lround function. 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 <sysdep.h>
|
||||||
|
#include <math_ldbl_opt.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)
|
||||||
|
|
||||||
|
#define __lround __lround_ppc32
|
||||||
|
|
||||||
|
#include <sysdeps/powerpc/powerpc32/fpu/s_lround.S>
|
|
@ -0,0 +1,43 @@
|
||||||
|
/* Multiple versions of lround.
|
||||||
|
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 (__lround) __lround_ppc32 attribute_hidden;
|
||||||
|
extern __typeof (__lround) __lround_power5plus attribute_hidden;
|
||||||
|
extern __typeof (__lround) __lround_power6x attribute_hidden;
|
||||||
|
|
||||||
|
libc_ifunc (__lround,
|
||||||
|
(hwcap & PPC_FEATURE_POWER6_EXT) ?
|
||||||
|
__lround_power6x
|
||||||
|
: (hwcap & PPC_FEATURE_POWER5_PLUS) ?
|
||||||
|
__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
|
|
@ -0,0 +1,34 @@
|
||||||
|
/* Multiple versions of lroundf.
|
||||||
|
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 "init-arch.h"
|
||||||
|
|
||||||
|
/* It's safe to use double-precision implementation for single-precision. */
|
||||||
|
extern __typeof (__lroundf) __lround_ppc32 attribute_hidden;
|
||||||
|
extern __typeof (__lroundf) __lround_power5plus attribute_hidden;
|
||||||
|
extern __typeof (__lroundf) __lround_power6x attribute_hidden;
|
||||||
|
|
||||||
|
libc_ifunc (__lroundf,
|
||||||
|
(hwcap & PPC_FEATURE_POWER6_EXT) ?
|
||||||
|
__lround_power6x
|
||||||
|
: (hwcap & PPC_FEATURE_POWER5_PLUS) ?
|
||||||
|
__lround_power5plus
|
||||||
|
: __lround_ppc32);
|
||||||
|
|
||||||
|
weak_alias (__lroundf, lroundf)
|
Loading…
Reference in New Issue