about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128/s_roundevenl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_roundevenl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_roundevenl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_roundevenl.c b/sysdeps/ieee754/ldbl-128/s_roundevenl.c
index 7c9c11fad2..afbf13d4f2 100644
--- a/sysdeps/ieee754/ldbl-128/s_roundevenl.c
+++ b/sysdeps/ieee754/ldbl-128/s_roundevenl.c
@@ -21,6 +21,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <libm-alias-ldouble.h>
+#include <math-use-builtins.h>
 #include <stdint.h>
 
 #define BIAS 0x3fff
@@ -30,6 +31,9 @@
 _Float128
 __roundevenl (_Float128 x)
 {
+#if USE_ROUNDEVENL_BUILTIN
+  return __builtin_roundevenl (x);
+#else
   uint64_t hx, lx, uhx;
   GET_LDOUBLE_WORDS64 (hx, lx, x);
   uhx = hx & 0x7fffffffffffffffULL;
@@ -101,5 +105,6 @@ __roundevenl (_Float128 x)
     }
   SET_LDOUBLE_WORDS64 (x, hx, lx);
   return x;
+#endif /* ! USE_ROUNDEVENL_BUILTIN  */
 }
 libm_alias_ldouble (__roundeven, roundeven)