mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 10:48:12 +02:00
* handle shortstrings like arrays and records when returning them from functions
git-svn-id: trunk@6563 -
This commit is contained in:
parent
3d2330d006
commit
2566e38eae
@ -140,7 +140,16 @@ unit cpupara;
|
||||
loc1:=LOC_REFERENCE;
|
||||
stringdef:
|
||||
if is_shortstring(p) or is_longstring(p) then
|
||||
loc1:=LOC_REFERENCE
|
||||
begin
|
||||
{ handle long and shortstrings like arrays }
|
||||
{ win64 abi }
|
||||
if ((target_info.system=system_x86_64_win64) and (p.size<=8)) or
|
||||
{ linux abi }
|
||||
((target_info.system<>system_x86_64_win64) and (p.size<=16)) then
|
||||
loc1:=LOC_REGISTER
|
||||
else
|
||||
loc1:=LOC_REFERENCE;
|
||||
end
|
||||
else
|
||||
loc1:=LOC_REGISTER;
|
||||
setdef:
|
||||
|
Loading…
Reference in New Issue
Block a user