public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: GT <tnggil@protonmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	"segher@kernel.crashing.org" <segher@kernel.crashing.org>,
	"dje.gcc@gmail.com" <dje.gcc@gmail.com>,
	"wschmidt@linux.ibm.com" <wschmidt@linux.ibm.com>,
	"tuliom@linux.ibm.com" <tuliom@linux.ibm.com>,
	Bert Tenjy <tnggil@gmail.com>
Subject: Re: [RFC PATCH v1 1/1] PPC64: Implement POWER Architecture Vector Function ABI.
Date: Mon, 10 Aug 2020 17:29:49 +0000	[thread overview]
Message-ID: <qcx7kliBQxlzRltWEwtIagQWfDk1XnH7NYQZFAebDr9VmbL3P_U_TkOjuXZWRFsVmovZkw1zdHP-dHh1q-KerjyH9VG1-D1aAE5UnTYGhwM=@protonmail.com> (raw)
In-Reply-To: <20200807205905.GD2363@tucnak>

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Friday, August 7, 2020 4:59 PM, Jakub Jelinek <jakub@redhat.com> wrote:

> On Fri, Aug 07, 2020 at 08:35:52PM +0000, Bert Tenjy via Gcc-patches wrote:
>
> > The document describing POWER Architecture Vector Function interface is
> > tentatively at: https://sourceware.org/glibc/wiki/Homepage?action=AttachFile&do=view&target=powerarchvectfuncabi.html
>
> Doesn't exist.

I can't tell what the issue is with the link as given above. But the one below does actually open
the page for me.

https://sourceware.org/glibc/wiki/HomePage?action=AttachFile&do=view&target=powerarchvectfuncabi.html


>
> > -   if (TARGET_VSX)
> > -   {
> > -        clonei->vecsize_mangle = 'b';
> >
> >
> > -        ret = 1;
> >
> >
> > -   }
> > -   clonei->mask_mode = VOIDmode;
> > -   switch (clonei->vecsize_mangle)
> > -   {
> > -   case 'b':
> > -        clonei->vecsize_int = 128;
> >
> >
> > -        clonei->vecsize_float = 128;
> >
> >
> > -        break;
> >
> >
> > -   case 'c':
> > -        clonei->vecsize_int = 128;
> >
> >
> > -        clonei->vecsize_float = 128;
> >
> >
>
> So what is this 'c' case here for?
>

I should have removed it. It will be deleted in the next version.

> > -        break;
> >
> >
> > -   default:
> > -        gcc_unreachable ();
> >
> >
>
> If (!TARGET_VSX), this will abort (as you only set vecsize_mangle to 'b'
> if TARGET_VSX, otherwise nothing sets it (so it remains 0).
>
> The way this works is that the caller calls the target hook with 0
> as last argument, and the hook either returns 0 (means not supported at
> all), or returns number of supported variants and provides the first one.
> If more than one are supported, the caller will keep iterating on those.
> E.g. on x86, we support 4 modes (b, c, d, e) for exported functions and
> for non-exported ones just choose a single one based on the ISA, because in
> that case it is not a matter of ABI.
>
> 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?

Bert.

  reply	other threads:[~2020-08-10 17:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07 20:35 Bert Tenjy
2020-08-07 20:59 ` Jakub Jelinek
2020-08-10 17:29   ` GT [this message]
2020-08-10 18:07     ` Jakub Jelinek
2020-08-13 20:40       ` GT
2020-08-13 21:00         ` Jakub Jelinek
2020-08-20 19:31           ` GT
2020-08-20 20:04             ` Jakub Jelinek
2020-08-20 20:29             ` Segher Boessenkool
2020-08-13 22:49 ` Segher Boessenkool
2020-08-17 17:44   ` GT
2020-08-17 21:28     ` Segher Boessenkool
2020-08-18 19:14       ` GT
2020-08-18 21:32         ` Segher Boessenkool
2020-08-20 16:19           ` GT
2020-08-20 17:48             ` Segher Boessenkool
2020-12-04 18:28               ` GT
2020-08-17 22:05     ` David Edelsohn
2020-08-17 23:06       ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='qcx7kliBQxlzRltWEwtIagQWfDk1XnH7NYQZFAebDr9VmbL3P_U_TkOjuXZWRFsVmovZkw1zdHP-dHh1q-KerjyH9VG1-D1aAE5UnTYGhwM=@protonmail.com' \
    --to=tnggil@protonmail.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=segher@kernel.crashing.org \
    --cc=tnggil@gmail.com \
    --cc=tuliom@linux.ibm.com \
    --cc=wschmidt@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).