Browse Source

* fixed assigning one float loc_reference to another of a different size if a
platform does not support (hl)cg.a_loadfpu_*, but only (hl)cg.a_loadmm_*

git-svn-id: trunk@29820 -

Jonas Maebe 10 năm trước cách đây
mục cha
commit
290e3f5ff8
1 tập tin đã thay đổi với 11 bổ sung3 xóa
  1. 11 3
      compiler/ncgld.pas

+ 11 - 3
compiler/ncgld.pas

@@ -768,9 +768,17 @@ implementation
                            (right.resultdef.typ=floatdef) and
                            (right.resultdef.typ=floatdef) and
                            (left.location.size<>right.location.size) then
                            (left.location.size<>right.location.size) then
                           begin
                           begin
-                            hlcg.a_loadfpu_ref_ref(current_asmdata.CurrAsmList,
-                              right.resultdef,left.resultdef,
-                              right.location.reference,left.location.reference)
+                            { assume that all float types can be handed by the
+                              fpu if one can be handled by the fpu }
+                            if not use_vectorfpu(left.resultdef) or
+                               not use_vectorfpu(right.resultdef) then
+                              hlcg.a_loadfpu_ref_ref(current_asmdata.CurrAsmList,
+                                right.resultdef,left.resultdef,
+                                right.location.reference,left.location.reference)
+                            else
+                              hlcg.a_loadmm_ref_ref(current_asmdata.CurrAsmList,
+                                right.resultdef,left.resultdef,
+                                right.location.reference,left.location.reference,mms_movescalar)
                           end
                           end
                         else
                         else
                           begin
                           begin