mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 04:49:19 +02:00
* x86-64: math helpers do not need a stackframe
This commit is contained in:
parent
aff2a42431
commit
a45ba3add5
@ -16,18 +16,18 @@
|
|||||||
|
|
||||||
{$ifdef FPC_HAS_TYPE_EXTENDED}
|
{$ifdef FPC_HAS_TYPE_EXTENDED}
|
||||||
{$define FPC_MATH_HAS_ARCTAN2}
|
{$define FPC_MATH_HAS_ARCTAN2}
|
||||||
function arctan2(y,x : float) : float;assembler;
|
function arctan2(y,x : float) : float;assembler;nostackframe;
|
||||||
asm
|
asm
|
||||||
fldt y
|
fldt 8(%rsp)
|
||||||
fldt x
|
fldt 24(%rsp)
|
||||||
fpatan
|
fpatan
|
||||||
fwait
|
fwait
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$define FPC_MATH_HAS_TAN}
|
{$define FPC_MATH_HAS_TAN}
|
||||||
function tan(x : float) : float;assembler;
|
function tan(x : float) : float;assembler;nostackframe;
|
||||||
asm
|
asm
|
||||||
fldt X
|
fldt 8(%rsp)
|
||||||
fptan
|
fptan
|
||||||
fstp %st
|
fstp %st
|
||||||
fwait
|
fwait
|
||||||
@ -35,9 +35,9 @@ function tan(x : float) : float;assembler;
|
|||||||
|
|
||||||
|
|
||||||
{$define FPC_MATH_HAS_COTAN}
|
{$define FPC_MATH_HAS_COTAN}
|
||||||
function cotan(x : float) : float;assembler;
|
function cotan(x : float) : float;assembler;nostackframe;
|
||||||
asm
|
asm
|
||||||
fldt X
|
fldt 8(%rsp)
|
||||||
fptan
|
fptan
|
||||||
fdivp %st,%st(1)
|
fdivp %st,%st(1)
|
||||||
fwait
|
fwait
|
||||||
@ -45,10 +45,10 @@ function cotan(x : float) : float;assembler;
|
|||||||
|
|
||||||
|
|
||||||
{$define FPC_MATH_HAS_LOG2}
|
{$define FPC_MATH_HAS_LOG2}
|
||||||
function log2(x : float) : float;assembler;
|
function log2(x : float) : float;assembler;nostackframe;
|
||||||
asm
|
asm
|
||||||
fld1
|
fld1
|
||||||
fldt x
|
fldt 8(%rsp)
|
||||||
fyl2x
|
fyl2x
|
||||||
fwait
|
fwait
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user