From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45548 invoked by alias); 4 Mar 2015 22:32:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 45533 invoked by uid 89); 4 Mar 2015 22:32:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ig0-f178.google.com Received: from mail-ig0-f178.google.com (HELO mail-ig0-f178.google.com) (209.85.213.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 04 Mar 2015 22:32:35 +0000 Received: by igal13 with SMTP id l13so40898149iga.5 for ; Wed, 04 Mar 2015 14:32:33 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.50.225.72 with SMTP id ri8mr16081930igc.48.1425508353600; Wed, 04 Mar 2015 14:32:33 -0800 (PST) Received: by 10.36.77.66 with HTTP; Wed, 4 Mar 2015 14:32:33 -0800 (PST) In-Reply-To: <1425500052.2996.15.camel@gnopaine> References: <1425500052.2996.15.camel@gnopaine> Date: Wed, 04 Mar 2015 22:32:00 -0000 Message-ID: Subject: Re: [PATCH,rs6000] Change -mcrypto to only affect Category:Vector.Crypto instructions From: David Edelsohn To: Bill Schmidt Cc: GCC Patches Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2015-03/txt/msg00255.txt.bz2 On Wed, Mar 4, 2015 at 3:14 PM, Bill Schmidt 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 > > * config/rs6000/crypto.md (crypto_vpmsum): Change > TARGET_CRYPTO to TARGET_P8_VECTOR> > (crypto_vpermxor_): 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 > > * gcc.target/powerpc/crypto-builtin-2.c: New. Okay. This definitely should be fixed in all releases. Thanks, David