|
Packit Service |
8d2bc1 |
/* roundevenl() - S390 version.
|
|
Packit Service |
8d2bc1 |
Copyright (C) 2019 Free Software Foundation, Inc.
|
|
Packit Service |
8d2bc1 |
|
|
Packit Service |
8d2bc1 |
This file is part of the GNU C Library.
|
|
Packit Service |
8d2bc1 |
|
|
Packit Service |
8d2bc1 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
8d2bc1 |
modify it under the terms of the GNU Lesser General Public License as
|
|
Packit Service |
8d2bc1 |
published by the Free Software Foundation; either version 2.1 of the
|
|
Packit Service |
8d2bc1 |
License, or (at your option) any later version.
|
|
Packit Service |
8d2bc1 |
|
|
Packit Service |
8d2bc1 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
8d2bc1 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
8d2bc1 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
8d2bc1 |
Lesser General Public License for more details.
|
|
Packit Service |
8d2bc1 |
|
|
Packit Service |
8d2bc1 |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
8d2bc1 |
License along with the GNU C Library; if not, see
|
|
Packit Service |
8d2bc1 |
<https://www.gnu.org/licenses/>. */
|
|
Packit Service |
8d2bc1 |
|
|
Packit Service |
8d2bc1 |
#ifdef HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT
|
|
Packit Service |
8d2bc1 |
# include <math.h>
|
|
Packit Service |
8d2bc1 |
# include <math_private.h>
|
|
Packit Service |
8d2bc1 |
# include <libm-alias-ldouble.h>
|
|
Packit Service |
8d2bc1 |
|
|
Packit Service |
8d2bc1 |
_Float128
|
|
Packit Service |
8d2bc1 |
__roundevenl (_Float128 x)
|
|
Packit Service |
8d2bc1 |
{
|
|
Packit Service |
8d2bc1 |
_Float128 y;
|
|
Packit Service |
8d2bc1 |
/* The z196 zarch "load fp integer" (fixbra) instruction is rounding
|
|
Packit Service |
8d2bc1 |
x to the nearest integer with "ties to even" rounding mode
|
|
Packit Service |
8d2bc1 |
(M3-field: 4) where inexact exceptions are suppressed (M4-field: 4). */
|
|
Packit Service |
8d2bc1 |
__asm__ ("fixbra %0,4,%1,4" : "=f" (y) : "f" (x));
|
|
Packit Service |
8d2bc1 |
return y;
|
|
Packit Service |
8d2bc1 |
}
|
|
Packit Service |
8d2bc1 |
libm_alias_ldouble (__roundeven, roundeven)
|
|
Packit Service |
8d2bc1 |
|
|
Packit Service |
8d2bc1 |
#else
|
|
Packit Service |
8d2bc1 |
# include <sysdeps/ieee754/ldbl-128/s_roundevenl.c>
|
|
Packit Service |
8d2bc1 |
#endif
|