mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 10:29:17 +02:00
* on i386-win32 when using stdcall calling conventions, records with a size of 1,2 and 4 are returned in al/ax/eax now, resolves #22675
git-svn-id: trunk@22146 -
This commit is contained in:
parent
2939c41263
commit
74d3c8cc57
@ -108,11 +108,15 @@ unit cpupara;
|
||||
case def.typ of
|
||||
recorddef :
|
||||
begin
|
||||
{ Win32 GCC returns small records in the FUNCTION_RETURN_REG.
|
||||
For stdcall we follow delphi instead of GCC }
|
||||
if (calloption in [pocall_cdecl,pocall_cppdecl]) and
|
||||
(def.size>0) and
|
||||
(def.size<=8) then
|
||||
{ Win32 GCC returns small records in the FUNCTION_RETURN_REG up to 8 bytes in registers.
|
||||
|
||||
For stdcall and register we follow delphi instead of GCC which returns
|
||||
only records of a size of 1,2 or 4 bytes in FUNCTION_RETURN_REG }
|
||||
if ((calloption in [pocall_stdcall,pocall_register]) and
|
||||
(def.size in [1,2,4])) or
|
||||
((calloption in [pocall_cdecl,pocall_cppdecl]) and
|
||||
(def.size>0) and
|
||||
(def.size<=8)) then
|
||||
begin
|
||||
result:=false;
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user