Browse Source

* reset written source lines once a section is encountered

Sven/Sarah Barth 3 years ago
parent
commit
088c746d45

+ 2 - 0
compiler/aggas.pas

@@ -889,6 +889,8 @@ implementation
 
            ait_section :
              begin
+               ResetSourceLines;
+
                if tai_section(hp).sectype<>sec_none then
                  if replaceforbidden then
                    WriteSection(tai_section(hp).sectype,ApplyAsmSymbolRestrictions(tai_section(hp).name^),tai_section(hp).secorder,

+ 3 - 0
compiler/llvm/agllvm.pas

@@ -857,6 +857,9 @@ implementation
               WriteSourceLine(hp as tailineinfo);
           end;
 
+         if hp.typ=ait_section then
+           ResetSourceLines;
+
          WriteTai(replaceforbidden,do_line,mk_none,InlineLevel,asmblock,hp);
          hp:=tai(hp.next);
        end;

+ 2 - 0
compiler/powerpc/agppcmpw.pas

@@ -763,6 +763,8 @@ interface
               ;
             ait_section:
               begin
+                 ResetSourceLines;
+
                  {if LastSecType<>sec_none then
                   writer.AsmWriteLn('_'+asminfo^.secnames[LastSecType]+#9#9'ENDS');}
 

+ 2 - 0
compiler/x86/agx86int.pas

@@ -543,6 +543,8 @@ implementation
          case hp.typ of
            ait_section :
              begin
+               ResetSourceLines;
+
                if tai_section(hp).sectype<>sec_none then
                 begin
                   if asminfo^.id=as_x86_64_masm then

+ 2 - 0
compiler/x86/agx86nsm.pas

@@ -757,6 +757,8 @@ interface
          case hp.typ of
            ait_section :
              begin
+               ResetSourceLines;
+
                if tai_section(hp).sectype<>sec_none then
                  WriteSection(tai_section(hp).sectype,tai_section(hp).name^,tai_section(hp).secalign);
                LastSecType:=tai_section(hp).sectype;

+ 2 - 0
compiler/z80/agsdasz80.pas

@@ -555,6 +555,8 @@ unit agsdasz80;
           case hp.typ of
             ait_section :
               begin
+                ResetSourceLines;
+
                 if tai_section(hp).sectype<>sec_none then
                   WriteSection(tai_section(hp).sectype,tai_section(hp).name^,tai_section(hp).secorder,
                     tai_section(hp).secalign,tai_section(hp).secflags,tai_section(hp).secprogbits)

+ 2 - 0
compiler/z80/agz80vasm.pas

@@ -589,6 +589,8 @@ unit agz80vasm;
           case hp.typ of
             ait_section :
               begin
+                ResetSourceLines;
+
                 if tai_section(hp).sectype<>sec_none then
                   WriteSection(tai_section(hp).sectype,tai_section(hp).name^,tai_section(hp).secorder,
                     tai_section(hp).secalign,tai_section(hp).secflags,tai_section(hp).secprogbits)