This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [Aarch64] Vector Function Application Binary Interface Specification for OpenMP
- From: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>
- To: sellcey at cavium dot com, Francesco Petrogalli <Francesco dot Petrogalli at arm dot com>
- Cc: James Greenhalgh <James dot Greenhalgh at arm dot com>, "Sekhar, Ashwin" <Ashwin dot Sekhar at cavium dot com>, gcc <gcc at gcc dot gnu dot org>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, nd <nd at arm dot com>
- Date: Wed, 16 May 2018 17:30:05 +0100
- Subject: Re: [Aarch64] Vector Function Application Binary Interface Specification for OpenMP
- References: <1518212868.14236.47.camel@cavium.com> <32617133-64DC-4F62-B7A0-A6B417C5B14E@arm.com> <1526487700.29509.6.camel@cavium.com>
On 16/05/18 17:21, Steve Ellcey wrote:
> On Tue, 2018-05-15 at 18:29 +0000, Francesco Petrogalli wrote:
>
>> Hi Steve,
>>
>> I am happy to let you know that the Vector Function ABI for AArch64
>> is now public and available via the link at [1].
>>
>> Don’t hesitate to contact me in case you have any questions.
>>
>> Kind regards,
>>
>> Francesco
>>
>> [1] https://developer.arm.com/products/software-development-tools/hpc
>> /arm-compiler-for-hpc/vector-function-abi
>>
>>>
>>> Steve Ellcey
>>> sellcey@cavium.com
>
> Thanks for publishing this Francesco, it looks like the main issue for
> GCC is that the Vector Function ABI has different caller saved / callee
> saved register conventions than the standard ARM calling convention.
>
> If I understand things correctly, in the standard calling convention
> the callee will only save the bottom 64 bits of V8-V15 and so the
> caller needs to save those registers if it is using the top half. In
> the Vector calling convention the callee will save all 128 bits of
> these registers (and possibly more registers) so the caller does not
> have to save these registers at all, even if it is using all 128 bits
> of them.
>
> It doesn't look like GCC has any existing mechanism for having different
> sets of caller saved/callee saved registers depending on the function
> attributes of the calling or called function.
>
> Changing what registers a callee function saves and restores shouldn't
> be too difficult since that can be done when generating the prologue
> and epilogue code but changing what registers a caller saves/restores
> when doing the call seems trickier. The macro
> TARGET_HARD_REGNO_CALL_PART_CLOBBERED doesn't know anything about the
> function being called. It returns true/false depending on just the
> register number and mode.
>
> Steve Ellcey
> sellcey@cavium.com
>
Actually, we can. See, for example, the attribute((pcs)) for the ARM
port. I think we could probably handle this automagically for the SVE
vector calling convention in AArch64.
R.