about summary refs log tree commit diff
path: root/sysdeps/alpha/fpu/s_lroundf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/alpha/fpu/s_lroundf.c')
-rw-r--r--sysdeps/alpha/fpu/s_lroundf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/alpha/fpu/s_lroundf.c b/sysdeps/alpha/fpu/s_lroundf.c
index 650004dbc1..ebbb1295a4 100644
--- a/sysdeps/alpha/fpu/s_lroundf.c
+++ b/sysdeps/alpha/fpu/s_lroundf.c
@@ -25,11 +25,11 @@
 long int
 __lroundf (float x)
 {
-  float adj;
+  float adj, y;
 
-  adj = 0x1.fffffep-2;		/* nextafterf (0.5f, 0.0f) */
-  adj = copysignf (adj, x);
-  return x + adj;
+  adj = copysignf (0.5f, x);
+  asm("adds/suc %1,%2,%0" : "=&f"(y) : "f"(x), "f"(adj));
+  return y;
 }
 
 strong_alias (__lroundf, __llroundf)