From patchwork Wed Jun 8 23:14:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaz Kojima X-Patchwork-Id: 99585 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 5B9FAB6FDC for ; Thu, 9 Jun 2011 09:15:17 +1000 (EST) Received: (qmail 28877 invoked by alias); 8 Jun 2011 23:15:16 -0000 Received: (qmail 28867 invoked by uid 22791); 8 Jun 2011 23:15:15 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mo11.iij4u.or.jp (HELO mo.iij4u.or.jp) (210.138.174.79) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Jun 2011 23:14:59 +0000 Received: by mo.iij4u.or.jp (mo11) id p58NEv9k013538; Thu, 9 Jun 2011 08:14:57 +0900 Received: from localhost (238.152.138.210.bn.2iij.net [210.138.152.238]) by mbox.iij4u.or.jp (mbox10) id p58NEudE017000; Thu, 9 Jun 2011 08:14:57 +0900 Date: Thu, 09 Jun 2011 08:14:56 +0900 (JST) Message-Id: <20110609.081456.330800945.kkojima@rr.iij4u.or.jp> To: gcc-patches@gcc.gnu.org Subject: [patch committed] Fix PR target/49305 From: Kaz Kojima 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 Hi, My patch r174586 on trunk was a bit incomplete and causes PR49305 on sh2a target. The attached patch is to fix it. Tested on sh-elf and sh4-unknown-linux-gnu and applied on trunk. BTW, when looking into PR, I noticed that we forgot to utilize 32-bit mov.w instructions on sh2a while 32-bit mov.[bl] instructions are enabled on that target already. I'll prepare the patch for it. Regards, kaz --- 2011-06-08 Kaz Kojima PR target/49305 * config/sh/predicates.md (general_movsrc_operand): Check mode for memory with indexed address for QI and HImode. (general_movdst_operand): Likewise. --- ORIG/trunk/gcc/config/sh/predicates.md 2011-06-04 10:16:51.000000000 +0900 +++ trunk/gcc/config/sh/predicates.md 2011-06-08 18:55:09.000000000 +0900 @@ -395,6 +395,7 @@ } if ((mode == QImode || mode == HImode) + && mode == GET_MODE (op) && (MEM_P (op) || (GET_CODE (op) == SUBREG && MEM_P (SUBREG_REG (op))))) { @@ -432,6 +433,7 @@ return 0; if ((mode == QImode || mode == HImode) + && mode == GET_MODE (op) && (MEM_P (op) || (GET_CODE (op) == SUBREG && MEM_P (SUBREG_REG (op))))) {