mirror of git://sourceware.org/git/glibc.git
* sysdeps/powerpc/fpu/e_sqrt.c: Avoid call to fetestexcept.
* sysdeps/powerpc/fpu/e_sqrtf.c: Likewise.
This commit is contained in:
parent
3cc56f9208
commit
c3a0ead420
|
@ -1,5 +1,8 @@
|
||||||
2008-04-11 Ulrich Drepper <drepper@redhat.com>
|
2008-04-11 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/powerpc/fpu/e_sqrt.c: Avoid call to fetestexcept.
|
||||||
|
* sysdeps/powerpc/fpu/e_sqrtf.c: Likewise.
|
||||||
|
|
||||||
* scripts/data/localplt-powerpc64-linux-gnu.data: New file.
|
* scripts/data/localplt-powerpc64-linux-gnu.data: New file.
|
||||||
|
|
||||||
* sysdeps/powerpc/fpu/fenv_libc.h: Add libm_hidden_proto for
|
* sysdeps/powerpc/fpu/fenv_libc.h: Add libm_hidden_proto for
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Double-precision floating point square root.
|
/* Double-precision floating point square root.
|
||||||
Copyright (C) 1997, 2002, 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 1997, 2002, 2003, 2004, 2008 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -150,7 +150,9 @@ __slow_ieee754_sqrt (x)
|
||||||
FE_INVALID_SQRT. */
|
FE_INVALID_SQRT. */
|
||||||
#ifdef FE_INVALID_SQRT
|
#ifdef FE_INVALID_SQRT
|
||||||
feraiseexcept (FE_INVALID_SQRT);
|
feraiseexcept (FE_INVALID_SQRT);
|
||||||
if (!fetestexcept (FE_INVALID))
|
|
||||||
|
fenv_union_t u = { .fenv = fegetenv_register () };
|
||||||
|
if ((u.l[1] & FE_INVALID) == 0)
|
||||||
#endif
|
#endif
|
||||||
feraiseexcept (FE_INVALID);
|
feraiseexcept (FE_INVALID);
|
||||||
x = a_nan.value;
|
x = a_nan.value;
|
||||||
|
@ -172,7 +174,7 @@ __ieee754_sqrt (x)
|
||||||
/* If the CPU is 64-bit we can use the optional FP instructions. */
|
/* If the CPU is 64-bit we can use the optional FP instructions. */
|
||||||
if (__CPU_HAS_FSQRT)
|
if (__CPU_HAS_FSQRT)
|
||||||
{
|
{
|
||||||
/* Volatile is required to prevent the compiler from moving the
|
/* Volatile is required to prevent the compiler from moving the
|
||||||
fsqrt instruction above the branch. */
|
fsqrt instruction above the branch. */
|
||||||
__asm __volatile (" fsqrt %0,%1\n"
|
__asm __volatile (" fsqrt %0,%1\n"
|
||||||
:"=f" (z):"f" (x));
|
:"=f" (z):"f" (x));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Single-precision floating point square root.
|
/* Single-precision floating point square root.
|
||||||
Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
|
Copyright (C) 1997, 2003, 2004, 2008 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -126,7 +126,9 @@ __slow_ieee754_sqrtf (x)
|
||||||
FE_INVALID_SQRT. */
|
FE_INVALID_SQRT. */
|
||||||
#ifdef FE_INVALID_SQRT
|
#ifdef FE_INVALID_SQRT
|
||||||
feraiseexcept (FE_INVALID_SQRT);
|
feraiseexcept (FE_INVALID_SQRT);
|
||||||
if (!fetestexcept (FE_INVALID))
|
|
||||||
|
fenv_union_t u = { .fenv = fegetenv_register () };
|
||||||
|
if ((u.l[1] & FE_INVALID) == 0)
|
||||||
#endif
|
#endif
|
||||||
feraiseexcept (FE_INVALID);
|
feraiseexcept (FE_INVALID);
|
||||||
x = a_nan.value;
|
x = a_nan.value;
|
||||||
|
@ -149,7 +151,7 @@ __ieee754_sqrtf (x)
|
||||||
/* If the CPU is 64-bit we can use the optional FP instructions. */
|
/* If the CPU is 64-bit we can use the optional FP instructions. */
|
||||||
if (__CPU_HAS_FSQRT)
|
if (__CPU_HAS_FSQRT)
|
||||||
{
|
{
|
||||||
/* Volatile is required to prevent the compiler from moving the
|
/* Volatile is required to prevent the compiler from moving the
|
||||||
fsqrt instruction above the branch. */
|
fsqrt instruction above the branch. */
|
||||||
__asm __volatile (" fsqrts %0,%1\n"
|
__asm __volatile (" fsqrts %0,%1\n"
|
||||||
:"=f" (z):"f" (x));
|
:"=f" (z):"f" (x));
|
||||||
|
|
Loading…
Reference in New Issue