From ec4318943a26d4bd4050481d11709853184f2794 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 5 Nov 2014 22:13:58 +0100 Subject: 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. --- src/math/i386/fmod.s | 2 +- src/math/i386/fmodf.s | 2 +- src/math/i386/fmodl.s | 2 +- src/math/i386/remainder.s | 2 +- src/math/i386/remainderf.s | 2 +- src/math/i386/remainderl.s | 2 +- src/math/i386/sqrt.s | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/math/i386') diff --git a/src/math/i386/fmod.s b/src/math/i386/fmod.s index 069fbfe7..2113b3c5 100644 --- a/src/math/i386/fmod.s +++ b/src/math/i386/fmod.s @@ -4,7 +4,7 @@ fmod: fldl 12(%esp) fldl 4(%esp) 1: fprem - fstsw %ax + fnstsw %ax sahf jp 1b fstp %st(1) diff --git a/src/math/i386/fmodf.s b/src/math/i386/fmodf.s index d99c80f2..e04e2a56 100644 --- a/src/math/i386/fmodf.s +++ b/src/math/i386/fmodf.s @@ -4,7 +4,7 @@ fmodf: flds 8(%esp) flds 4(%esp) 1: fprem - fstsw %ax + fnstsw %ax sahf jp 1b fstp %st(1) diff --git a/src/math/i386/fmodl.s b/src/math/i386/fmodl.s index 7e07e7b5..0cb3fe9b 100644 --- a/src/math/i386/fmodl.s +++ b/src/math/i386/fmodl.s @@ -4,7 +4,7 @@ fmodl: fldt 16(%esp) fldt 4(%esp) 1: fprem - fstsw %ax + fnstsw %ax sahf jp 1b fstp %st(1) diff --git a/src/math/i386/remainder.s b/src/math/i386/remainder.s index 7f4be051..ab1da95d 100644 --- a/src/math/i386/remainder.s +++ b/src/math/i386/remainder.s @@ -7,7 +7,7 @@ drem: fldl 12(%esp) fldl 4(%esp) 1: fprem1 - fstsw %ax + fnstsw %ax sahf jp 1b fstp %st(1) diff --git a/src/math/i386/remainderf.s b/src/math/i386/remainderf.s index ac6e3677..6a7378a3 100644 --- a/src/math/i386/remainderf.s +++ b/src/math/i386/remainderf.s @@ -7,7 +7,7 @@ dremf: flds 8(%esp) flds 4(%esp) 1: fprem1 - fstsw %ax + fnstsw %ax sahf jp 1b fstp %st(1) diff --git a/src/math/i386/remainderl.s b/src/math/i386/remainderl.s index 00978729..b41518ed 100644 --- a/src/math/i386/remainderl.s +++ b/src/math/i386/remainderl.s @@ -4,7 +4,7 @@ remainderl: fldt 16(%esp) fldt 4(%esp) 1: fprem1 - fstsw %ax + fnstsw %ax sahf jp 1b fstp %st(1) diff --git a/src/math/i386/sqrt.s b/src/math/i386/sqrt.s index 8289d094..57837e25 100644 --- a/src/math/i386/sqrt.s +++ b/src/math/i386/sqrt.s @@ -2,7 +2,7 @@ .type sqrt,@function sqrt: fldl 4(%esp) fsqrt - fstsw %ax + fnstsw %ax sub $12,%esp fld %st(0) fstpt (%esp) -- cgit v1.2.3-70-g09d2