@@ -1,3 +1,12 @@
+2016-07-02 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/alpha/fpu/s_truncf.c (__truncf): Return the input value
+ when its absolute value is greater than 0x1.0p23.
+ [_IEEE_FP_INEXACT] Remove.
+ * sysdeps/alpha/fpu/s_trunc.c (__trunc): Return the input value
+ when its absolute value is greater than 0x1.0p52.
+ [_IEEE_FP_INEXACT] Remove.
+
2016-07-01 Aurelien Jarno <aurelien@aurel32.net>
* sparc/sparc32/sparcv9/fpu/s_nearbyint.S (__nearbyint): Trigger an
@@ -28,12 +28,11 @@ __trunc (double x)
double two52 = copysign (0x1.0p52, x);
double r, tmp;
+ if (!isnan(x) && fabs(x) >= 0x1.0p52)
+ return x;
+
__asm (
-#ifdef _IEEE_FP_INEXACT
- "addt/suic %2, %3, %1\n\tsubt/suic %1, %3, %0"
-#else
"addt/suc %2, %3, %1\n\tsubt/suc %1, %3, %0"
-#endif
: "=&f"(r), "=&f"(tmp)
: "f"(x), "f"(two52));
@@ -27,12 +27,11 @@ __truncf (float x)
float two23 = copysignf (0x1.0p23, x);
float r, tmp;
+ if (!isnan(x) && fabs(x) >= 0x1.0p23)
+ return x;
+
__asm (
-#ifdef _IEEE_FP_INEXACT
- "adds/suic %2, %3, %1\n\tsubs/suic %1, %3, %0"
-#else
"adds/suc %2, %3, %1\n\tsubs/suc %1, %3, %0"
-#endif
: "=&f"(r), "=&f"(tmp)
: "f"(x), "f"(two23));