mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:39:36 +02:00
* Fixed interface delegation for aarch64 (tdel1 and tdel2 tests).
It was broken by r31676 which did not take in account r29953. As a consequence $self was passed in register x1 instead of x0 when the method result is of a managed type. This fix enables changing order of the $self and $result parameters only for aarch64 AND llvm combination where it is actually needed. The issue with interface delegation still exists for aarch64-llvm and need to be fixed separately. Probably by applying llvm-specific workarounds as it was made in r29953 for regular aarch64 targets. git-svn-id: trunk@39948 -
This commit is contained in:
parent
84b5129f1d
commit
9ee1682955
@ -124,18 +124,17 @@ const
|
|||||||
paranr_blockselfpara = 1;
|
paranr_blockselfpara = 1;
|
||||||
paranr_parentfp = 2;
|
paranr_parentfp = 2;
|
||||||
paranr_parentfp_delphi_cc_leftright = 2;
|
paranr_parentfp_delphi_cc_leftright = 2;
|
||||||
{$ifndef aarch64}
|
{$if defined(aarch64) and defined(llvm)}
|
||||||
paranr_self = 3;
|
{ for AArch64 on LLVM, the "sret" parameter
|
||||||
paranr_result = 4;
|
|
||||||
{$else aarch64}
|
|
||||||
{ on AArch64, the result parameter is passed in a special register, so its
|
|
||||||
order doesn't really matter -- except for LLVM, where the "sret" parameter
|
|
||||||
must always be the first -> give it a higher number; can't do it for other
|
must always be the first -> give it a higher number; can't do it for other
|
||||||
platforms, because that would change the register assignment/parameter order
|
platforms, because that would change the register assignment/parameter order
|
||||||
and the current one is presumably Delphi-compatible }
|
and the current one is presumably Delphi-compatible }
|
||||||
paranr_result = 3;
|
paranr_result = 3;
|
||||||
paranr_self = 4;
|
paranr_self = 4;
|
||||||
{$endif aarch64}
|
{$else}
|
||||||
|
paranr_self = 3;
|
||||||
|
paranr_result = 4;
|
||||||
|
{$endif}
|
||||||
paranr_vmt = 5;
|
paranr_vmt = 5;
|
||||||
|
|
||||||
{ the implicit parameters for Objective-C methods need to come
|
{ the implicit parameters for Objective-C methods need to come
|
||||||
|
Loading…
Reference in New Issue
Block a user