Merge branch 'master' of git://git.etalabs.net/musl
This commit is contained in:
commit
03c52e137a
4 changed files with 72 additions and 24 deletions
|
|
@ -2,40 +2,49 @@
|
||||||
.type remquof,@function
|
.type remquof,@function
|
||||||
remquof:
|
remquof:
|
||||||
mov 12(%esp),%ecx
|
mov 12(%esp),%ecx
|
||||||
fldl 4(%esp)
|
|
||||||
fldl 8(%esp)
|
fldl 8(%esp)
|
||||||
|
fldl 4(%esp)
|
||||||
|
mov 11(%esp),%dh
|
||||||
|
xor 7(%esp),%dh
|
||||||
jmp 1f
|
jmp 1f
|
||||||
|
|
||||||
.global remquol
|
.global remquol
|
||||||
.type remquol,@function
|
.type remquol,@function
|
||||||
remquol:
|
remquol:
|
||||||
mov 28(%esp),%ecx
|
mov 28(%esp),%ecx
|
||||||
fldl 4(%esp)
|
|
||||||
fldl 16(%esp)
|
fldl 16(%esp)
|
||||||
|
fldl 4(%esp)
|
||||||
|
mov 25(%esp),%dh
|
||||||
|
xor 13(%esp),%dh
|
||||||
jmp 1f
|
jmp 1f
|
||||||
|
|
||||||
.global remquo
|
.global remquo
|
||||||
.type remquo,@function
|
.type remquo,@function
|
||||||
remquo:
|
remquo:
|
||||||
mov 20(%esp),%ecx
|
mov 20(%esp),%ecx
|
||||||
fldl 4(%esp)
|
|
||||||
fldl 12(%esp)
|
fldl 12(%esp)
|
||||||
1: fld %st(1)
|
fldl 4(%esp)
|
||||||
|
mov 19(%esp),%dh
|
||||||
|
xor 11(%esp),%dh
|
||||||
1: fprem1
|
1: fprem1
|
||||||
fnstsw %ax
|
fnstsw %ax
|
||||||
sahf
|
sahf
|
||||||
jp 1b
|
jp 1b
|
||||||
fsubr %st(0),%st(2)
|
fstp %st(1)
|
||||||
fxch %st(2)
|
mov %ah,%dl
|
||||||
fdivp
|
shr %dl
|
||||||
mov $0x4f000000,%eax
|
and $1,%dl
|
||||||
mov %eax,4(%esp)
|
mov %ah,%al
|
||||||
flds 4(%esp)
|
shr $5,%al
|
||||||
fxch %st(1)
|
and $2,%al
|
||||||
1: fprem
|
or %al,%dl
|
||||||
fnstsw %ax
|
mov %ah,%al
|
||||||
sahf
|
shl $2,%al
|
||||||
jp 1b
|
and $4,%al
|
||||||
fistpl (%ecx)
|
or %al,%dl
|
||||||
fstp %st(0)
|
test %dh,%dh
|
||||||
|
jns 1f
|
||||||
|
neg %dl
|
||||||
|
1: movsbl %dl,%edx
|
||||||
|
mov %edx,(%ecx)
|
||||||
ret
|
ret
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,23 @@ scalbln:
|
||||||
.global scalbn
|
.global scalbn
|
||||||
.type scalbn,@function
|
.type scalbn,@function
|
||||||
scalbn:
|
scalbn:
|
||||||
fildl 12(%esp)
|
mov 12(%esp),%eax
|
||||||
|
add $0x3ffe,%eax
|
||||||
|
cmp $0x7ffd,%eax
|
||||||
|
jb 1f
|
||||||
|
sub $0x3ffe,%eax
|
||||||
|
sar $31,%eax
|
||||||
|
xor $0xfff,%eax
|
||||||
|
add $0x3ffe,%eax
|
||||||
|
1: inc %eax
|
||||||
fldl 4(%esp)
|
fldl 4(%esp)
|
||||||
fscale
|
mov %eax,12(%esp)
|
||||||
fstp %st(1)
|
mov $0x80000000,%eax
|
||||||
|
mov %eax,8(%esp)
|
||||||
|
xor %eax,%eax
|
||||||
|
mov %eax,4(%esp)
|
||||||
|
fldt 4(%esp)
|
||||||
|
fmulp
|
||||||
fstpl 4(%esp)
|
fstpl 4(%esp)
|
||||||
fldl 4(%esp)
|
fldl 4(%esp)
|
||||||
ret
|
ret
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,22 @@ scalblnf:
|
||||||
.global scalbnf
|
.global scalbnf
|
||||||
.type scalbnf,@function
|
.type scalbnf,@function
|
||||||
scalbnf:
|
scalbnf:
|
||||||
fildl 8(%esp)
|
mov 8(%esp),%eax
|
||||||
|
add $0x3fe,%eax
|
||||||
|
cmp $0x7fd,%eax
|
||||||
|
jb 1f
|
||||||
|
sub $0x3fe,%eax
|
||||||
|
sar $31,%eax
|
||||||
|
xor $0x1ff,%eax
|
||||||
|
add $0x3fe,%eax
|
||||||
|
1: inc %eax
|
||||||
|
shl $20,%eax
|
||||||
flds 4(%esp)
|
flds 4(%esp)
|
||||||
fscale
|
mov %eax,8(%esp)
|
||||||
fstp %st(1)
|
xor %eax,%eax
|
||||||
|
mov %eax,4(%esp)
|
||||||
|
fldl 4(%esp)
|
||||||
|
fmulp
|
||||||
fstps 4(%esp)
|
fstps 4(%esp)
|
||||||
flds 4(%esp)
|
flds 4(%esp)
|
||||||
ret
|
ret
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,21 @@ scalblnl:
|
||||||
.global scalbnl
|
.global scalbnl
|
||||||
.type scalbnl,@function
|
.type scalbnl,@function
|
||||||
scalbnl:
|
scalbnl:
|
||||||
fildl 16(%esp)
|
mov 16(%esp),%eax
|
||||||
|
add $0x3ffe,%eax
|
||||||
|
cmp $0x7ffd,%eax
|
||||||
|
jae 1f
|
||||||
|
inc %eax
|
||||||
|
fldt 4(%esp)
|
||||||
|
mov %eax,12(%esp)
|
||||||
|
mov $0x80000000,%eax
|
||||||
|
mov %eax,8(%esp)
|
||||||
|
xor %eax,%eax
|
||||||
|
mov %eax,4(%esp)
|
||||||
|
fldt 4(%esp)
|
||||||
|
fmulp
|
||||||
|
ret
|
||||||
|
1: fildl 16(%esp)
|
||||||
fldt 4(%esp)
|
fldt 4(%esp)
|
||||||
fscale
|
fscale
|
||||||
fstp %st(1)
|
fstp %st(1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue