asm for scalbn family
unlike some implementations, these functions perform the equivalent of gcc's -ffloat-store on the result before returning. this is necessary to raise underflow/overflow/inexact exceptions, perform the correct rounding with denormals, etc.
This commit is contained in:
parent
bc33e61704
commit
58ff9e8eaf
9 changed files with 64 additions and 0 deletions
1
src/math/i386/ldexp.s
Normal file
1
src/math/i386/ldexp.s
Normal file
|
|
@ -0,0 +1 @@
|
|||
# see scalbn.s
|
||||
1
src/math/i386/ldexpf.s
Normal file
1
src/math/i386/ldexpf.s
Normal file
|
|
@ -0,0 +1 @@
|
|||
# see scalbnf.s
|
||||
1
src/math/i386/ldexpl.s
Normal file
1
src/math/i386/ldexpl.s
Normal file
|
|
@ -0,0 +1 @@
|
|||
# see scalbnl.s
|
||||
1
src/math/i386/scalbln.s
Normal file
1
src/math/i386/scalbln.s
Normal file
|
|
@ -0,0 +1 @@
|
|||
# see scalbn.s
|
||||
1
src/math/i386/scalblnf.s
Normal file
1
src/math/i386/scalblnf.s
Normal file
|
|
@ -0,0 +1 @@
|
|||
# see scalbnf.s
|
||||
1
src/math/i386/scalblnl.s
Normal file
1
src/math/i386/scalblnl.s
Normal file
|
|
@ -0,0 +1 @@
|
|||
# see scalbnl.s
|
||||
20
src/math/i386/scalbn.s
Normal file
20
src/math/i386/scalbn.s
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
.global ldexp
|
||||
.type ldexp,@function
|
||||
ldexp:
|
||||
nop
|
||||
|
||||
.global scalbln
|
||||
.type scalbln,@function
|
||||
scalbln:
|
||||
nop
|
||||
|
||||
.global scalbn
|
||||
.type scalbn,@function
|
||||
scalbn:
|
||||
fildl 12(%esp)
|
||||
fldl 4(%esp)
|
||||
fscale
|
||||
fstp %st(1)
|
||||
fstpl 4(%esp)
|
||||
fldl 4(%esp)
|
||||
ret
|
||||
20
src/math/i386/scalbnf.s
Normal file
20
src/math/i386/scalbnf.s
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
.global ldexpf
|
||||
.type ldexpf,@function
|
||||
ldexpf:
|
||||
nop
|
||||
|
||||
.global scalblnf
|
||||
.type scalblnf,@function
|
||||
scalblnf:
|
||||
nop
|
||||
|
||||
.global scalbnf
|
||||
.type scalbnf,@function
|
||||
scalbnf:
|
||||
fildl 8(%esp)
|
||||
flds 4(%esp)
|
||||
fscale
|
||||
fstp %st(1)
|
||||
fstps 4(%esp)
|
||||
flds 4(%esp)
|
||||
ret
|
||||
18
src/math/i386/scalbnl.s
Normal file
18
src/math/i386/scalbnl.s
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
.global ldexpl
|
||||
.type ldexpl,@function
|
||||
ldexpl:
|
||||
nop
|
||||
|
||||
.global scalblnl
|
||||
.type scalblnl,@function
|
||||
scalblnl:
|
||||
nop
|
||||
|
||||
.global scalbnl
|
||||
.type scalbnl,@function
|
||||
scalbnl:
|
||||
fildl 16(%esp)
|
||||
fldt 4(%esp)
|
||||
fscale
|
||||
fstp %st(1)
|
||||
ret
|
||||
Loading…
Add table
Add a link
Reference in a new issue