From 91bfa84952d3abccf04c16cc20b54f1d2ce534d7 Mon Sep 17 00:00:00 2001 From: pierre Date: Thu, 23 Aug 2012 09:50:47 +0000 Subject: [PATCH] Correct code after change in set_common_funcretloc_info which made the call to ret_in_param always return false git-svn-id: trunk@22206 - --- compiler/mips/cpupara.pas | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/compiler/mips/cpupara.pas b/compiler/mips/cpupara.pas index 0e010d84a4..fe7c0429e9 100644 --- a/compiler/mips/cpupara.pas +++ b/compiler/mips/cpupara.pas @@ -184,12 +184,17 @@ implementation var paraloc : pcgparalocation; retcgsize : tcgsize; + retdef : tdef; begin if set_common_funcretloc_info(p,forcetempdef,retcgsize,result) then begin { Return is passed as var parameter, in this case we use the first register R4 for it } - if ret_in_param(result.def,p.proccalloption) then + if assigned(forcetempdef) then + retdef:=forcetempdef + else + retdef:=p.returndef; + if ret_in_param(retdef,p.proccalloption) then begin if intparareg=0 then inc(intparareg); @@ -213,9 +218,10 @@ implementation end else begin - getIntParaLoc(p.proccalloption,1,result.def,result); + getIntParaLoc(p.proccalloption,1,retdef,result); end; - result.def:=getpointerdef(result.def); + // This is now done in set_common_funcretloc_info already + // result.def:=getpointerdef(result.def); end; exit; end;