From patchwork Sat Jul 21 16:12:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 172447 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 3C8A72C0269 for ; Sun, 22 Jul 2012 02:12:43 +1000 (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=1343491963; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:Content-Type:Content-Transfer-Encoding:Subject: Date:Message-ID:CC:To:MIME-Version:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=nOmJEHE98Sa5guIKqQU5bVILeFo=; b=Z1EeIt2wNZdNu5X A1/WThCia7VYhjDaNiEHYeBqWwkH0wI+D2cDIn+y42M7e9EVzXfAmdPslrkNz03N JoAXuF6PdVegA8lCxMNmGV94c+kSTEaaF4PXfQkmGTamP5xflb7cMZbWbtRyZvAt r9Ru7NFqq7otKX8MAZpNlhmmvbpg= 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:Received:Received:From:Content-Type:Content-Transfer-Encoding:Subject:Date:Message-ID:CC:To:MIME-Version:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=QuA4hfRued8fqCVDOzLj8x6Lc7amdvI/QZUEQV1PUsMgBEooTtx90IU19Rt+5k GtdR20yRn+8ZdC7P36IQvoHyPrWpmX0wQXaiykPq6W5xMfCp1lPhgCyb8yMfdmfT pFffIniI0/E4oA/1oxXUgGO0KCmdQx9VJTXq0KxdpdZUU=; Received: (qmail 4824 invoked by alias); 21 Jul 2012 16:12:39 -0000 Received: (qmail 4810 invoked by uid 22791); 21 Jul 2012 16:12:37 -0000 X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 21 Jul 2012 16:12:24 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1SscI3-00064j-AZ from Iain_Sandoe@mentor.com ; Sat, 21 Jul 2012 09:12:23 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 21 Jul 2012 09:12:26 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Sat, 21 Jul 2012 17:12:21 +0100 From: Iain Sandoe Subject: [Patch, Darwin, ppc] constrain processor usage for m32. Date: Sat, 21 Jul 2012 17:12:20 +0100 Message-ID: CC: Mike Stump To: GCC Patches MIME-Version: 1.0 (Apple Message framework v1084) 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 Hi, At present, if a G5 or 970 processor is selected (-mcpu=), we can (and do) generate 64 bit register usage for m32 code. This appears to be a long-standing bug. OK for trunk & all open branches? Iain gcc/ * config/rs6000/darwin.h (OS_MISSING_POWERPC64): New. Index: gcc/config/rs6000/darwin.h =================================================================== --- gcc/config/rs6000/darwin.h (revision 189712) +++ gcc/config/rs6000/darwin.h (working copy) @@ -398,6 +398,9 @@ extern int darwin_emit_branch_islands; default, as kernel code doesn't save/restore those registers. */ #define OS_MISSING_ALTIVEC (flag_mkernel || flag_apple_kext) +/* When building m32 code, we cannot use POWERPC64. */ +#define OS_MISSING_POWERPC64 !TARGET_64BIT + /* Darwin has support for section anchors on powerpc*. It is disabled for any section containing a "zero-sized item" (because these are re-written as size=1 to be compatible with the OSX ld64).