From patchwork Thu Apr 17 21:55:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 340078 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4E288140082 for ; Fri, 18 Apr 2014 07:56:30 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=ctfN4yiNl8cTiBOM9xQsj2B8Y3bmSLVbQevrbT30nSuDUzGlzUN/1 XOr1BLFulR4Fc9MNu4g/Z2q4YWu3zt5Hh0pijr4QZva12ZbVzf4CyEZmiwznfWJx ELLUQ9Vgutl8S/i1kFEEtxakQVilPX4WdJnc68u/elDTsowYKyYP+k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=r+lY8tNHYu8TbmzA3/owk32lhJs=; b=D4t9tuqOOvswDgmT1SA+ F+leHanQDmm/By5WZQRFBG5A2uYbTl6SsDQQoTxhF1O99D21ZEQo6W1Aq9smM+Ff qNjSQuGEa/biujMbzrflKOB5i9oG9ujxCdmDiv/jGmlMtrUh7rgtC3LjrUMUEddk rDd4d/tawRG6+sfVoT0F7TQ= Received: (qmail 26777 invoked by alias); 17 Apr 2014 21:56:23 -0000 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 Received: (qmail 26752 invoked by uid 89); 17 Apr 2014 21:56:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: e9.ny.us.ibm.com Received: from e9.ny.us.ibm.com (HELO e9.ny.us.ibm.com) (32.97.182.139) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 17 Apr 2014 21:56:21 +0000 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Apr 2014 17:56:19 -0400 Received: from d01dlp01.pok.ibm.com (9.56.250.166) by e9.ny.us.ibm.com (192.168.1.109) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 17 Apr 2014 17:56:17 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 0509C38C801D; Thu, 17 Apr 2014 17:56:17 -0400 (EDT) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by b01cxnp22035.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s3HLu8YW3277138; Thu, 17 Apr 2014 21:56:16 GMT Received: from d01av05.pok.ibm.com (localhost [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s3HLti1L009839; Thu, 17 Apr 2014 17:55:44 -0400 Received: from ibm-tiger.the-meissners.org (dhcp-9-32-77-206.usma.ibm.com [9.32.77.206]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s3HLti6u008673; Thu, 17 Apr 2014 17:55:44 -0400 Received: by ibm-tiger.the-meissners.org (Postfix, from userid 500) id 4773A43C2D; Thu, 17 Apr 2014 17:55:19 -0400 (EDT) Date: Thu, 17 Apr 2014 17:55:18 -0400 From: Michael Meissner To: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com, wschmidt@gcc.gnu.org, bergner@gcc.gnu.org, jakub@redhat.com Subject: [PATCH], PR target/60876 -- fix build issue with powerpc Message-ID: <20140417215518.GA2280@ibm-tiger.the-meissners.org> Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, dje.gcc@gmail.com, wschmidt@gcc.gnu.org, bergner@gcc.gnu.org, jakub@redhat.com MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14041721-7182-0000-0000-00000A5F6F4D X-IsSubscribed: yes I committed the following patch as obvious to fix the PowerPC build issue that came up with changes to machmode.h. These changes allow the compiler to build and bootstrap. Submitted as subversion id 209498. 2014-04-17 Michael Meissner PR target/60876 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Make sure GET_MODE_SIZE gets passed an enum machine_mode type and not integer. (rs6000_init_hard_regno_mode_ok): Likewise. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 209494) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -2329,6 +2329,8 @@ rs6000_setup_reg_addr_masks (void) for (m = 0; m < NUM_MACHINE_MODES; ++m) { + enum machine_mode m2 = (enum machine_mode)m; + /* SDmode is special in that we want to access it only via REG+REG addressing on power7 and above, since we want to use the LFIWZX and STFIWZX instructions to load it. */ @@ -2363,13 +2365,13 @@ rs6000_setup_reg_addr_masks (void) if (TARGET_UPDATE && (rc == RELOAD_REG_GPR || rc == RELOAD_REG_FPR) - && GET_MODE_SIZE (m) <= 8 - && !VECTOR_MODE_P (m) - && !COMPLEX_MODE_P (m) + && GET_MODE_SIZE (m2) <= 8 + && !VECTOR_MODE_P (m2) + && !COMPLEX_MODE_P (m2) && !indexed_only_p - && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m) == 8) - && !(m == DFmode && TARGET_UPPER_REGS_DF) - && !(m == SFmode && TARGET_UPPER_REGS_SF)) + && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (m2) == 8) + && !(m2 == DFmode && TARGET_UPPER_REGS_DF) + && !(m2 == SFmode && TARGET_UPPER_REGS_SF)) { addr_mask |= RELOAD_REG_PRE_INCDEC; @@ -2815,6 +2817,7 @@ rs6000_init_hard_regno_mode_ok (bool glo for (m = 0; m < NUM_MACHINE_MODES; ++m) { + enum machine_mode m2 = (enum machine_mode)m; int reg_size2 = reg_size; /* TFmode/TDmode always takes 2 registers, even in VSX. */ @@ -2823,7 +2826,7 @@ rs6000_init_hard_regno_mode_ok (bool glo reg_size2 = UNITS_PER_FP_WORD; rs6000_class_max_nregs[m][c] - = (GET_MODE_SIZE (m) + reg_size2 - 1) / reg_size2; + = (GET_MODE_SIZE (m2) + reg_size2 - 1) / reg_size2; } }