mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-21 08:23:02 +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
|
type
|
||||||
TAsmList = class(tlinkedlist)
|
TAsmList = class(tlinkedlist)
|
||||||
|
section_count : longint;
|
||||||
constructor create;
|
constructor create;
|
||||||
function getlasttaifilepos : pfileposinfo;
|
function getlasttaifilepos : pfileposinfo;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -955,6 +955,7 @@ implementation
|
|||||||
procedure new_section(list:TAsmList;Asectype:TAsmSectiontype;const Aname:string;Aalign:byte;Asecorder:TasmSectionorder=secorder_default);
|
procedure new_section(list:TAsmList;Asectype:TAsmSectiontype;const Aname:string;Aalign:byte;Asecorder:TasmSectionorder=secorder_default);
|
||||||
begin
|
begin
|
||||||
list.concat(tai_section.create(Asectype,Aname,Aalign,Asecorder));
|
list.concat(tai_section.create(Asectype,Aname,Aalign,Asecorder));
|
||||||
|
inc(list.section_count);
|
||||||
list.concat(cai_align.create(Aalign));
|
list.concat(cai_align.create(Aalign));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -738,6 +738,8 @@ implementation
|
|||||||
if hp=nil then
|
if hp=nil then
|
||||||
break;
|
break;
|
||||||
p_asm.concat(hp);
|
p_asm.concat(hp);
|
||||||
|
if hp.typ=ait_section then
|
||||||
|
inc(p_asm.section_count);
|
||||||
until false;
|
until false;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -809,6 +811,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
n.p_asm:=TAsmList.create;
|
n.p_asm:=TAsmList.create;
|
||||||
n.p_asm.concatlistcopy(p_asm);
|
n.p_asm.concatlistcopy(p_asm);
|
||||||
|
n.p_asm.section_count:=p_asm.section_count;
|
||||||
end
|
end
|
||||||
else n.p_asm := nil;
|
else n.p_asm := nil;
|
||||||
n.currenttai:=currenttai;
|
n.currenttai:=currenttai;
|
||||||
|
|||||||
@ -355,6 +355,9 @@ interface
|
|||||||
current_asmdata.CurrAsmList.concatlist(p_asm);
|
current_asmdata.CurrAsmList.concatlist(p_asm);
|
||||||
end;
|
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 }
|
{ Release register used in the assembler block }
|
||||||
if (not has_registerlist) then
|
if (not has_registerlist) then
|
||||||
cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
|
cg.deallocallcpuregisters(current_asmdata.CurrAsmList);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user