[PATCH] D49464: [COFF, ARM64] Mark only POD-type returns as SRET
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 23 17:08:53 PDT 2018
rnk added a comment.
In https://reviews.llvm.org/D49464#1172754, @mgrang wrote:
> The ABI doc just distinguishes between POD and non-POD types.
>
> The address of the memory block shall be passed as an additional argument to the function in x8 for POD type, or in x0 (or x1 if $this is passed in x0) for non-POD type.
>
> So even for instance methods returning PODs, X8 should be used.
Experimentation shows otherwise: https://godbolt.org/g/jQVW78 X1 is used to pass the sret parameter. Trust but verify. :)
https://reviews.llvm.org/D49464
More information about the llvm-commits
mailing list