From patchwork Fri Jul 2 16:44:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Bergner X-Patchwork-Id: 57676 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id C060C1007D2 for ; Sat, 3 Jul 2010 02:45:13 +1000 (EST) Received: (qmail 21147 invoked by alias); 2 Jul 2010 16:45:09 -0000 Received: (qmail 21128 invoked by uid 22791); 2 Jul 2010 16:45:06 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e2.ny.us.ibm.com (HELO e2.ny.us.ibm.com) (32.97.182.142) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Jul 2010 16:45:01 +0000 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e2.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o62GVshX011688 for ; Fri, 2 Jul 2010 12:31:54 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o62GiwuB1671348 for ; Fri, 2 Jul 2010 12:44:58 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o62Giwe5022316 for ; Fri, 2 Jul 2010 13:44:58 -0300 Received: from [9.76.72.69] (sig-9-76-72-69.mts.ibm.com [9.76.72.69]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o62Gii7W021851; Fri, 2 Jul 2010 13:44:48 -0300 Subject: Re: [PATCH, rs6000] Fix setting of target_flags when TARGET_{VSX, DFP, ALTIVEC} is enabled. From: Peter Bergner To: Alan Modra Cc: gcc-patches , David Edelsohn , Michael Meissner In-Reply-To: <1278042498.3681.14.camel@otta> References: <1278033333.3681.11.camel@otta> <20100702032500.GK6954@bubble.grove.modra.org> <1278042498.3681.14.camel@otta> Date: Fri, 02 Jul 2010 11:44:35 -0500 Message-ID: <1278089075.3681.64.camel@otta> Mime-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Thu, 2010-07-01 at 22:48 -0500, Peter Bergner wrote: > On Fri, 2010-07-02 at 12:55 +0930, Alan Modra wrote: > > On Thu, Jul 01, 2010 at 08:15:33PM -0500, Peter Bergner wrote: > > > After fixing that, I noticed the fixed code caused a couple of new testsuite > > > failures that I tracked down to us now setting MASK_PPC_GFXOPT in the > > > target_flags whenever TARGET_ALTIVEC is enabled. > > > > I think that is wrong. A 7400 or 7450 (G4) processor has altivec but > > not the newer form of mfcr, at least if I can read the data sheets > > correctly. I think they also use the older y bit for branch hints. > > I had wondered to myself whether we wanted to add that mask, but after > looking that the 7400 and 7450 already have the MASK_PPC_GFXOPT set > for -mcpu={7400,7450}, I guess I convinced myself that it was right. > I guess I need to track down how that two operand form mfcr is being > generated. Ok, I tracked down the testsuite failures that were due to us generating the two operand form of the mfcr instruction. They ended up all being test cases where we compiled with "-maltivec -mvsx ...". The -mvsx option causes us to add the ISA_2_6_MASKS flags to target_flags which includes the MASK_MFCRF flag which is how we're getting the two operand mfcr form. I guess that means we only have to pass additional gas options whenever we have -mvsx and not when we only have -maltivec, so the -maltivec change can be dropped. That leaves us with the updated patch below. Is this ok for trunk once bootstrapping and regtesting are complete? Peter * config/rs6000/rs6000.c (rs6000_override_options): Fix setting of default ISA flags. * config/rs6000/rs6000.h (ASM_CPU_SPEC): Add -mvsx. Index: config/rs6000/rs6000.c =================================================================== --- config/rs6000/rs6000.c (revision 161490) +++ config/rs6000/rs6000.c (working copy) @@ -2656,11 +2656,11 @@ rs6000_override_options (const char *def /* For the newer switches (vsx, dfp, etc.) set some of the older options, unless the user explicitly used the -mno-