2008-05-05  Aurelien Jarno  <aurelien@aurel32.net>

	* sysdeps/ieee754/ldbl-128/s_nexttowardf.c: Include float.h.
	(__nexttowardf): If FLT_EVAL_METHOD is not 0, force x to float
	using asm.

---
 sysdeps/ieee754/ldbl-128/s_nexttowardf.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- a/sysdeps/ieee754/ldbl-128/s_nexttowardf.c
+++ b/sysdeps/ieee754/ldbl-128/s_nexttowardf.c
@@ -20,6 +20,7 @@
 
 #include <math.h>
 #include <math_private.h>
+#include <float.h>
 
 float __nexttowardf(float x, long double y)
 {
@@ -59,7 +60,13 @@
 	    }
 	}
 	hy = hx&0x7f800000;
-	if(hy>=0x7f800000) return x+x;	/* overflow  */
+        if(hy>=0x7f800000) {
+	  x = x+x;      /* overflow  */
+	  if (FLT_EVAL_METHOD != 0)
+	    /* Force conversion to float.  */
+	    asm ("" : "+m"(x));
+	  return x;
+	}
 	if(hy<0x00800000) {
 	    float u = x*x;		/* underflow */
 	    math_force_eval (u);	/* raise underflow flag */
