Browse Source

* don't remove MOV reg1,reg1 it is needed for the RA

peter 21 years ago
parent
commit
d5140a5792
1 changed files with 14 additions and 17 deletions
  1. 14 17
      compiler/sparc/cgcpu.pas

+ 14 - 17
compiler/sparc/cgcpu.pas

@@ -571,14 +571,11 @@ implementation
               OS_32,
               OS_32,
               OS_S32 :
               OS_S32 :
                 begin
                 begin
-                  if reg1<>reg2 then
-                    begin
-                      instr:=taicpu.op_reg_reg(A_MOV,reg1,reg2);
-                      list.Concat(instr);
-                      { Notify the register allocator that we have written a move instruction so
-                        it can try to eliminate it. }
-                      add_move_instruction(instr);
-                    end;
+                  instr:=taicpu.op_reg_reg(A_MOV,reg1,reg2);
+                  list.Concat(instr);
+                  { Notify the register allocator that we have written a move instruction so
+                   it can try to eliminate it. }
+                  add_move_instruction(instr);
                 end;
                 end;
               OS_S8 :
               OS_S8 :
                 begin
                 begin
@@ -597,14 +594,11 @@ implementation
         else
         else
           begin
           begin
             { same size, only a register mov required }
             { same size, only a register mov required }
-            if reg1<>reg2 then
-              begin
-                instr:=taicpu.op_reg_reg(A_MOV,reg1,reg2);
-                list.Concat(instr);
-                { Notify the register allocator that we have written a move instruction so
-                  it can try to eliminate it. }
-                add_move_instruction(instr);
-              end;
+            instr:=taicpu.op_reg_reg(A_MOV,reg1,reg2);
+            list.Concat(instr);
+            { Notify the register allocator that we have written a move instruction so
+              it can try to eliminate it. }
+            add_move_instruction(instr);
           end;
           end;
       end;
       end;
 
 
@@ -1233,7 +1227,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.87  2004-09-21 17:25:13  peter
+  Revision 1.88  2004-09-21 20:33:00  peter
+    * don't remove MOV reg1,reg1 it is needed for the RA
+
+  Revision 1.87  2004/09/21 17:25:13  peter
     * paraloc branch merged
     * paraloc branch merged
 
 
   Revision 1.86.4.5  2004/09/20 20:43:15  peter
   Revision 1.86.4.5  2004/09/20 20:43:15  peter