History log of /seL4-camkes-master/projects/musllibc/src/math/x86_64_sel4/fmodl.s
Revision Date Author Comments
# ec431894 05-Nov-2014 Szabolcs Nagy <nsz@port70.net>

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.


# a732e80d 05-Nov-2014 Szabolcs Nagy <nsz@port70.net>

math: fix x86_64 and x32 asm not to use sahf instruction

Some early x86_64 cpus (released before 2006) did not support sahf/lahf
instructions so they should be avoided (intel manual says they are only
supported if CPUID.80000001H:ECX.LAHF-SAHF[bit 0] = 1).

The workaround simplifies exp2l and expm1l because fucomip can be
used instead of the fucomp;fnstsw;sahf sequence copied from i386.

In fmodl and remainderl sahf is replaced by a simple bit test.


# b9351477 18-Mar-2012 Rich Felker <dalias@aerifal.cx>

assembly optimizations for fmod/remainder functions