* fixed ppc compiler

This commit is contained in:
Jonas Maebe 2003-07-06 20:25:03 +00:00
parent 32d076480b
commit 1846337739
4 changed files with 40 additions and 10 deletions

View File

@ -1280,7 +1280,7 @@ const
begin
r.enum:=R_INTREGISTER;
r.number:=NR_R11;
reference_reset_base(href,rsp,current_procinfo.framepointer_offset);
reference_reset_base(href,rsp,PARENT_FRAMEPOINTER_OFFSET);
list.concat(taicpu.op_reg_ref(A_STW,r,href));
end;
end;
@ -2702,7 +2702,10 @@ begin
end.
{
$Log$
Revision 1.112 2003-07-05 20:11:42 jonas
Revision 1.113 2003-07-06 20:25:03 jonas
* fixed ppc compiler
Revision 1.112 2003/07/05 20:11:42 jonas
* create_paraloc_info() is now called separately for the caller and
callee info
* fixed ppc cycle

View File

@ -712,6 +712,8 @@ uses
LA_LR = 8;
{ offset in the linkage area for the saved RTOC register}
LA_RTOC = 20;
PARENT_FRAMEPOINTER_OFFSET = 12;
{*****************************************************************************
Helpers
@ -880,7 +882,10 @@ implementation
end.
{
$Log$
Revision 1.60 2003-07-06 15:28:24 jonas
Revision 1.61 2003-07-06 20:25:03 jonas
* fixed ppc compiler
Revision 1.60 2003/07/06 15:28:24 jonas
* VOLATILE_REGISTERS was wrong (it was more or less the inverted set
of what it had to be :/ )

View File

@ -36,12 +36,13 @@ unit cpupi;
tppcprocinfo = class(tcgprocinfo)
{ overall size of allocated stack space, currently this is used for the PowerPC only }
localsize : aword;
{ max. of space need for parameters, currently used by the PowerPC port only }
maxpushedparasize : aword;
constructor create(aparent:tprocinfo);override;
procedure after_pass1;override;
procedure allocate_push_parasize(size: longint);override;
function calc_stackframe_size:longint;override;
end;
@ -70,8 +71,6 @@ unit cpupi;
begin
ofs:=align(maxpushedparasize+LinkageAreaSize,16);
inc(procdef.parast.address_fixup,ofs);
{ use space reserved for compilers in link area }
framepointer_offset := 12;
// inc(selfpointer_offset,ofs);
// inc(vmtpointer_offset,ofs);
if cs_asm_source in aktglobalswitches then
@ -93,12 +92,32 @@ unit cpupi;
end;
end;
procedure tppcprocinfo.allocate_push_parasize(size:longint);
begin
if size>maxpushedparasize then
maxpushedparasize:=size;
end;
function tppcprocinfo.calc_stackframe_size:longint;
var
savearea : longint;
begin
{ more or less copied from cgcpu.pas/g_stackframe_entry }
result := align(align((31-13+1)*4+(31-14+1)*8,16)+tg.lasttemp,16);
end;
begin
cprocinfo:=tppcprocinfo;
end.
{
$Log$
Revision 1.23 2003-06-13 21:19:32 peter
Revision 1.24 2003-07-06 20:25:03 jonas
* fixed ppc compiler
Revision 1.23 2003/06/13 21:19:32 peter
* current_procdef removed, use current_procinfo.procdef instead
Revision 1.22 2003/06/02 21:42:05 jonas

View File

@ -82,7 +82,7 @@ implementation
{ pass the same framepointer as the current procedure got }
hregister2.enum:=R_INTREGISTER;
hregister2.number:=NR_R11;
reference_reset_base(href,current_procinfo.framepointer,current_procinfo.framepointer_offset);
reference_reset_base(href,current_procinfo.framepointer,PARENT_FRAMEPOINTER_OFFSET);
cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,href,hregister2);
{ it must be adjusted! }
end
@ -100,7 +100,7 @@ implementation
else if (current_procinfo.procdef.parast.symtablelevel>(tprocdef(procdefinition).parast.symtablelevel)) then
begin
hregister1:=rg.getregisterint(exprasmlist,OS_ADDR);
reference_reset_base(href,current_procinfo.framepointer,current_procinfo.framepointer_offset);
reference_reset_base(href,current_procinfo.framepointer,PARENT_FRAMEPOINTER_OFFSET);
cg.a_load_ref_reg(exprasmlist,OS_ADDR,OS_ADDR,href,hregister1);
{ the previous frame pointer is always saved at }
{ previous_framepointer+12 (in the link area) }
@ -125,7 +125,10 @@ begin
end.
{
$Log$
Revision 1.18 2003-06-13 21:19:32 peter
Revision 1.19 2003-07-06 20:25:03 jonas
* fixed ppc compiler
Revision 1.18 2003/06/13 21:19:32 peter
* current_procdef removed, use current_procinfo.procdef instead
Revision 1.17 2003/06/04 11:58:58 jonas