mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-19 19:19:32 +01:00
* keep track of the sections that are created in the asmlists
git-svn-id: trunk@35408 -
This commit is contained in:
parent
49f7e90827
commit
c6bfb0064f
@ -131,6 +131,7 @@ interface
|
||||
|
||||
type
|
||||
TAsmList = class(tlinkedlist)
|
||||
section_count : longint;
|
||||
constructor create;
|
||||
function getlasttaifilepos : pfileposinfo;
|
||||
end;
|
||||
|
||||
@ -955,6 +955,7 @@ implementation
|
||||
procedure new_section(list:TAsmList;Asectype:TAsmSectiontype;const Aname:string;Aalign:byte;Asecorder:TasmSectionorder=secorder_default);
|
||||
begin
|
||||
list.concat(tai_section.create(Asectype,Aname,Aalign,Asecorder));
|
||||
inc(list.section_count);
|
||||
list.concat(cai_align.create(Aalign));
|
||||
end;
|
||||
|
||||
|
||||
@ -738,6 +738,8 @@ implementation
|
||||
if hp=nil then
|
||||
break;
|
||||
p_asm.concat(hp);
|
||||
if hp.typ=ait_section then
|
||||
inc(p_asm.section_count);
|
||||
until false;
|
||||
end
|
||||
else
|
||||
@ -809,6 +811,7 @@ implementation
|
||||
begin
|
||||
n.p_asm:=TAsmList.create;
|
||||
n.p_asm.concatlistcopy(p_asm);
|
||||
n.p_asm.section_count:=p_asm.section_count;
|
||||
end
|
||||
else n.p_asm := nil;
|
||||
n.currenttai:=currenttai;
|
||||
|
||||
@ -355,6 +355,9 @@ interface
|
||||
current_asmdata.CurrAsmList.concatlist(p_asm);
|
||||
end;
|
||||
|
||||
{ Update section count }
|
||||
current_asmdata.currasmlist.section_count:=current_asmdata.currasmlist.section_count+p_asm.section_count;
|
||||
|
||||
{ Release register used in the assembler block }
|
||||
if (not has_registerlist) then
|
||||
cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user