mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 12:09:30 +02:00
* put the code for pure assembler routines in a separate asmlist, so
we can easily use a different assembler writer for them on the llvm target git-svn-id: trunk@31630 -
This commit is contained in:
parent
c80fb6a20e
commit
6dd06a1aae
@ -46,6 +46,8 @@ interface
|
|||||||
TAsmListType=(
|
TAsmListType=(
|
||||||
al_start,
|
al_start,
|
||||||
al_stabs,
|
al_stabs,
|
||||||
|
{ pure assembler routines }
|
||||||
|
al_pure_assembler,
|
||||||
al_procedures,
|
al_procedures,
|
||||||
al_globals,
|
al_globals,
|
||||||
al_const,
|
al_const,
|
||||||
@ -97,6 +99,7 @@ interface
|
|||||||
AsmListTypeStr : array[TAsmListType] of string[24] =(
|
AsmListTypeStr : array[TAsmListType] of string[24] =(
|
||||||
'al_begin',
|
'al_begin',
|
||||||
'al_stabs',
|
'al_stabs',
|
||||||
|
'al_pure_assembler',
|
||||||
'al_procedures',
|
'al_procedures',
|
||||||
'al_globals',
|
'al_globals',
|
||||||
'al_const',
|
'al_const',
|
||||||
|
@ -5228,15 +5228,21 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure thlcgobj.record_generated_code_for_procdef(pd: tprocdef; code, data: TAsmList);
|
procedure thlcgobj.record_generated_code_for_procdef(pd: tprocdef; code, data: TAsmList);
|
||||||
|
var
|
||||||
|
alt: TAsmListType;
|
||||||
begin
|
begin
|
||||||
|
if not(po_assembler in pd.procoptions) then
|
||||||
|
alt:=al_procedures
|
||||||
|
else
|
||||||
|
alt:=al_pure_assembler;
|
||||||
{ add the procedure to the al_procedures }
|
{ add the procedure to the al_procedures }
|
||||||
maybe_new_object_file(current_asmdata.asmlists[al_procedures]);
|
maybe_new_object_file(current_asmdata.asmlists[alt]);
|
||||||
new_section(current_asmdata.asmlists[al_procedures],sec_code,lower(pd.mangledname),getprocalign);
|
new_section(current_asmdata.asmlists[alt],sec_code,lower(pd.mangledname),getprocalign);
|
||||||
current_asmdata.asmlists[al_procedures].concatlist(code);
|
current_asmdata.asmlists[alt].concatlist(code);
|
||||||
{ save local data (casetable) also in the same file }
|
{ save local data (casetable) also in the same file }
|
||||||
if assigned(data) and
|
if assigned(data) and
|
||||||
(not data.empty) then
|
(not data.empty) then
|
||||||
current_asmdata.asmlists[al_procedures].concatlist(data);
|
current_asmdata.asmlists[alt].concatlist(data);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function thlcgobj.g_call_system_proc(list: TAsmList; const procname: string; const paras: array of pcgpara; forceresdef: tdef): tcgpara;
|
function thlcgobj.g_call_system_proc(list: TAsmList; const procname: string; const paras: array of pcgpara; forceresdef: tdef): tcgpara;
|
||||||
|
Loading…
Reference in New Issue
Block a user