* removed stackframe for fpc_round_real() and fpc_trunc_real()

+ additional fpc_int_real() assembly method

git-svn-id: trunk@3728 -
This commit is contained in:
tom_at_work 2006-05-28 21:42:33 +00:00
parent 53103216ef
commit b74142460f

View File

@ -43,28 +43,31 @@ begin
end;
{$define FPC_SYSTEM_HAS_TRUNC}
function fpc_trunc_real(d : valreal) : int64;compilerproc; assembler;
function fpc_trunc_real(d : valreal) : int64;compilerproc; assembler; nostackframe;
{ input: d in fr1 }
{ output: result in r3 }
var
temp : int64;
asm
fctidz f1, f1
stfd f1, temp
ld r3, temp
stfd f1, -8(r1)
ld r3, -8(r1)
end;
{$define FPC_SYSTEM_HAS_INT}
function fpc_int_real(d : valreal) : valreal;compilerproc; assembler; nostackframe;
asm
fctidz f2, f1
fcfid f1, f2
end;
{$define FPC_SYSTEM_HAS_ROUND}
function fpc_round_real(d : valreal) : int64; compilerproc;assembler;
function fpc_round_real(d : valreal) : int64; compilerproc;assembler; nostackframe;
{ exactly the same as trunc, except that one fctiwz has become fctiw }
{ input: d in fr1 }
{ output: result in r3 }
var
temp: int64;
asm
fctid f1, f1
stfd f1, temp
ld r3, temp
stfd f1, -8(r1)
ld r3, -8(r1)
end;
{****************************************************************************