+ computed_local_size new longint field in TMIPSProcInfo

to check that LocalSize stays constant.

   New function mips_extra_offset (needed for stabs debugging)

git-svn-id: trunk@21585 -
This commit is contained in:
pierre 2012-06-12 22:53:19 +00:00
parent a3fa47a95b
commit 550bbb0186

View File

@ -27,7 +27,7 @@ interface
uses
cutils,
globtype,
globtype,symdef,
procinfo,cpuinfo,cpupara,
psub;
@ -42,15 +42,20 @@ interface
floatregssave : byte;
register_used : tparasupregsused;
register_offset : tparasupregsoffset;
computed_local_size : longint;
constructor create(aparent:tprocinfo);override;
function calc_stackframe_size:longint;override;
procedure set_first_temp_offset;override;
end;
{ Used by Stabs debug info generator }
function mips_extra_offset(procdef : tprocdef) : longint;
implementation
uses
systems,globals,
systems,globals,verbose,
cpubase,cgbase,cgobj,
tgobj,paramgr,symconst;
@ -67,6 +72,7 @@ implementation
floatregssave:=11;
intregssave:=10;
computed_local_size:=-1;
end;
@ -93,8 +99,22 @@ implementation
intregstart:=result;
inc(result,intregssave*4);
result:=Align(tg.lasttemp,max(current_settings.alignment.localalignmin,8));
if computed_local_size=-1 then
begin
computed_local_size:=result;
procdef.total_local_size:=result;
end
else if computed_local_size <> result then
Comment(V_Warning,'TMIPSProcInfo.calc_stackframe_size result changed');
end;
function mips_extra_offset(procdef : tprocdef) : longint;
begin
if procdef=nil then
mips_extra_offset:=0
else
mips_extra_offset:=procdef.total_local_size;
end;
begin
cprocinfo:=TMIPSProcInfo;