Pārlūkot izejas kodu

* fixed inline crash with assembler routines

peter 23 gadi atpakaļ
vecāks
revīzija
4d4bf26827
3 mainītis faili ar 26 papildinājumiem un 4 dzēšanām
  1. 5 2
      compiler/aasm.pas
  2. 7 1
      compiler/ncgbas.pas
  3. 14 1
      compiler/ogbase.pas

+ 5 - 2
compiler/aasm.pas

@@ -901,7 +901,7 @@ uses
       begin
         if not assigned(altsymbol) then
          begin
-           altsymbol:=tasmsymbol.create(name+'_'+tostr(nextaltnr),bind,typ);
+           altsymbol:=tasmsymbol.create(name+'_'+tostr(nextaltnr),defbind,typ);
            { also copy the amount of references }
            altsymbol.refs:=refs;
            inc(nextaltnr);
@@ -1160,7 +1160,10 @@ uses
 end.
 {
   $Log$
-  Revision 1.18  2001-08-30 19:43:50  peter
+  Revision 1.19  2001-12-31 16:54:14  peter
+    * fixed inline crash with assembler routines
+
+  Revision 1.18  2001/08/30 19:43:50  peter
     * detect duplicate labels
 
   Revision 1.17  2001/04/13 01:22:06  peter

+ 7 - 1
compiler/ncgbas.pas

@@ -157,6 +157,9 @@ interface
                      end;
                   ait_instruction :
                      begin
+                       { remove cached insentry, because the new code can
+                         require an other less optimized instruction }
+                       taicpu(hp2).ResetPass1;
                        { fixup the references }
                        for i:=1 to taicpu(hp2).ops do
                         begin
@@ -279,7 +282,10 @@ begin
 end.
 {
   $Log$
-  Revision 1.9  2001-11-02 22:58:01  peter
+  Revision 1.10  2001-12-31 16:54:14  peter
+    * fixed inline crash with assembler routines
+
+  Revision 1.9  2001/11/02 22:58:01  peter
     * procsym definition rewrite
 
   Revision 1.8  2001/10/25 21:22:35  peter

+ 14 - 1
compiler/ogbase.pas

@@ -104,6 +104,7 @@ interface
          procedure createsection(sec:tsection);virtual;
          procedure defaultsection(sec:tsection);
          function  sectionsize(s:tsection):longint;
+         function  currsectionsize:longint;
          procedure setsectionsizes(var s:tsecsize);virtual;
          procedure alloc(len:longint);
          procedure allocalign(len:longint);
@@ -401,6 +402,15 @@ implementation
       end;
 
 
+    function tobjectdata.currsectionsize:longint;
+      begin
+        if assigned(sects[currsec]) then
+         currsectionsize:=sects[currsec].datasize
+        else
+         currsectionsize:=0;
+      end;
+
+
     procedure tobjectdata.setsectionsizes(var s:tsecsize);
       begin
       end;
@@ -568,7 +578,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.7  2001-04-13 01:22:10  peter
+  Revision 1.8  2001-12-31 16:54:14  peter
+    * fixed inline crash with assembler routines
+
+  Revision 1.7  2001/04/13 01:22:10  peter
     * symtable change to classes
     * range check generation and errors fixed, make cycle DEBUG=1 works
     * memory leaks fixed