about summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/fpu/e_hypot.S13
1 files changed, 12 insertions, 1 deletions
diff --git a/sysdeps/i386/fpu/e_hypot.S b/sysdeps/i386/fpu/e_hypot.S
index 5323fde01e..e69ea096ab 100644
--- a/sysdeps/i386/fpu/e_hypot.S
+++ b/sysdeps/i386/fpu/e_hypot.S
@@ -20,8 +20,19 @@
 #include <sysdep.h>
 #include <i386-math-asm.h>
 
+DEFINE_DBL_MIN
+
+#ifdef PIC
+# define MO(op) op##@GOTOFF(%edx)
+#else
+# define MO(op) op
+#endif
+
 	.text
 ENTRY(__ieee754_hypot)
+#ifdef  PIC
+	LOAD_PIC_REG (dx)
+#endif
 	fldl	4(%esp)		// x
 	fxam
 	fnstsw
@@ -38,7 +49,7 @@ ENTRY(__ieee754_hypot)
 	fmul	%st(0)		// x * x : y * y
 	faddp			// x * x + y * y
 	fsqrt
-	DBL_NARROW_EVAL
+	DBL_NARROW_EVAL_UFLOW_NONNEG
 2:	ret
 
 	// We have to test whether any of the parameters is Inf.