Date: Tue, 3 Aug 2021 18:28:40 +0000
On Tue, 3 Aug 2021, will wray via Liaison wrote:
> Discussion of ABI will be useful too - thanks for raising it.
>
> Is array by-value abi distinct from vector type mangling?
Yes. First, the C-level and machine-level ABI issues (defining what
registers are used to store the returned array, or defining that a pointer
to storage for the array is passed implicitly to the function in a
particular register or memory location, for example) are a separate matter
from defining name mangling for C++. Second, arrays are a different kind
of type from vectors and may well not have the same ABI.
Some architectures may already have an ABI defined in language-independent
terms, which covers array arguments and return values for other languages
that already support such things. In such cases (e.g. Arm, both 32-bit
and 64-bit), you can read off what the ABI would be for arrays returned by
value without needing actual changes to the ABI document.
(However, you can't read an ABI for _BitInt off the existing Arm ABI
documents because that's not one of the kinds of types,
language-independent or C/C++, that's currently covered by those documents
at all.)
> Discussion of ABI will be useful too - thanks for raising it.
>
> Is array by-value abi distinct from vector type mangling?
Yes. First, the C-level and machine-level ABI issues (defining what
registers are used to store the returned array, or defining that a pointer
to storage for the array is passed implicitly to the function in a
particular register or memory location, for example) are a separate matter
from defining name mangling for C++. Second, arrays are a different kind
of type from vectors and may well not have the same ABI.
Some architectures may already have an ABI defined in language-independent
terms, which covers array arguments and return values for other languages
that already support such things. In such cases (e.g. Arm, both 32-bit
and 64-bit), you can read off what the ABI would be for arrays returned by
value without needing actual changes to the ABI document.
(However, you can't read an ABI for _BitInt off the existing Arm ABI
documents because that's not one of the kinds of types,
language-independent or C/C++, that's currently covered by those documents
at all.)
-- Joseph S. Myers joseph_at_[hidden]
Received on 2021-08-03 13:28:48