Browse Source

* fixed ie when "converting" double to double and single to single on softemu

git-svn-id: trunk@2031 -
florian 19 years ago
parent
commit
e4a8f008a7
1 changed files with 10 additions and 1 deletions
  1. 10 1
      compiler/ncnv.pas

+ 10 - 1
compiler/ncnv.pas

@@ -1854,6 +1854,11 @@ implementation
                     case tfloatdef(resulttype.def).typ of
                       s64real:
                         result:=ccallnode.createintern('STOD',ccallparanode.create(left,nil));
+                      s32real:
+                        begin
+                          result:=left;
+                          left:=nil;
+                        end;
                       else
                         internalerror(2005082704);
                     end;
@@ -1861,6 +1866,11 @@ implementation
                     case tfloatdef(resulttype.def).typ of
                       s32real:
                         result:=ccallnode.createintern('DTOS',ccallparanode.create(left,nil));
+                      s64real:
+                        begin
+                          result:=left;
+                          left:=nil;
+                        end;
                       else
                         internalerror(2005082703);
                     end;
@@ -1881,7 +1891,6 @@ implementation
 {$endif cpufpemu}
           begin
             first_real_to_real:=nil;
-            { comp isn't a floating type }
             if registersfpu<1 then
               registersfpu:=1;
             expectloc:=LOC_FPUREGISTER;