Pārlūkot izejas kodu

* fixed regvar bug in tcginnode.pass_2

Jonas Maebe 21 gadi atpakaļ
vecāks
revīzija
d3f1b21fae
1 mainītis faili ar 7 papildinājumiem un 5 dzēšanām
  1. 7 5
      compiler/ncgset.pas

+ 7 - 5
compiler/ncgset.pas

@@ -376,12 +376,11 @@ implementation
                if left.nodetype=ordconstn then
                if left.nodetype=ordconstn then
                 begin
                 begin
                   location_force_reg(exprasmlist,right.location,opsize,true);
                   location_force_reg(exprasmlist,right.location,opsize,true);
+                  location.register:=cg.getintregister(exprasmlist,location.size);
                   { first SHR the register }
                   { first SHR the register }
-                  cg.a_op_const_reg(exprasmlist,OP_SHR,opsize,tordconstnode(left).value and 31,right.location.register);
+                  cg.a_op_const_reg_reg(exprasmlist,OP_SHR,opsize,tordconstnode(left).value and 31,right.location.register,location.register);
                   { then extract the lowest bit }
                   { then extract the lowest bit }
-                  cg.a_op_const_reg(exprasmlist,OP_AND,opsize,1,right.location.register);
-                  location.register:=cg.getintregister(exprasmlist,location.size);
-                  cg.a_load_reg_reg(exprasmlist,opsize,location.size,right.location.register,location.register);
+                  cg.a_op_const_reg(exprasmlist,OP_AND,opsize,1,location.register);
                 end
                 end
                else
                else
                 begin
                 begin
@@ -971,7 +970,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.63  2004-06-20 08:55:29  florian
+  Revision 1.64  2004-07-04 12:38:55  jonas
+    * fixed regvar bug in tcginnode.pass_2
+
+  Revision 1.63  2004/06/20 08:55:29  florian
     * logs truncated
     * logs truncated
 
 
   Revision 1.62  2004/06/16 20:07:08  florian
   Revision 1.62  2004/06/16 20:07:08  florian