diff options
Diffstat (limited to 'sysdeps/x86_64/fpu/e_exp2l.S')
-rw-r--r-- | sysdeps/x86_64/fpu/e_exp2l.S | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/x86_64/fpu/e_exp2l.S b/sysdeps/x86_64/fpu/e_exp2l.S index 7abf425c7b..7d42a932db 100644 --- a/sysdeps/x86_64/fpu/e_exp2l.S +++ b/sysdeps/x86_64/fpu/e_exp2l.S @@ -19,7 +19,15 @@ ENTRY(__ieee754_exp2l) andb %ah, %dh cmpb $0x05, %dh je 1f /* Is +-Inf, jump. */ - fld %st + movzwl 8+8(%rsp), %eax + andl $0x7fff, %eax + cmpl $0x3fbe, %eax + jge 3f + /* Argument's exponent below -65, result rounds to 1. */ + fld1 + faddp + ret +3: fld %st frndint /* int(x) */ fsubr %st,%st(1) /* fract(x) */ fxch |