Parcourir la source

* m68k: fixed OP_NOT/OP_NEG with two registers, it must never modify the source register.

git-svn-id: trunk@28097 -
sergei il y a 11 ans
Parent
commit
535218e837
1 fichiers modifiés avec 3 ajouts et 5 suppressions
  1. 3 5
      compiler/m68k/cgcpu.pas

+ 3 - 5
compiler/m68k/cgcpu.pas

@@ -1262,12 +1262,10 @@ unit cgcpu;
                 { if there are two operands, move the register,
                   since the operation will only be done on the result
                   register. }
-                if src <> NR_NO then
-                  hreg1:=src
-                else
-                  hreg1:=dst;
+                if (src<>dst) then
+                  a_load_reg_reg(list,size,size,src,dst);
 
-                hreg2 := force_to_dataregister(list, size, hreg1);
+                hreg2 := force_to_dataregister(list, size, dst);
 
                 { coldfire only supports long version }
                 if current_settings.cputype in cpu_ColdFire then