/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
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, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
#include <machine/asm.h>
-#ifdef __ELF__
- .section .rodata
-#else
- .text
-#endif
+ .section .rodata.cst8,"aM",@progbits,8
- .align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(one,@object)
+ .p2align 3
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
// 1 <= x <= 2 => y = log1p(x-1+sqrt(2*(x-1)+(x-1)^2))
fsubl MO(one) // x-1 : log(2)
+ fabs // acosh(1) is +0 in all rounding modes
fld %st // x-1 : x-1 : log(2)
fmul %st(1) // (x-1)^2 : x-1 : log(2)
fadd %st(1) // x-1+(x-1)^2 : x-1 : log(2)
fyl2x // log(2*x+1/(x+sqrt(x^2-1)))
ret
- // x < 1 => NaN
+ // x < 1 (or -NaN) => NaN
.align ALIGNARG(4)
-5: fldz
+5: fldl 4(%esp)
+ fsub %st
fdiv %st, %st(0)
ret
END(__ieee754_acosh)
+strong_alias (__ieee754_acosh, __acosh_finite)