From patchwork Sun Jul 31 23:02:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaz Kojima X-Patchwork-Id: 107649 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 EDC89B702E for ; Mon, 1 Aug 2011 09:02:41 +1000 (EST) Received: (qmail 12669 invoked by alias); 31 Jul 2011 23:02:39 -0000 Received: (qmail 12661 invoked by uid 22791); 31 Jul 2011 23:02:38 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RP_MATCHES_RCVD, SPF_HELO_PASS 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; Sun, 31 Jul 2011 23:02:24 +0000 Received: by mo.iij4u.or.jp (mo11) id p6VN2MLl026841; Mon, 1 Aug 2011 08:02:22 +0900 Received: from localhost (238.152.138.210.bn.2iij.net [210.138.152.238]) by mbox.iij4u.or.jp (mbox10) id p6VN2Mpo031654; Mon, 1 Aug 2011 08:02:22 +0900 Date: Mon, 01 Aug 2011 08:02:21 +0900 (JST) Message-Id: <20110801.080221.104943315.kkojima@rr.iij4u.or.jp> To: gcc-patches@gcc.gnu.org Subject: [patch committed] Fix PR target/49880 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, The attached patch is to fix PR target/49880. All SH compilers ICE with -m4 -mdiv=call-div1 which is a bit unusual combination of options. Tested on sh4-unknown-linux-gnu with no new failures. Applied on trunk. Regards, kaz --- 2011-07-31 Kaz Kojima PR target/49880 * config/sh/sh.md (udivsi3_i1): Enable for TARGET_DIVIDE_CALL_DIV1. (divsi3_i1): Likewise. --- ORIG/trunk/gcc/config/sh/sh.md 2011-07-20 09:27:11.000000000 +0900 +++ trunk/gcc/config/sh/sh.md 2011-07-28 06:49:41.000000000 +0900 @@ -1609,7 +1609,7 @@ (clobber (reg:SI PR_REG)) (clobber (reg:SI R4_REG)) (use (match_operand:SI 1 "arith_reg_operand" "r"))] - "TARGET_SH1 && ! TARGET_SH4" + "TARGET_SH1 && (! TARGET_SH4 || TARGET_DIVIDE_CALL_DIV1)" "jsr @%1%#" [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) @@ -1815,7 +1815,7 @@ (clobber (reg:SI R2_REG)) (clobber (reg:SI R3_REG)) (use (match_operand:SI 1 "arith_reg_operand" "r"))] - "TARGET_SH1 && ! TARGET_SH4" + "TARGET_SH1 && (! TARGET_SH4 || TARGET_DIVIDE_CALL_DIV1)" "jsr @%1%#" [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")])