From patchwork Mon Feb 18 15:38:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 221402 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 E49D32C0291 for ; Tue, 19 Feb 2013 02:39:10 +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=1361806751; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Date: From:To:Subject:Message-ID:Reply-To:MIME-Version:Content-Type: Content-Disposition:User-Agent:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=OkeDakBH+MkAFw3J1VfE2RsMobs=; b=CugzrAypoPttd/s NnMiHV777L1PBvpP7NDk7LYHeyJNaerAXMvdzbtk/LLCFVl0g1V7Y+kcIzm1Du/x 1ZPN7tif2u7Ih60tK0QJXXbvCO2PQwKWGX4DIr8PDPMmGiJFNltw6lMchCUXGVRo G64CBNYEDB+b7THbELDYJ3OlZUkk= 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:Date:From:To:Subject:Message-ID:Reply-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=j9nBYysd9AVWfeM9+fSmrLd3J6p99uBYtz1OJLQmut6KB45o6VSiqd2u0Bk826 S8jgc5fpu3B5OpH25XaQ7q39L0B0KWoKvqRtIJtXCv0RnUonp2xmu7IiNzX6keWW 2E+hfW7Zd5hEmaLK5w8vsg3yddh3DDRQw89jLKxTQpE3Q=; Received: (qmail 20187 invoked by alias); 18 Feb 2013 15:39:01 -0000 Received: (qmail 20085 invoked by uid 22791); 18 Feb 2013 15:39:01 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from hiauly1.hia.nrc.ca (HELO hiauly1.hia.nrc.ca) (132.246.10.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Feb 2013 15:38:47 +0000 Received: by hiauly1.hia.nrc.ca (Postfix, from userid 1000) id EFD294929; Mon, 18 Feb 2013 10:38:44 -0500 (EST) Date: Mon, 18 Feb 2013 10:38:44 -0500 From: John David Anglin To: gcc-patches@gcc.gnu.org Subject: [committed] Fix PR target/56214 Message-ID: <20130218153843.GA2139@hiauly1.hia.nrc.ca> Reply-To: John David Anglin MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) 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 attached change fixes PR target/56214. We need to reject everything but QImode and HImode when reload is in progress and strict is specified. Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11. Committed to trunk. Dave Index: config/pa/predicates.md =================================================================== --- config/pa/predicates.md (revision 196102) +++ config/pa/predicates.md (working copy) @@ -272,22 +272,13 @@ assumed in the instruction encoding. */ switch (mode) { + case BLKmode: case QImode: case HImode: return true; - case SImode: - case SFmode: - case SCmode: - return (INTVAL (op) % 4) == 0; - - case DImode: - case DFmode: - case DCmode: - return (INTVAL (op) % 8) == 0; - default: - break; + return (INTVAL (op) % GET_MODE_SIZE (mode)) == 0; } return false; Index: config/pa/pa.c =================================================================== --- config/pa/pa.c (revision 196102) +++ config/pa/pa.c (working copy) @@ -10517,21 +10532,13 @@ the majority of accesses will use floating point instructions that don't support 14-bit offsets. */ if (!INT14_OK_STRICT - && (GET_MODE_CLASS (mode) == MODE_FLOAT - || (reload_in_progress - && strict - && (mode == SImode || mode == DImode)))) - return false; + && reload_in_progress + && strict + && mode != QImode + && mode != HImode) + return false; - if (INT_14_BITS (index) - && (mode == BLKmode - || mode == QImode - || mode == HImode - /* Displacement must be a multiple of its size. */ - || (INTVAL (index) % GET_MODE_SIZE (mode)) == 0)) - return true; - - return false; + return base14_operand (index, mode); } if (!TARGET_DISABLE_INDEXING @@ -10586,11 +10593,11 @@ return true; if (!INT14_OK_STRICT - && (GET_MODE_CLASS (mode) == MODE_FLOAT - || (reload_in_progress - && strict - && (mode == SImode || mode == DImode)))) - return false; + && reload_in_progress + && strict + && mode != QImode + && mode != HImode) + return false; if (CONSTANT_P (XEXP (x, 1))) return true;