diff options
Diffstat (limited to 'sysdeps/ieee754/ldbl-128')
-rw-r--r-- | sysdeps/ieee754/ldbl-128/s_lrintl.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_lrintl.c b/sysdeps/ieee754/ldbl-128/s_lrintl.c index e8ec02dc6f..ecb604a650 100644 --- a/sysdeps/ieee754/ldbl-128/s_lrintl.c +++ b/sysdeps/ieee754/ldbl-128/s_lrintl.c @@ -24,16 +24,22 @@ #include <math_private.h> #include <libm-alias-ldouble.h> #include <fix-fp-int-convert-overflow.h> +#include <math-use-builtins.h> -static const _Float128 two112[2] = -{ - L(5.19229685853482762853049632922009600E+33), /* 0x406F000000000000, 0 */ - L(-5.19229685853482762853049632922009600E+33) /* 0xC06F000000000000, 0 */ -}; long int __lrintl (_Float128 x) { +#if USE_LRINTL_BUILTIN + return __builtin_lrintl (x); +#else + /* Use generic implementation. */ + static const _Float128 two112[2] = + { + L(5.19229685853482762853049632922009600E+33), /* 0x406F000000000000, 0 */ + L(-5.19229685853482762853049632922009600E+33) /* 0xC06F000000000000, 0 */ + }; + int32_t j0; uint64_t i0,i1; _Float128 w; @@ -131,6 +137,7 @@ __lrintl (_Float128 x) } return sx ? -result : result; +#endif /* ! USE_LRINTL_BUILTIN */ } libm_alias_ldouble (__lrint, lrint) |