Browse Source

* Fixed integer to single conversion for arm-wince. It fixes tw8055.pp test.

git-svn-id: trunk@7757 -
yury 18 years ago
parent
commit
5b5050a09c
2 changed files with 20 additions and 4 deletions
  1. 8 4
      compiler/ncnv.pas
  2. 12 0
      rtl/wince/system.pp

+ 8 - 4
compiler/ncnv.pas

@@ -1995,19 +1995,23 @@ implementation
                 if is_currency(left.resultdef) then
                 if is_currency(left.resultdef) then
                   left.resultdef := s64inttype;
                   left.resultdef := s64inttype;
                 if is_signed(left.resultdef) then
                 if is_signed(left.resultdef) then
-                  fname:='I64TOD'
+                  fname:='I64TO'
                 else
                 else
-                  fname:='UI64TOD';
+                  fname:='UI64TO';
               end
               end
             else
             else
               { other integers are supposed to be 32 bit }
               { other integers are supposed to be 32 bit }
               begin
               begin
                 if is_signed(left.resultdef) then
                 if is_signed(left.resultdef) then
-                  fname:='ITOD'
+                  fname:='ITO'
                 else
                 else
-                  fname:='UTOD';
+                  fname:='UTO';
                 firstpass(left);
                 firstpass(left);
               end;
               end;
+            if tfloatdef(resultdef).floattype=s64real then
+              fname:=fname+'D'
+            else
+              fname:=fname+'S';
             result:=ccallnode.createintern(fname,ccallparanode.create(
             result:=ccallnode.createintern(fname,ccallparanode.create(
               left,nil));
               left,nil));
             left:=nil;
             left:=nil;

+ 12 - 0
rtl/wince/system.pp

@@ -174,6 +174,18 @@ function ui64tod(i : qword) : double; compilerproc;
 
 
 function i64tod(i : int64) : double; compilerproc;
 function i64tod(i : int64) : double; compilerproc;
    cdecl;external 'coredll' name '__i64tod';
    cdecl;external 'coredll' name '__i64tod';
+   
+function utos(i : dword) : single; compilerproc;
+   cdecl;external 'coredll' name '__utos';
+
+function itos(i : longint) : single; compilerproc;
+   cdecl;external 'coredll' name '__itos';
+
+function ui64tos(i : qword) : single; compilerproc;
+   cdecl;external 'coredll' name '__u64tos';
+
+function i64tos(i : int64) : single; compilerproc;
+   cdecl;external 'coredll' name '__i64tos';
 
 
 function adds(s1,s2 : single) : single; compilerproc;
 function adds(s1,s2 : single) : single; compilerproc;
 function subs(s1,s2 : single) : single; compilerproc;
 function subs(s1,s2 : single) : single; compilerproc;