Blame sysdeps/s390/fpu/s_roundevenl.c

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