Browse Source

* fixed optimizations in a_op_const_reg_reg()

Jonas Maebe 22 years ago
parent
commit
2c81208d56
1 changed files with 9 additions and 3 deletions
  1. 9 3
      compiler/powerpc/cgcpu.pas

+ 9 - 3
compiler/powerpc/cgcpu.pas

@@ -558,7 +558,9 @@ const
             if (a = 0) then
             if (a = 0) then
               begin
               begin
                 if op = OP_AND then
                 if op = OP_AND then
-                  list.concat(taicpu.op_reg_const(A_LI,dst,0));
+                  list.concat(taicpu.op_reg_const(A_LI,dst,0))
+                else
+                  a_load_reg_reg(list,size,size,src,dst);
                 exit;
                 exit;
               end
               end
             else if (a = high(aword)) then
             else if (a = high(aword)) then
@@ -568,6 +570,8 @@ const
                     list.concat(taicpu.op_reg_const(A_LI,dst,-1));
                     list.concat(taicpu.op_reg_const(A_LI,dst,-1));
                   OP_XOR:
                   OP_XOR:
                     list.concat(taicpu.op_reg_reg(A_NOT,dst,src));
                     list.concat(taicpu.op_reg_reg(A_NOT,dst,src));
+                  OP_AND:
+                    a_load_reg_reg(list,size,size,src,dst);
                 end;
                 end;
                 exit;
                 exit;
               end
               end
@@ -1352,7 +1356,6 @@ const
                  firstreggpr.number:=regcounter2 shl 8;
                  firstreggpr.number:=regcounter2 shl 8;
                  break;
                  break;
               end;
               end;
-            inc(r.number,NR_R1-NR_R0);
           end;
           end;
 
 
       offset:= 0;
       offset:= 0;
@@ -2364,7 +2367,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.86  2003-04-27 11:21:36  peter
+  Revision 1.87  2003-05-11 11:07:33  jonas
+    * fixed optimizations in a_op_const_reg_reg()
+
+  Revision 1.86  2003/04/27 11:21:36  peter
     * aktprocdef renamed to current_procdef
     * aktprocdef renamed to current_procdef
     * procinfo renamed to current_procinfo
     * procinfo renamed to current_procinfo
     * procinfo will now be stored in current_module so it can be
     * procinfo will now be stored in current_module so it can be