mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 00:59:08 +02:00
* reduce dependencies of the procinfo unit
git-svn-id: trunk@30871 -
This commit is contained in:
parent
956883b0c7
commit
420309ec59
@ -142,7 +142,7 @@ unit procinfo;
|
|||||||
|
|
||||||
procedure allocate_push_parasize(size:longint);
|
procedure allocate_push_parasize(size:longint);
|
||||||
|
|
||||||
function calc_stackframe_size:longint;virtual;
|
function calc_stackframe_size:longint;virtual;abstract;
|
||||||
|
|
||||||
{ Set the address of the first temp, can be used to allocate
|
{ Set the address of the first temp, can be used to allocate
|
||||||
space for pushing parameters }
|
space for pushing parameters }
|
||||||
@ -190,12 +190,8 @@ unit procinfo;
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
cutils,systems,
|
cutils,systems;
|
||||||
tgobj,cgobj,
|
|
||||||
paramgr
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TProcInfo
|
TProcInfo
|
||||||
@ -277,7 +273,7 @@ implementation
|
|||||||
function tprocinfo.get_normal_proc: tprocinfo;
|
function tprocinfo.get_normal_proc: tprocinfo;
|
||||||
begin
|
begin
|
||||||
result:=self;
|
result:=self;
|
||||||
while assigned(result.parent)and(result.procdef.parast.symtablelevel>normal_function_level) do
|
while assigned(result.parent) and (result.procdef.parast.symtablelevel>normal_function_level) do
|
||||||
result:=result.parent;
|
result:=result.parent;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -301,18 +297,10 @@ implementation
|
|||||||
maxpushedparasize:=size;
|
maxpushedparasize:=size;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function tprocinfo.calc_stackframe_size:longint;
|
|
||||||
begin
|
|
||||||
result:=Align(tg.direction*tg.lasttemp,current_settings.alignment.localalignmin);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
procedure tprocinfo.set_first_temp_offset;
|
procedure tprocinfo.set_first_temp_offset;
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tprocinfo.generate_parameter_info;
|
procedure tprocinfo.generate_parameter_info;
|
||||||
begin
|
begin
|
||||||
{ generate callee paraloc register info, it initialises the size that
|
{ generate callee paraloc register info, it initialises the size that
|
||||||
@ -321,20 +309,17 @@ implementation
|
|||||||
para_stack_size:=procdef.calleeargareasize;
|
para_stack_size:=procdef.calleeargareasize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tprocinfo.allocate_got_register(list: TAsmList);
|
procedure tprocinfo.allocate_got_register(list: TAsmList);
|
||||||
begin
|
begin
|
||||||
{ most os/cpu combo's don't use this yet, so not yet abstract }
|
{ most os/cpu combo's don't use this yet, so not yet abstract }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tprocinfo.init_framepointer;
|
procedure tprocinfo.init_framepointer;
|
||||||
begin
|
begin
|
||||||
{ most targets use a constant, but some have a typed constant that must
|
{ most targets use a constant, but some have a typed constant that must
|
||||||
be initialized }
|
be initialized }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tprocinfo.postprocess_code;
|
procedure tprocinfo.postprocess_code;
|
||||||
begin
|
begin
|
||||||
{ no action by default }
|
{ no action by default }
|
||||||
|
@ -54,7 +54,11 @@ interface
|
|||||||
final_asmnode : tasmnode;
|
final_asmnode : tasmnode;
|
||||||
final_used : boolean;
|
final_used : boolean;
|
||||||
dfabuilder : TDFABuilder;
|
dfabuilder : TDFABuilder;
|
||||||
|
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
|
|
||||||
|
function calc_stackframe_size : longint;override;
|
||||||
|
|
||||||
procedure printproc(pass:string);
|
procedure printproc(pass:string);
|
||||||
procedure generate_code;
|
procedure generate_code;
|
||||||
procedure generate_code_tree;
|
procedure generate_code_tree;
|
||||||
@ -678,6 +682,12 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function tcgprocinfo.calc_stackframe_size:longint;
|
||||||
|
begin
|
||||||
|
result:=Align(tg.direction*tg.lasttemp,current_settings.alignment.localalignmin);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure tcgprocinfo.printproc(pass:string);
|
procedure tcgprocinfo.printproc(pass:string);
|
||||||
begin
|
begin
|
||||||
assign(printnodefile,treelogfilename);
|
assign(printnodefile,treelogfilename);
|
||||||
|
Loading…
Reference in New Issue
Block a user