* x86_64-win64 returns structured types up to 8 bytes in rax

git-svn-id: trunk@5528 -
This commit is contained in:
florian 2006-12-02 15:36:32 +00:00
parent d0416758fb
commit 4c2b412613
2 changed files with 4 additions and 6 deletions

View File

@ -1381,7 +1381,7 @@ implementation
if paramanager.ret_in_param(current_procinfo.procdef.returndef,current_procinfo.procdef.proccalloption) then
cg.a_load_loc_reg(list,OS_ADDR,restmploc,hreg)
else
cg.a_load_loc_reg(list,restmploc.size,restmploc,hreg);
cg.a_load_loc_reg(list,restmploc.size,restmploc,hreg);
end;
end;
LOC_FPUREGISTER:

View File

@ -169,11 +169,10 @@ unit cpupara;
function tx86_64paramanager.ret_in_param(def : tdef;calloption : tproccalloption) : boolean;
var
size: longint;
begin
if (target_info.system=system_x86_64_win64) and (calloption=pocall_safecall) then
result:=true
if target_info.system=system_x86_64_win64 then
result:=(calloption=pocall_safecall) or
not(def.size in [1,2,4,8])
else
result:=inherited ret_in_param(def,calloption);
end;
@ -314,7 +313,6 @@ unit cpupara;
retcgsize:=OS_ADDR
else
retcgsize:=def_cgsize(p.returndef);
location_reset(p.funcretloc[side],LOC_INVALID,OS_NO);
{ void has no location }
if is_void(p.returndef) then