瀏覽代碼

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

git-svn-id: trunk@28097 -
sergei 11 年之前
父節點
當前提交
535218e837
共有 1 個文件被更改,包括 3 次插入5 次删除
  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,
                 { if there are two operands, move the register,
                   since the operation will only be done on the result
                   since the operation will only be done on the result
                   register. }
                   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 }
                 { coldfire only supports long version }
                 if current_settings.cputype in cpu_ColdFire then
                 if current_settings.cputype in cpu_ColdFire then