Browse Source

* compiler procs fixes.

git-svn-id: trunk@3643 -
yury 19 years ago
parent
commit
ae68c07f5d
1 changed files with 21 additions and 9 deletions
  1. 21 9
      rtl/wince/system.pp

+ 21 - 9
rtl/wince/system.pp

@@ -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,17 +220,29 @@ begin
 end;
 end;
 
 
 {$define FPC_SYSTEM_HAS_TRUNC}
 {$define FPC_SYSTEM_HAS_TRUNC}
-function fpc_trunc_real(d : ValReal) : int64;compilerproc;
-   external 'coredll' name '__dtoi64';
+function __dtoi64(d: double) : int64; external 'coredll';
+
+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;
-   external 'coredll' name 'fabs';
+function fabs(d: double): double; external 'coredll';
+
+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;
-   external 'coredll' name 'sqrt';
-   
+function coresqrt(d: double): double; 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
   adds := addd(s1, s2);
   adds := addd(s1, s2);