On Wed, Mar 4, 2015 at 3:14 PM, Bill Schmidt <wschm...@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 <wschm...@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 <wschm...@linux.vnet.ibm.com> > > * gcc.target/powerpc/crypto-builtin-2.c: New.
Okay. This definitely should be fixed in all releases. Thanks, David