summaryrefslogtreecommitdiff
path: root/src/math/x32
AgeCommit message (Collapse)AuthorFilesLines
2018-10-15x86_64: add single instruction fmaSzabolcs Nagy2-0/+46
fma is only available on recent x86_64 cpus and it is much faster than a software fma, so this should be done with a runtime check, however that requires more changes, this patch just adds the code so it can be tested when musl is compiled with -mfma or -mfma4.
2015-04-23fix regression in x86_64 math asm with old binutilsRich Felker1-3/+3
the implicit-operand form of fucomip is rejected by binutils 2.19 and perhaps other versions still in use. writing both operands explicitly fixes the issue. there is no change to the resulting output. commit a732e80d33b4fd6f510f7cec4f5573ef5d89bc4e was the source of this regression.
2015-04-18remove potentially PIC-incompatible relocations from x86_64 and x32 asmRich Felker1-1/+1
analogous to commit 8ed66ecbcba1dd0f899f22b534aac92a282f42d5 for i386.
2014-11-05math: use fnstsw consistently instead of fstsw in x87 asmSzabolcs Nagy2-2/+2
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.
2014-11-05math: fix x86_64 and x32 asm not to use sahf instructionSzabolcs Nagy3-14/+7
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.
2014-02-23x32 port (diff against vanilla x86_64)rofl0r18-69/+69
2014-02-23import vanilla x86_64 code as x32rofl0r30-0/+396