This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Patch to allow use of DECL_NAME in libmvec calls instead of DECL_ASSEMBER_NAME


On Tue, Mar 12, 2019 at 09:25:35AM +0100, Richard Biener wrote:
> I think this needs to be fixed on the glibc side - if glibc advertises
> 
> float expf (float, float)
> __attribute__((simd(notinbranch),alias("__expf_finite"))
> 
> or so then you of course have to provide an implementation that matches this.
> 
> It shouldn't be difficult to provide an alias from the glibc side, no?  How does
> x86 avoid this issue?

Yeah, the patch looks just wrong, it is completely intentional that we use
DECL_ASSEMBLER_NAME, it is part of the OpenMP ABI, e.g. for C++ we really
need to use the C++ mangled names there, can't use foo or __ct instead of
say _Z3fooii or _ZN1AC2Ev as the base parts of the names.

Please have a look at how this works on x86_64 on the glibc side and do the
aarch64 glibc patch similarly.

> > 2018-03-11  Steve Ellcey  <sellcey@marvell.com>
> >
> >         * config/aarch64/aarch64.c (aarch64_simd_clone_vec_base_name):
> >         New function.
> >         (TARGET_SIMD_CLONE_VEC_BASE_NAME): New macro.
> >         * doc/tm.texi.in (TARGET_SIMD_CLONE_VEC_BASE_NAME): New hook.
> >         * doc/tm.texi: Regenerate.
> >         * omp-simd-clone.c (simd_clone_mangle): Call vec_base_name hook.
> >         * target.def (vec_base_name): New hook.
> >         * targhooks.c (cgraph.h): New include.
> >         (default_vec_base_name): New function.
> >         * targhooks.h (default_vec_base_name): New function declaration.
> >

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]