diff options
Diffstat (limited to 'sysdeps/libm-i387/e_expl.S')
-rw-r--r-- | sysdeps/libm-i387/e_expl.S | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sysdeps/libm-i387/e_expl.S b/sysdeps/libm-i387/e_expl.S index 9103a923aa..e398a90ef6 100644 --- a/sysdeps/libm-i387/e_expl.S +++ b/sysdeps/libm-i387/e_expl.S @@ -18,16 +18,16 @@ ENTRY(__ieee754_expl) -- drepper@cygnus.com. */ fxam /* Is NaN or +-Inf? */ fstsw %ax - sahf - jnc .LnoInfNaN /* No, jump. */ - jp .LisInf /* Is +-Inf, jump. */ -.LnoInfNaN: + movb $0x45, %dh + andb %ah, %dh + cmpb $0x05, %dh + je 1f /* Is +-Inf, jump. */ fldl2e fmulp /* x * log2(e) */ fstl %st(1) frndint /* int(x * log2(e)) */ - fstl %st(2) - fsubrp /* fract(x * log2(e)) */ + fsub %st,%st(1) /* fract(x * log2(e)) */ + fxch f2xm1 /* 2^(fract(x * log2(e))) - 1 */ fld1 faddp /* 2^(fract(x * log2(e))) */ @@ -35,9 +35,8 @@ ENTRY(__ieee754_expl) fstp %st(1) ret -.LisInf: - andb $2, %ah /* Test sign. */ - jz .LpInf /* If positive, jump. */ +1: testl $0x200, %eax /* Test sign. */ + jz 2f /* If positive, jump. */ fldz /* Set result to 0. */ -.LpInf: ret +2: ret END (__ieee754_expl) |