diff options
Diffstat (limited to 'sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S')
-rw-r--r-- | sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S index 467e39b81c..5ad89a1486 100644 --- a/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S +++ b/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S @@ -1,5 +1,5 @@ /* llround function. PowerPC32 on PowerPC64 version. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,6 +18,8 @@ #include <sysdep.h> #include <math_ldbl_opt.h> +#include <libm-alias-float.h> +#include <libm-alias-double.h> .section .rodata.cst8,"aM",@progbits,8 .align 3 @@ -69,6 +71,11 @@ ENTRY (__llround) fcmpu cr1,fp1,fp12 /* x is negative? x < 0.0 */ blt- cr6,.Lretzero /* 0.5 > x < -0.5 so just return 0. */ bge- cr7,.Lnobias /* 2^52 > x < -2^52 just convert with no bias. */ + /* Test whether an integer to avoid spurious "inexact". */ + fadd fp3,fp2,fp9 + fsub fp3,fp3,fp9 + fcmpu cr5,fp2,fp3 + beq cr5,.Lnobias fadd fp3,fp2,fp10 /* |x|+=0.5 bias to prepare to round. */ bge cr1,.Lconvert /* x is positive so don't negate x. */ fnabs fp3,fp3 /* -(|x|+=0.5) */ @@ -92,15 +99,7 @@ ENTRY (__llround) b .Lconvert END (__llround) -weak_alias (__llround, llround) +libm_alias_double (__llround, llround) strong_alias (__llround, __llroundf) -weak_alias (__llround, llroundf) - -#ifdef NO_LONG_DOUBLE -weak_alias (__llround, llroundl) -strong_alias (__llround, __llroundl) -#endif -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __llround, llroundl, GLIBC_2_1) -#endif +libm_alias_float (__llround, llround) |