* fix linux x86_64 for records and arrays

git-svn-id: trunk@8224 -
This commit is contained in:
peter 2007-08-05 19:38:21 +00:00
parent 881f884f4c
commit f5d5e377d2

View File

@ -131,6 +131,7 @@ unit cpupara;
arraydef: arraydef:
begin begin
if not(is_special_array(p)) and if not(is_special_array(p)) and
(target_info.system=system_x86_64_win64) and
structure_in_registers(varspez,p.size) then structure_in_registers(varspez,p.size) then
begin begin
loc1:=LOC_REGISTER; loc1:=LOC_REGISTER;
@ -238,16 +239,35 @@ unit cpupara;
formaldef : formaldef :
result:=true; result:=true;
recorddef : recorddef :
result:=not structure_in_registers(varspez,def.size); begin
{ Win ABI depends on size to pass it in a register or not }
if (target_info.system=system_x86_64_win64) then
result:=not structure_in_registers(varspez,def.size)
else
{ linux ABI always passes it as value parameter }
result:=false;
end;
arraydef : arraydef :
begin begin
result:=not( { cdecl array of const need to be ignored and therefor be puhsed
{ cdecl array of const need to be ignored and therefor be puhsed as value parameter with length 0 }
as value parameter with length 0 } if (calloption in [pocall_cdecl,pocall_cppdecl]) and
(calloption in [pocall_cdecl,pocall_cppdecl]) and (is_array_of_const(def) or
(is_array_of_const(def) or is_dynamic_array(def)) then
is_dynamic_array(def)) result:=false
); else
if is_special_array(def) then
result:=true
else
{ normal arrays }
begin
{ Win ABI depends on size to pass it in a register or not }
if (target_info.system=system_x86_64_win64) then
result:=not structure_in_registers(varspez,def.size)
else
{ linux ABI always passes it var parameter }
result:=true;
end;
end; end;
objectdef : objectdef :
begin begin