Browse Source

* fixed an IE10 and another bug with [var1..var2] construct

Jonas Maebe 24 năm trước cách đây
mục cha
commit
676fe2fee3
2 tập tin đã thay đổi với 18 bổ sung2 xóa
  1. 7 1
      compiler/i386/n386add.pas
  2. 11 1
      compiler/i386/n386set.pas

+ 7 - 1
compiler/i386/n386add.pas

@@ -560,6 +560,9 @@ interface
 
                      regstopush := $ff;
                      remove_non_regvars_from_loc(right.location,regstopush);
+                     if (right.nodetype = setelementn) and
+                        assigned(tsetelementnode(right).right) then
+                       remove_non_regvars_from_loc(tsetelementnode(right).right.location,regstopush);
                      remove_non_regvars_from_loc(left.location,regstopush);
                      pushusedregisters(pushedregs,regstopush);
                      { this is still right before the instruction that uses }
@@ -2273,7 +2276,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.11  2001-04-13 01:22:18  peter
+  Revision 1.12  2001-05-06 17:12:14  jonas
+    * fixed an IE10 and another bug with [var1..var2] construct
+
+  Revision 1.11  2001/04/13 01:22:18  peter
     * symtable change to classes
     * range check generation and errors fixed, make cycle DEBUG=1 works
     * memory leaks fixed

+ 11 - 1
compiler/i386/n386set.pas

@@ -60,6 +60,8 @@ implementation
 *****************************************************************************}
 
     procedure ti386setelementnode.pass_2;
+       var
+         pushed: boolean;
        begin
        { load first value in 32bit register }
          secondpass(left);
@@ -69,7 +71,12 @@ implementation
        { also a second value ? }
          if assigned(right) then
            begin
+             pushed:=maybe_push(right.registers32,left,false);
              secondpass(right);
+             if codegenerror then
+               exit;
+             if pushed then
+               restore(left,false);
              if right.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
               emit_to_reg32(right.location.register);
            end;
@@ -1065,7 +1072,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.14  2001-04-13 01:22:19  peter
+  Revision 1.15  2001-05-06 17:12:14  jonas
+    * fixed an IE10 and another bug with [var1..var2] construct
+
+  Revision 1.14  2001/04/13 01:22:19  peter
     * symtable change to classes
     * range check generation and errors fixed, make cycle DEBUG=1 works
     * memory leaks fixed