From df428f7a5d0721c875fccbd73be0c4c2baaaa0c4 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 17 Jan 2004 15:55:10 +0000 Subject: [PATCH] * fixed allocation of parameters passed by reference for powerpc in callee --- compiler/ncgutil.pas | 16 +++++++++++++--- compiler/powerpc/cpupara.pas | 10 +++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas index 7d94efee2d..d2ad385232 100644 --- a/compiler/ncgutil.pas +++ b/compiler/ncgutil.pas @@ -1974,8 +1974,14 @@ implementation begin case localloc.loc of LOC_REFERENCE : - list.concat(Tai_comment.Create(strpnew('Para '+realname+' located at '+ - std_regname(localloc.reference.index)+tostr_with_plus(localloc.reference.offset)))); + begin + list.concat(Tai_comment.Create(strpnew('Para '+realname+' located at '+ + std_regname(localloc.reference.index)+tostr_with_plus(localloc.reference.offset)))); +{$ifdef powerpc} + localloc.size:=paraitem.paraloc[calleeside].size; + tg.GetLocal(list,tcgsize2size[localloc.size],vartype.def,localloc.reference); +{$endif powerpc} + end; end; end; end; @@ -2060,7 +2066,11 @@ implementation end. { $Log$ - Revision 1.182 2004-01-13 18:08:58 florian + Revision 1.183 2004-01-17 15:55:10 jonas + * fixed allocation of parameters passed by reference for powerpc in + callee + + Revision 1.182 2004/01/13 18:08:58 florian * x86-64 compilation fixed Revision 1.181 2004/01/12 22:11:38 peter diff --git a/compiler/powerpc/cpupara.pas b/compiler/powerpc/cpupara.pas index e6b07acb3a..86dc176de0 100644 --- a/compiler/powerpc/cpupara.pas +++ b/compiler/powerpc/cpupara.pas @@ -380,6 +380,9 @@ unit cpupara; else internalerror(2002071002); end; +{ + this is filled in in ncgutil + if side = calleeside then begin if (paraloc.loc = LOC_REFERENCE) then @@ -389,6 +392,7 @@ unit cpupara; inc(paraloc.reference.offset,current_procinfo.calc_stackframe_size); end; end; +} hp.paraloc[side]:=paraloc; hp:=tparaitem(hp.next); end; @@ -442,7 +446,11 @@ begin end. { $Log$ - Revision 1.56 2004-01-15 14:01:18 florian + Revision 1.57 2004-01-17 15:55:11 jonas + * fixed allocation of parameters passed by reference for powerpc in + callee + + Revision 1.56 2004/01/15 14:01:18 florian + x86 instruction tables for x86-64 extended Revision 1.55 2003/12/28 22:09:12 florian