Przeglądaj źródła

Merged revisions 3129 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r3129 | florian | 2006-04-02 22:36:20 +0200 (So, 02 Apr 2006) | 2 lines

* fixed left_and_right_must_be_fpureg

........

git-svn-id: branches/fixes_2_0@3884 -

florian 19 lat temu
rodzic
commit
10afb4fb6e
1 zmienionych plików z 5 dodań i 17 usunięć
  1. 5 17
      compiler/x86/nx86add.pas

+ 5 - 17
compiler/x86/nx86add.pas

@@ -215,28 +215,16 @@ unit nx86add;
       begin
         if (right.location.loc<>LOC_FPUREGISTER) then
          begin
-           cg.a_loadfpu_loc_reg(exprasmlist,right.location,NR_ST);
-           if (right.location.loc <> LOC_CFPUREGISTER) then
-             location_freetemp(exprasmlist,left.location);
+           location_force_fpureg(exprasmlist,right.location,false);
            if (left.location.loc<>LOC_FPUREGISTER) then
-            begin
-              cg.a_loadfpu_loc_reg(exprasmlist,left.location,NR_ST);
-              if (left.location.loc <> LOC_CFPUREGISTER) then
-                location_freetemp(exprasmlist,left.location);
-            end
+             location_force_fpureg(exprasmlist,left.location,false)
            else
-            begin
-              { left was on the stack => swap }
-              toggleflag(nf_swaped);
-            end;
+             { left was on the stack => swap }
+             toggleflag(nf_swaped);
          end
         { the nominator in st0 }
         else if (left.location.loc<>LOC_FPUREGISTER) then
-         begin
-           cg.a_loadfpu_loc_reg(exprasmlist,left.location,NR_ST);
-           if (left.location.loc <> LOC_CFPUREGISTER) then
-             location_freetemp(exprasmlist,left.location);
-         end
+          location_force_fpureg(exprasmlist,left.location,false)
         else
          begin
            { fpu operands are always in the wrong order on the stack }