diff options
Diffstat (limited to 'sysdeps/aarch64/fpu/s_lrintf.c')
-rw-r--r-- | sysdeps/aarch64/fpu/s_lrintf.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/sysdeps/aarch64/fpu/s_lrintf.c b/sysdeps/aarch64/fpu/s_lrintf.c index b603510375..fa42d68dd1 100644 --- a/sysdeps/aarch64/fpu/s_lrintf.c +++ b/sysdeps/aarch64/fpu/s_lrintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2016 Free Software Foundation, Inc. +/* Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -16,7 +16,21 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#define FUNC lrintf -#define ITYPE float -#define IREGS "s" -#include <s_lrint.c> +#include <math.h> +#include <math-barriers.h> +#include <math_private.h> +#include <libm-alias-float.h> + +long int +__lrintf (float x) +{ + float r = __builtin_rintf (x); + + /* Prevent gcc from calling lrintf directly when compiled with + -fno-math-errno by inserting a barrier. */ + + math_opt_barrier (r); + return r; +} + +libm_alias_float (__lrint, lrint) |