public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Edelsohn <dje.gcc@gmail.com>
To: Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH,rs6000] Change -mcrypto to only affect Category:Vector.Crypto instructions
Date: Wed, 04 Mar 2015 22:32:00 -0000	[thread overview]
Message-ID: <CAGWvnykwEMHmS9hUkTrH4VxVagwbUqQCwa+n4SpNFSehv4JE6A@mail.gmail.com> (raw)
In-Reply-To: <1425500052.2996.15.camel@gnopaine>

On Wed, Mar 4, 2015 at 3:14 PM, Bill Schmidt
<wschmidt@linux.vnet.ibm.com> wrote:
> Hi,
>
> I recently observed that -mno-crypto disables all instructions in
> section 5.11 of the 2.07 ISA, rather than just those flagged as
> Category:Vector.Crypto.  This patch fixes that undesirable situation.
>
> The main fix is to ensure the remaining instructions are gated by
> TARGET_P8_VECTOR rather than TARGET_CRYPTO.  This leaves us in a
> somewhat ugly state where we have builtins named __builtin_crypto_* that
> are not controlled by -mcrypto.  However, we have to keep support for
> these existing builtins.  As discussed elsewhere, the longer-term plan
> is to implement a different common naming scheme for these builtins
> across all POWER compilers, at which point the __builtin_crypto_* forms
> will be deprecated.
>
> The changes to rs6000-builtin.def aren't the prettiest in the world, but
> were the best I could think of that continues support for the existing
> builtins while changing their predicates.  Let me know if there's a
> better way.
>
> Ok for trunk once GCC 5 branches?  I would eventually like to fix this
> in 4.8, 4.9, and 5 as well.
>
> Thanks,
> Bill
>
>
> [gcc]
>
> 2015-03-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
>
>         * config/rs6000/crypto.md (crypto_vpmsum<CR_char>): Change
>         TARGET_CRYPTO to TARGET_P8_VECTOR>
>         (crypto_vpermxor_<mode>): Likewise.
>         * config/rs6000/rs6000-builtin.def (BU_CRYPTO_2A): New #define.
>         (BU_CRYPTO_3A): Likewise.
>         (BU_CRYPTO_OVERLOAD_2A): Rename from BU_CRYPTO_OVERLOAD_2.
>         (BU_CRYPTO_OVERLOAD_3A): New #define.
>         (VPMSUMB): Change from BU_CRYPTO_2 to BU_CRYPTO_2A.
>         (VPMSUMH): Likewise.
>         (VPMSUMW): Likewise.
>         (VPMSUMD): Likewise.
>         (VPERMXOR_V2DI): Change from BU_CRYPTO_3 to BU_CRYPTO_3A.
>         (VPERMXOR_V4SI): Likewise.
>         (VPERMXOR_V8HI): Likewise.
>         (VPERMXOR_V16QI): Likewise.
>         (VPMSUM): Change from BU_CRYPTO_OVERLOAD_2 to
>         BU_CRYPTO_OVERLOAD_2A.
>         (VPERMXOR): Change from BU_CRYPTO_OVERLOAD3 to
>         BU_CRYPTO_OVERLOAD_3A.
>         * config/rs6000/rs6000.opt (mcrypto): Change description of
>         option.
>
> [gcc/testsuite]
>
> 2015-03-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
>
>         * gcc.target/powerpc/crypto-builtin-2.c: New.

Okay.

This definitely should be fixed in all releases.

Thanks, David

  reply	other threads:[~2015-03-04 22:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 20:14 Bill Schmidt
2015-03-04 22:32 ` David Edelsohn [this message]
2015-04-29 13:27 ` David Edelsohn
2015-04-30 21:58   ` Bill Schmidt

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=CAGWvnykwEMHmS9hUkTrH4VxVagwbUqQCwa+n4SpNFSehv4JE6A@mail.gmail.com \
    --to=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=wschmidt@linux.vnet.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).