浏览代码

* use the fpu on suitable x86 targets to copy extended values

git-svn-id: trunk@45718 -
florian 5 年之前
父节点
当前提交
8f91920c9b
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      compiler/ncgld.pas

+ 7 - 1
compiler/ncgld.pas

@@ -75,6 +75,7 @@ implementation
       aasmbase,
       aasmbase,
       cgbase,pass_2,
       cgbase,pass_2,
       procinfo,
       procinfo,
+      cpuinfo,
       cpubase,parabase,
       cpubase,parabase,
       tgobj,
       tgobj,
       cgobj,hlcgobj,
       cgobj,hlcgobj,
@@ -878,7 +879,12 @@ implementation
                       begin
                       begin
                         if (left.resultdef.typ=floatdef) and
                         if (left.resultdef.typ=floatdef) and
                            (right.resultdef.typ=floatdef) and
                            (right.resultdef.typ=floatdef) and
-                           (left.location.size<>right.location.size) then
+                           ((left.location.size<>right.location.size)
+                           { on newer (1993+ :)) x86 cpus, use the fpu to copy extended values }
+{$ifdef x86}
+                            or ({$ifndef x86_64}(current_settings.cputype>=cpu_Pentium) and{$endif x86_64} (is_extended(right.resultdef)))
+{$endif x86}
+                           )then
                           begin
                           begin
                             { assume that all float types can be handed by the
                             { assume that all float types can be handed by the
                               fpu if one can be handled by the fpu }
                               fpu if one can be handled by the fpu }