Browse Source

* fixed another internalerror

florian 25 years ago
parent
commit
85b946e6d4
2 changed files with 16 additions and 9 deletions
  1. 9 2
      compiler/cg386add.pas
  2. 7 7
      compiler/tcadd.pas

+ 9 - 2
compiler/cg386add.pas

@@ -866,6 +866,10 @@ implementation
 {$endif cardinalmulfix}
                    case p^.treetype of
                       addn : begin
+                               { this is a really ugly hack!!!!!!!!!! }
+                               { this could be done later using EDI   }
+                               { as it is done for subn               }
+                               { instead of two registers!!!!         }
                                if is_set then
                                 begin
                                 { adding elements is not commutative }
@@ -2236,7 +2240,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.93  2000-02-09 13:22:45  peter
+  Revision 1.94  2000-02-14 22:34:28  florian
+    * fixed another internalerror
+
+  Revision 1.93  2000/02/09 13:22:45  peter
     * log truncated
 
   Revision 1.92  2000/01/23 13:57:52  jonas
@@ -2313,4 +2320,4 @@ end.
   Revision 1.73  1999/08/07 11:29:26  peter
     * better fix for muln register allocation
 
-}
+}

+ 7 - 7
compiler/tcadd.pas

@@ -753,14 +753,11 @@ implementation
                 else
                  if psetdef(ld)^.settype=smallset then
                   begin
-                     calcregisters(p,1,0,0);
                      { are we adding set elements ? }
                      if p^.right^.treetype=setelementn then
-                       begin
-                       { we need at least two registers PM }
-                         if p^.registers32<2 then
-                           p^.registers32:=2;
-                       end;
+                       calcregisters(p,2,0,0)
+                     else
+                       calcregisters(p,1,0,0);
                      p^.location.loc:=LOC_REGISTER;
                   end
                  else
@@ -1258,7 +1255,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.67  2000-02-13 22:46:28  florian
+  Revision 1.68  2000-02-14 22:34:28  florian
+    * fixed another internalerror
+
+  Revision 1.67  2000/02/13 22:46:28  florian
     * fixed an internalerror with writeln
     * fixed arrayconstructor_to_set to force the generation of better code
       and added a more strict type checking