From patchwork Fri Jul 2 01:15:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Bergner X-Patchwork-Id: 57623 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 24E101007D1 for ; Fri, 2 Jul 2010 11:16:03 +1000 (EST) Received: (qmail 6068 invoked by alias); 2 Jul 2010 01:16:01 -0000 Received: (qmail 6059 invoked by uid 22791); 2 Jul 2010 01:16:00 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e3.ny.us.ibm.com (HELO e3.ny.us.ibm.com) (32.97.182.143) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Jul 2010 01:15:56 +0000 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by e3.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o6211rvO013329 for ; Thu, 1 Jul 2010 21:01:53 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o621FpGa1921026 for ; Thu, 1 Jul 2010 21:15:53 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o621Fp01004822 for ; Thu, 1 Jul 2010 22:15:51 -0300 Received: from [9.49.178.233] ([9.49.178.233]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o621FgXX003933; Thu, 1 Jul 2010 22:15:45 -0300 Subject: [PATCH, rs6000] Fix setting of target_flags when TARGET_{VSX, DFP, ALTIVEC} is enabled. From: Peter Bergner To: gcc-patches Cc: David Edelsohn , Michael Meissner Date: Thu, 01 Jul 2010 20:15:33 -0500 Message-ID: <1278033333.3681.11.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 While looking through the powerpc64-linux testsuite failures, I noticed that Mike's reciprocal estimate patches caused the vsx-vector-{5,6}.c test cases to fail because of a typo in rs6000_override_options. 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. This causes us to start generating the two operand form of the mfcr instruction which gas only accepts with -mpower4 or later. I fixed that by passing -mpower4 to gas whenever we use gcc's -maltivec option, unless we've explicitly passed -mcpu=XXX. I also added similar support for -mvsx. Bootstrapped and regtested on powerpc64-linux with no new regressions and vsx-vector-{5,6}.c test cases now passing. Ok for mainline once the slush is over? Peter * config/rs6000/rs6000.c (rs6000_override_options): Fix setting of default ISA flags. * config/rs6000/rs6000.h (ASM_CPU_SPEC) <-maltivec>: Pass -mpower4 by default. <-mvsx>: Add. 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-