diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/alpha/fpu/s_trunc.c | 7 | ||||
-rw-r--r-- | sysdeps/alpha/fpu/s_truncf.c | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sysdeps/alpha/fpu/s_trunc.c b/sysdeps/alpha/fpu/s_trunc.c index 16cb114a72..4b986a6926 100644 --- a/sysdeps/alpha/fpu/s_trunc.c +++ b/sysdeps/alpha/fpu/s_trunc.c @@ -28,12 +28,11 @@ __trunc (double x) double two52 = copysign (0x1.0p52, x); double r, tmp; + if (isgreaterequal (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)); diff --git a/sysdeps/alpha/fpu/s_truncf.c b/sysdeps/alpha/fpu/s_truncf.c index 2290f28295..3e93356166 100644 --- a/sysdeps/alpha/fpu/s_truncf.c +++ b/sysdeps/alpha/fpu/s_truncf.c @@ -27,12 +27,11 @@ __truncf (float x) float two23 = copysignf (0x1.0p23, x); float r, tmp; + if (isgreaterequal (fabsf (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)); |