Browse Source

* reverted 9727 and made a better fix for it

git-svn-id: trunk@9734 -
florian 17 years ago
parent
commit
b5c114934d
3 changed files with 8 additions and 13 deletions
  1. 0 10
      compiler/cgbase.pas
  2. 2 2
      compiler/ncgld.pas
  3. 6 1
      compiler/nld.pas

+ 0 - 10
compiler/cgbase.pas

@@ -321,9 +321,6 @@ interface
     function int_cgsize(const a: aint): tcgsize;{$ifdef USEINLINE}inline;{$endif}
     function int_float_cgsize(const a: aint): tcgsize;
 
-    { returns true if s is a size handled by the fpu }
-    function isfloatsize(s : tcgsize) : boolean;{$ifdef USEINLINE}inline;{$endif}
-
     { return the inverse condition of opcmp }
     function inverse_opcmp(opcmp: topcmp): topcmp;{$ifdef USEINLINE}inline;{$endif}
 
@@ -675,13 +672,6 @@ implementation
       end;
 
 
-    { returns true if s is a size handled by the fpu }
-    function isfloatsize(s : tcgsize) : boolean;{$ifdef USEINLINE}inline;{$endif}
-      begin
-        result:=s in [OS_F32,OS_F64,OS_F80,OS_C64,OS_F128]
-      end;
-
-
 initialization
   new(mms_movescalar);
   mms_movescalar^.len:=0;

+ 2 - 2
compiler/ncgld.pas

@@ -692,8 +692,8 @@ implementation
                     LOC_REFERENCE,
                     LOC_CREFERENCE :
                       begin
-                        if isfloatsize(left.location.size) and
-                           isfloatsize(right.location.size) and
+                        if (left.resultdef.typ=floatdef) and
+                           (right.resultdef.typ=floatdef) and
                            (left.location.size<>right.location.size) then
                           begin
                             cg.a_loadfpu_ref_ref(current_asmdata.CurrAsmList,

+ 6 - 1
compiler/nld.pas

@@ -151,6 +151,7 @@ implementation
       symnot,
       defutil,defcmp,
       htypechk,pass_1,procinfo,paramgr,
+      cpuinfo,
       ncon,ninl,ncnv,nmem,ncal,nutils,nbas,
       cgobj,cgbase
       ;
@@ -573,7 +574,11 @@ implementation
         { floating point assignments can also perform the conversion directly }
         else if is_real(left.resultdef) and is_real(right.resultdef) and
                 not is_constrealnode(right)
-         
+{$ifdef cpufpemu}
+                { the emulator can't do this obviously }
+                and not(current_settings.fputype in [fpu_libgcc,fpu_soft])
+{$endif cpufpemu}
+
 {$ifdef x86}
                 { the assignment node code can't convert a double in an }
                 { sse register to an extended value in memory more      }