math: use fnstsw consistently instead of fstsw in x87 asm

fnstsw does not wait for pending unmasked x87 floating-point exceptions
and it is the same as fstsw when all exceptions are masked which is the
only environment libc supports.
This commit is contained in:
Szabolcs Nagy 2014-11-05 22:13:58 +01:00
parent a732e80d33
commit ec4318943a
11 changed files with 11 additions and 11 deletions

View File

@ -4,7 +4,7 @@ fmod:
fldl 12(%esp)
fldl 4(%esp)
1: fprem
fstsw %ax
fnstsw %ax
sahf
jp 1b
fstp %st(1)

View File

@ -4,7 +4,7 @@ fmodf:
flds 8(%esp)
flds 4(%esp)
1: fprem
fstsw %ax
fnstsw %ax
sahf
jp 1b
fstp %st(1)

View File

@ -4,7 +4,7 @@ fmodl:
fldt 16(%esp)
fldt 4(%esp)
1: fprem
fstsw %ax
fnstsw %ax
sahf
jp 1b
fstp %st(1)

View File

@ -7,7 +7,7 @@ drem:
fldl 12(%esp)
fldl 4(%esp)
1: fprem1
fstsw %ax
fnstsw %ax
sahf
jp 1b
fstp %st(1)

View File

@ -7,7 +7,7 @@ dremf:
flds 8(%esp)
flds 4(%esp)
1: fprem1
fstsw %ax
fnstsw %ax
sahf
jp 1b
fstp %st(1)

View File

@ -4,7 +4,7 @@ remainderl:
fldt 16(%esp)
fldt 4(%esp)
1: fprem1
fstsw %ax
fnstsw %ax
sahf
jp 1b
fstp %st(1)

View File

@ -2,7 +2,7 @@
.type sqrt,@function
sqrt: fldl 4(%esp)
fsqrt
fstsw %ax
fnstsw %ax
sub $12,%esp
fld %st(0)
fstpt (%esp)

View File

@ -4,7 +4,7 @@ fmodl:
fldt 24(%esp)
fldt 8(%esp)
1: fprem
fstsw %ax
fnstsw %ax
testb $4,%ah
jnz 1b
fstp %st(1)

View File

@ -4,7 +4,7 @@ remainderl:
fldt 24(%esp)
fldt 8(%esp)
1: fprem1
fstsw %ax
fnstsw %ax
testb $4,%ah
jnz 1b
fstp %st(1)

View File

@ -4,7 +4,7 @@ fmodl:
fldt 24(%rsp)
fldt 8(%rsp)
1: fprem
fstsw %ax
fnstsw %ax
testb $4,%ah
jnz 1b
fstp %st(1)

View File

@ -4,7 +4,7 @@ remainderl:
fldt 24(%rsp)
fldt 8(%rsp)
1: fprem1
fstsw %ax
fnstsw %ax
testb $4,%ah
jnz 1b
fstp %st(1)