This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH 1/2] Aarch64: Add simd exp/expf ABI symbols
- From: Florian Weimer <fweimer at redhat dot com>
- To: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- Cc: Tulio Magno Quites Machado Filho <tuliom at ascii dot art dot br>, GNU C Library <libc-alpha at sourceware dot org>, Steve Ellcey <sellcey at marvell dot com>, nd <nd at arm dot com>, Francesco Petrogalli <Francesco dot Petrogalli at arm dot com>
- Date: Tue, 09 Jul 2019 12:00:05 +0200
- Subject: Re: [RFC PATCH 1/2] Aarch64: Add simd exp/expf ABI symbols
- References: <0ae3af1b-cb2b-367f-8b86-f39971498291@arm.com> <877e8scsov.fsf@linux.ibm.com> <724c8c4c-e89f-114e-14d5-94e269262fd5@arm.com>
* Szabolcs Nagy:
> On 08/07/2019 19:00, Tulio Magno Quites Machado Filho wrote:
>> Szabolcs Nagy <Szabolcs.Nagy@arm.com> writes:
>>
>>> diff --git a/sysdeps/aarch64/fpu/Versions b/sysdeps/aarch64/fpu/Versions
>>> new file mode 100644
>>> index 0000000000..da36f3c495
>>> --- /dev/null
>>> +++ b/sysdeps/aarch64/fpu/Versions
>>> @@ -0,0 +1,5 @@
>>> +libmvec {
>>> + GLIBC_2.30 {
>>> + _ZGVnN2v_exp; _ZGVnN4v_expf;
>>
>> The prefix _ZGV is reserved for guard variables in the C++ ABI [1] [2].
>> How do you plan to avoid a conflict there?
>>
>> [1] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/cp/mangle.c;#l4242
>> [2] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/testsuite/g%2B%2B.dg/abi/aarch64_guard1.C
>
> i noticed that too when this was designed, but it
> was decided that it's better to use the intel vector
> function mangling on aarch64 too than to introduce
> target specific mangling.
>
> i don't know how serious such a conflict is, nor why
> intel chose a clearly conflicting prefix. i assumed
> c++ folks were aware of the issue and accepted it
> when the intel vector abi was introduced.
I think the mangled names of objects always start with a capital letter,
so there is no conflict in practice because the libmvec names use a
lower-case letter after the _ZGV prefix.
It may make sense to ask the C++ developers for clarification.
Thanks,
Florian