aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/i386/fpu/e_expl.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/fpu/e_expl.S')
-rw-r--r--sysdeps/i386/fpu/e_expl.S15
1 files changed, 15 insertions, 0 deletions
diff --git a/sysdeps/i386/fpu/e_expl.S b/sysdeps/i386/fpu/e_expl.S
index af339f0ff4..a8a5e70b07 100644
--- a/sysdeps/i386/fpu/e_expl.S
+++ b/sysdeps/i386/fpu/e_expl.S
@@ -130,9 +130,24 @@ ENTRY(IEEE754_EXPL)
#endif
3: FLDLOG /* 1 log2(base) */
fmul %st(1), %st /* 1 x log2(base) */
+#ifdef USE_AS_EXPM1L
+ /* Set round-to-nearest temporarily. */
+ subl $8, %esp
+ cfi_adjust_cfa_offset (8)
+ fstcw 4(%esp)
+ movl $0xf3ff, %edx
+ andl 4(%esp), %edx
+ movl %edx, (%esp)
+ fldcw (%esp)
+#endif
frndint /* 1 i */
fld %st(1) /* 2 x */
frndint /* 2 xi */
+#ifdef USE_AS_EXPM1L
+ fldcw 4(%esp)
+ addl $8, %esp
+ cfi_adjust_cfa_offset (-8)
+#endif
fld %st(1) /* 3 i */
fldt MO(c0) /* 4 c0 */
fld %st(2) /* 5 xi */