mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 06:18:16 +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=(
|
||||
al_start,
|
||||
al_stabs,
|
||||
{ pure assembler routines }
|
||||
al_pure_assembler,
|
||||
al_procedures,
|
||||
al_globals,
|
||||
al_const,
|
||||
@ -97,6 +99,7 @@ interface
|
||||
AsmListTypeStr : array[TAsmListType] of string[24] =(
|
||||
'al_begin',
|
||||
'al_stabs',
|
||||
'al_pure_assembler',
|
||||
'al_procedures',
|
||||
'al_globals',
|
||||
'al_const',
|
||||
|
@ -5228,15 +5228,21 @@ implementation
|
||||
end;
|
||||
|
||||
procedure thlcgobj.record_generated_code_for_procdef(pd: tprocdef; code, data: TAsmList);
|
||||
var
|
||||
alt: TAsmListType;
|
||||
begin
|
||||
if not(po_assembler in pd.procoptions) then
|
||||
alt:=al_procedures
|
||||
else
|
||||
alt:=al_pure_assembler;
|
||||
{ add the procedure to the al_procedures }
|
||||
maybe_new_object_file(current_asmdata.asmlists[al_procedures]);
|
||||
new_section(current_asmdata.asmlists[al_procedures],sec_code,lower(pd.mangledname),getprocalign);
|
||||
current_asmdata.asmlists[al_procedures].concatlist(code);
|
||||
maybe_new_object_file(current_asmdata.asmlists[alt]);
|
||||
new_section(current_asmdata.asmlists[alt],sec_code,lower(pd.mangledname),getprocalign);
|
||||
current_asmdata.asmlists[alt].concatlist(code);
|
||||
{ save local data (casetable) also in the same file }
|
||||
if assigned(data) and
|
||||
(not data.empty) then
|
||||
current_asmdata.asmlists[al_procedures].concatlist(data);
|
||||
current_asmdata.asmlists[alt].concatlist(data);
|
||||
end;
|
||||
|
||||
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