From patchwork Fri Feb 8 14:58:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Edelsohn X-Patchwork-Id: 219173 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 D86F02C0087 for ; Sat, 9 Feb 2013 01:58:30 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1360940311; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=nqgU82k 4Dc+SGEA5VVyR2u45i+s=; b=H+TN2qjbEQsBBTjHuBTa2awG2uxLiPgWGUIJ+yv TvNt8M+RnYTjkZTwtw/u6YOiZYlzEiwGSEV+XouVBHz5Rv/TLlJvx5yq4qvvAhlm NqrbgmF+2mdj16tpe5O9CoKk8G+mPueZjdQN/G+5G7qxmmYNXqEBMvHLFO6bcZST 9/EQ= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:X-Received:Received:Date:Message-ID:Subject:From:To:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=RWL2U5tMaNwjrIjFfyim7Cxk1epyV6tlvQxSlZgAoTqsZCfr8RfagHtaxoFurV QQy7KXMUPrI1zKJNpdoYjOm4b0b1UQ72+OD3bVQ8gqKpaGe75jeBZENb1dkegiER 377vItayy9klsL6IC/ULCiG7IFQ4O3KibwRQtiAoUSQI0=; Received: (qmail 1317 invoked by alias); 8 Feb 2013 14:58:23 -0000 Received: (qmail 1236 invoked by uid 22791); 8 Feb 2013 14:58:21 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-we0-f177.google.com (HELO mail-we0-f177.google.com) (74.125.82.177) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Feb 2013 14:58:06 +0000 Received: by mail-we0-f177.google.com with SMTP id d7so3070793wer.8 for ; Fri, 08 Feb 2013 06:58:04 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.100.169 with SMTP id ez9mr2601600wib.3.1360335481780; Fri, 08 Feb 2013 06:58:01 -0800 (PST) Received: by 10.194.43.5 with HTTP; Fri, 8 Feb 2013 06:58:01 -0800 (PST) Date: Fri, 8 Feb 2013 09:58:01 -0500 Message-ID: Subject: [4.7 PATCH, committed] Clear MASK_ALTIVEC if no OS support From: David Edelsohn To: GCC Patches 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 The -mcpu=XXX options enable processor features, including Altivec and VSX. Some OS releases do not have support for that feature. GCC included code to clear those features for Altivec, but it had not been updated when VSX was added. This was fixed on mainline as part of the general masks cleanup, but had not been backported to GCC 4.7 and GCC 4.6. Thanks, David * config/rs6000/rs6000.c (rs6000_option_override_internal): Clear MASK_VSX from set_masks if OS_MISSING_ALTIVEC. Index: rs6000.c =================================================================== --- rs6000.c (revision 195886) +++ rs6000.c (working copy) @@ -1,7 +1,7 @@ /* Subroutines used for code generation on IBM RS/6000. Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, - 2012 + 2012, 2013 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) @@ -2646,7 +2646,7 @@ #endif #ifdef OS_MISSING_ALTIVEC if (OS_MISSING_ALTIVEC) - set_masks &= ~MASK_ALTIVEC; + set_masks &= ~(MASK_ALTIVEC | MASK_VSX); #endif /* Don't override by the processor default if given explicitly. */