mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-14 06:28:17 +03:00
Call libc_fesetround_aarch64.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2014-12-22 Wilco Dijkstra <wdijkstr@arm.com>
|
||||||
|
|
||||||
|
* sysdeps/aarch64/fpu/fesetround.c (fesetround):
|
||||||
|
Call libc_fesetround_aarch64.
|
||||||
|
|
||||||
2014-12-22 Joseph Myers <joseph@codesourcery.com>
|
2014-12-22 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
[BZ #17733]
|
[BZ #17733]
|
||||||
|
@@ -17,31 +17,16 @@
|
|||||||
<http://www.gnu.org/licenses/>. */
|
<http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <fenv.h>
|
#include <fenv.h>
|
||||||
|
#include <math_private.h>
|
||||||
#include <fpu_control.h>
|
#include <fpu_control.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
fesetround (int round)
|
fesetround (int round)
|
||||||
{
|
{
|
||||||
fpu_control_t fpcr;
|
if (round & ~_FPU_FPCR_RM_MASK)
|
||||||
fpu_control_t fpcr_new;
|
return 1;
|
||||||
|
|
||||||
switch (round)
|
libc_fesetround_aarch64 (round);
|
||||||
{
|
|
||||||
case FE_TONEAREST:
|
|
||||||
case FE_UPWARD:
|
|
||||||
case FE_DOWNWARD:
|
|
||||||
case FE_TOWARDZERO:
|
|
||||||
_FPU_GETCW (fpcr);
|
|
||||||
fpcr_new = (fpcr & ~FE_TOWARDZERO) | round;
|
|
||||||
|
|
||||||
if (fpcr != fpcr_new)
|
|
||||||
_FPU_SETCW (fpcr_new);
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
libm_hidden_def (fesetround)
|
libm_hidden_def (fesetround)
|
||||||
|
Reference in New Issue
Block a user