diff options
| author | Szabolcs Nagy <nsz@port70.net> | 2014-11-05 22:13:58 +0100 |
|---|---|---|
| committer | Szabolcs Nagy <nsz@port70.net> | 2014-11-05 22:13:58 +0100 |
| commit | ec4318943a26d4bd4050481d11709853184f2794 (patch) | |
| tree | 57ea5ca863de0d2a6e96f52787f9d9ba29cd14a0 /src/math/x86_64 | |
| parent | math: fix x86_64 and x32 asm not to use sahf instruction (diff) | |
| download | grovel-ec4318943a26d4bd4050481d11709853184f2794.tar.gz grovel-ec4318943a26d4bd4050481d11709853184f2794.tar.xz | |
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.
Diffstat (limited to 'src/math/x86_64')
| -rw-r--r-- | src/math/x86_64/fmodl.s | 2 | ||||
| -rw-r--r-- | src/math/x86_64/remainderl.s | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/math/x86_64/fmodl.s b/src/math/x86_64/fmodl.s index cd8d2b7c..ea07b402 100644 --- a/src/math/x86_64/fmodl.s +++ b/src/math/x86_64/fmodl.s @@ -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) diff --git a/src/math/x86_64/remainderl.s b/src/math/x86_64/remainderl.s index 2c337cf5..cb3857b4 100644 --- a/src/math/x86_64/remainderl.s +++ b/src/math/x86_64/remainderl.s @@ -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) |
