diff options
Diffstat (limited to 'sysdeps/i386/fpu/s_truncl.S')
-rw-r--r-- | sysdeps/i386/fpu/s_truncl.S | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sysdeps/i386/fpu/s_truncl.S b/sysdeps/i386/fpu/s_truncl.S index f92b474d49..98a14cdb37 100644 --- a/sysdeps/i386/fpu/s_truncl.S +++ b/sysdeps/i386/fpu/s_truncl.S @@ -1,5 +1,5 @@ /* Truncate long double value. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -17,21 +17,25 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +#include <libm-alias-ldouble.h> #include <machine/asm.h> ENTRY(__truncl) fldt 4(%esp) - subl $8, %esp - cfi_adjust_cfa_offset (8) - fstcw 4(%esp) + subl $32, %esp + cfi_adjust_cfa_offset (32) + fnstenv 4(%esp) movl $0xc00, %edx orl 4(%esp), %edx movl %edx, (%esp) fldcw (%esp) frndint - fldcw 4(%esp) - addl $8, %esp - cfi_adjust_cfa_offset (-8) + fnstsw + andl $0x1, %eax + orl %eax, 8(%esp) + fldenv 4(%esp) + addl $32, %esp + cfi_adjust_cfa_offset (-32) ret END(__truncl) -weak_alias (__truncl, truncl) +libm_alias_ldouble (__trunc, trunc) |