[RFC PATCH v1 1/1] PPC64: Implement POWER Architecture Vector Function ABI.
Thu Aug 13 20:40:22 GMT 2020
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, August 10, 2020 2:07 PM, Jakub Jelinek <firstname.lastname@example.org> wrote:
> On Mon, Aug 10, 2020 at 05:29:49PM +0000, GT wrote:
> > > For PowerPC, if all you want to support is b which requires VSX, then the
> > > right thing is for !TREE_PUBLIC functions return 0 if !TARGET_VSX and
> > > otherwise set vecsize_mangle to 'b' and in the end return 1, for exported
> > > functions always set it to 'b' (and in the end return 1).
> > > Then ensure that the 'b' variants of function definitions get target ("vsx")
> > > attribute added if !TARGET_VSX.
> > So setting attribute "vsx" for 'b' variants of function definitions is what
> > should go in function rs6000_simd_clone_usable?
> No. That function should say if the particular clone ('b' in this case) is
> usable from some caller, and the answer for your 'b' is TARGET_VSX is
> required to be non-zero.
> The adjustment should go into the simd_clone_adjust target hook, see
> what ix86_simd_clone_adjust does (though, that one has more variants to
I'm looking at ix86_simd_clone_adjust and also aarch64_simd_clone_adjust. The latter is
much simpler and I see how I would add PPC attribute "vsx" similarly. If I was to follow
the ix86_simd_clone_adjust organization, then ix86_valid_target_attribute_p called near
the end of the function is a problem. Because it in turn calls
ix86_valid_target_attribute_tree and this last function doesn't have a similarly named
function in PPC code.
Also, once the attribute "vsx" is added, where is it used? I mean that in the sense of
where is execution conditioned on the definition of say, the "sse2" string in x86_64?
More information about the Gcc-patches