summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel <daniel@3ad0048d-3df7-0310-abae-a5850022a9f2>2007-06-29 19:46:15 +0000
committerdaniel <daniel@3ad0048d-3df7-0310-abae-a5850022a9f2>2007-06-29 19:46:15 +0000
commit768a858482d77758436801629895000a75da511c (patch)
treef9f7fb735fbcb3c86fb2780fdd446ca74f5dfb5d
parent29d1b1aeb3ed080cdbb3f2182341cec2fad13b94 (diff)
downloadfpc-768a858482d77758436801629895000a75da511c.tar.gz
* 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
-rw-r--r--compiler/cgobj.pas33
-rw-r--r--compiler/x86_64/cpupi.pas2
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;