mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 11:49:27 +02:00
* compiler procs fixes.
git-svn-id: trunk@3643 -
This commit is contained in:
parent
848fa52fa1
commit
ae68c07f5d
@ -197,7 +197,7 @@ function MessageBox(w1:longint;l1,l2:PWideChar;w2:longint):longint;
|
|||||||
procedure memmove(dest, src: pointer; count: longint);
|
procedure memmove(dest, src: pointer; count: longint);
|
||||||
cdecl; external 'coredll' name 'memmove';
|
cdecl; external 'coredll' name 'memmove';
|
||||||
|
|
||||||
procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE'];
|
procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE']; {$ifdef SYSTEMINLINE}inline;{$endif}
|
||||||
begin
|
begin
|
||||||
memmove(@dest, @source, count);
|
memmove(@dest, @source, count);
|
||||||
end;
|
end;
|
||||||
@ -206,7 +206,7 @@ end;
|
|||||||
function memcmp(buf1, buf2: pointer; count: longint): longint;
|
function memcmp(buf1, buf2: pointer; count: longint): longint;
|
||||||
cdecl; external 'coredll' name 'memcmp';
|
cdecl; external 'coredll' name 'memcmp';
|
||||||
|
|
||||||
function CompareByte(Const buf1,buf2;len:SizeInt):SizeInt;
|
function CompareByte(Const buf1,buf2;len:SizeInt):SizeInt; {$ifdef SYSTEMINLINE}inline;{$endif}
|
||||||
begin
|
begin
|
||||||
CompareByte := memcmp(@buf1, @buf2, len);
|
CompareByte := memcmp(@buf1, @buf2, len);
|
||||||
end;
|
end;
|
||||||
@ -220,16 +220,28 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_TRUNC}
|
{$define FPC_SYSTEM_HAS_TRUNC}
|
||||||
function fpc_trunc_real(d : ValReal) : int64;compilerproc;
|
function __dtoi64(d: double) : int64; external 'coredll';
|
||||||
external 'coredll' name '__dtoi64';
|
|
||||||
|
function fpc_trunc_real(d : ValReal) : int64; assembler; nostackframe; compilerproc; {$ifdef SYSTEMINLINE}inline;{$endif}
|
||||||
|
asm
|
||||||
|
bl __dtoi64
|
||||||
|
end;
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_ABS}
|
{$define FPC_SYSTEM_HAS_ABS}
|
||||||
function fpc_abs_real(d : ValReal) : ValReal;compilerproc;
|
function fabs(d: double): double; external 'coredll';
|
||||||
external 'coredll' name 'fabs';
|
|
||||||
|
function fpc_abs_real(d : ValReal) : ValReal; assembler; nostackframe; compilerproc; {$ifdef SYSTEMINLINE}inline;{$endif}
|
||||||
|
asm
|
||||||
|
bl fabs
|
||||||
|
end;
|
||||||
|
|
||||||
{$define FPC_SYSTEM_HAS_SQRT}
|
{$define FPC_SYSTEM_HAS_SQRT}
|
||||||
function fpc_sqrt_real(d : ValReal) : ValReal;compilerproc;
|
function coresqrt(d: double): double; external 'coredll' name 'sqrt';
|
||||||
external 'coredll' name 'sqrt';
|
|
||||||
|
function fpc_sqrt_real(d : ValReal) : ValReal; assembler; nostackframe; compilerproc; {$ifdef SYSTEMINLINE}inline;{$endif}
|
||||||
|
asm
|
||||||
|
bl coresqrt
|
||||||
|
end;
|
||||||
|
|
||||||
function adds(s1,s2 : single) : single;
|
function adds(s1,s2 : single) : single;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user