From 768a858482d77758436801629895000a75da511c Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 29 Jun 2007 19:46:15 +0000 Subject: * Merge 7845,7848 (manual intervention after merge conflict) git-svn-id: http://svn.freepascal.org/svn/fpc/branches/fixes_2_2@7849 3ad0048d-3df7-0310-abae-a5850022a9f2 --- compiler/cgobj.pas | 33 +++++++++++++++++++-------------- compiler/x86_64/cpupi.pas | 2 +- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/compiler/cgobj.pas b/compiler/cgobj.pas index 2647aed647..2a38854633 100644 --- a/compiler/cgobj.pas +++ b/compiler/cgobj.pas @@ -3345,7 +3345,7 @@ implementation var hsym : tsym; href : treference; - paraloc : tcgparalocation; + paraloc : Pcgparalocation; begin { calculate the parameter info for the procdef } if not procdef.has_paraloc_info then @@ -3357,20 +3357,25 @@ implementation if not(assigned(hsym) and (hsym.typ=paravarsym)) then internalerror(200305251); - paraloc:=tparavarsym(hsym).paraloc[callerside].location^; - case paraloc.loc of - LOC_REGISTER: - cg.a_op_const_reg(list,OP_SUB,paraloc.size,ioffset,paraloc.register); - LOC_REFERENCE: + paraloc:=tparavarsym(hsym).paraloc[callerside].location; + while paraloc<>nil do + with paraloc^ do begin - { offset in the wrapper needs to be adjusted for the stored - return address } - reference_reset_base(href,paraloc.reference.index,paraloc.reference.offset+sizeof(aint)); - cg.a_op_const_ref(list,OP_SUB,paraloc.size,ioffset,href); - end - else - internalerror(200309189); - end; + case loc of + LOC_REGISTER: + cg.a_op_const_reg(list,OP_SUB,size,ioffset,register); + LOC_REFERENCE: + begin + { offset in the wrapper needs to be adjusted for the stored + return address } + reference_reset_base(href,reference.index,reference.offset+sizeof(aint)); + cg.a_op_const_ref(list,OP_SUB,size,ioffset,href); + end + else + internalerror(200309189); + end; + paraloc:=next; + end; end; diff --git a/compiler/x86_64/cpupi.pas b/compiler/x86_64/cpupi.pas index 45bc10f2a7..61d7bd87fe 100644 --- a/compiler/x86_64/cpupi.pas +++ b/compiler/x86_64/cpupi.pas @@ -57,7 +57,7 @@ implementation tg.setfirsttemp(tg.direction*maxpushedparasize+4*8); end else - inherited; + tg.setfirsttemp(tg.direction*maxpushedparasize); end; -- cgit v1.2.1