* x86_64 non-Win64 targets: calculate tan() and cotan() using x87 "fptan" instruction.

git-svn-id: trunk@25996 -
This commit is contained in:
sergei 2013-11-09 11:31:27 +00:00
parent 2b1e5f7014
commit 5ea99c84fd

View File

@ -23,6 +23,25 @@ function arctan2(y,x : float) : float;assembler;
fpatan
fwait
end;
{$define FPC_MATH_HAS_TAN}
function tan(x : float) : float;assembler;
asm
fldt X
fptan
fstp %st
fwait
end;
{$define FPC_MATH_HAS_COTAN}
function cotan(x : float) : float;assembler;
asm
fldt X
fptan
fdivp %st,%st(1)
fwait
end;
{$endif FPC_HAS_TYPE_EXTENDED}