mirror of
git://git.musl-libc.org/musl
synced 2025-03-06 20:48:29 +01:00
fix excess precision in return value of i386 log-family functions
This commit is contained in:
parent
141c8d4ccb
commit
ab9e20905d
8 changed files with 20 additions and 0 deletions
|
@ -4,4 +4,6 @@ log:
|
|||
fldln2
|
||||
fldl 4(%esp)
|
||||
fyl2x
|
||||
fstpl 4(%esp)
|
||||
fldl 4(%esp)
|
||||
ret
|
||||
|
|
|
@ -4,4 +4,6 @@ log10:
|
|||
fldlg2
|
||||
fldl 4(%esp)
|
||||
fyl2x
|
||||
fstpl 4(%esp)
|
||||
fldl 4(%esp)
|
||||
ret
|
||||
|
|
|
@ -4,4 +4,6 @@ log10f:
|
|||
fldlg2
|
||||
flds 4(%esp)
|
||||
fyl2x
|
||||
fstps 4(%esp)
|
||||
flds 4(%esp)
|
||||
ret
|
||||
|
|
|
@ -10,10 +10,14 @@ log1p:
|
|||
cmp $0x00100000,%eax
|
||||
jb 2f
|
||||
fyl2xp1
|
||||
fstpl 4(%esp)
|
||||
fldl 4(%esp)
|
||||
ret
|
||||
1: fld1
|
||||
faddp
|
||||
fyl2x
|
||||
fstpl 4(%esp)
|
||||
fldl 4(%esp)
|
||||
ret
|
||||
# subnormal x, return x with underflow
|
||||
2: fsts 4(%esp)
|
||||
|
|
|
@ -10,10 +10,14 @@ log1pf:
|
|||
cmp $0x00800000,%eax
|
||||
jb 2f
|
||||
fyl2xp1
|
||||
fstps 4(%esp)
|
||||
flds 4(%esp)
|
||||
ret
|
||||
1: fld1
|
||||
faddp
|
||||
fyl2x
|
||||
fstps 4(%esp)
|
||||
flds 4(%esp)
|
||||
ret
|
||||
# subnormal x, return x with underflow
|
||||
2: fxch
|
||||
|
|
|
@ -4,4 +4,6 @@ log2:
|
|||
fld1
|
||||
fldl 4(%esp)
|
||||
fyl2x
|
||||
fstpl 4(%esp)
|
||||
fldl 4(%esp)
|
||||
ret
|
||||
|
|
|
@ -4,4 +4,6 @@ log2f:
|
|||
fld1
|
||||
flds 4(%esp)
|
||||
fyl2x
|
||||
fstps 4(%esp)
|
||||
flds 4(%esp)
|
||||
ret
|
||||
|
|
|
@ -4,4 +4,6 @@ logf:
|
|||
fldln2
|
||||
flds 4(%esp)
|
||||
fyl2x
|
||||
fstps 4(%esp)
|
||||
flds 4(%esp)
|
||||
ret
|
||||
|
|
Loading…
Add table
Reference in a new issue