Browse Source

* fixed sse addition if operands were swapped and in float registers

git-svn-id: trunk@3885 -
florian 19 years ago
parent
commit
6ffe481799
1 changed files with 4 additions and 0 deletions
  1. 4 0
      compiler/x86/nx86add.pas

+ 4 - 0
compiler/x86/nx86add.pas

@@ -725,6 +725,10 @@ unit nx86add;
           end
         else
           begin
+            if not(nf_swaped in flags) then
+              if right.location.loc in [LOC_FPUREGISTER,LOC_CFPUREGISTER] then
+                location_force_mem(exprasmlist,right.location);
+
             location_force_mmregscalar(current_asmdata.CurrAsmList,left.location,false);
             location.register:=left.location.register;
             { force floating point reg. location to be written to memory,