From patchwork Fri Oct 29 20:40:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Koning X-Patchwork-Id: 69629 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 37C84B70E2 for ; Sat, 30 Oct 2010 07:41:02 +1100 (EST) Received: (qmail 26684 invoked by alias); 29 Oct 2010 20:41:00 -0000 Received: (qmail 26673 invoked by uid 22791); 29 Oct 2010 20:40:59 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, TW_VH, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausc60ps301.us.dell.com (HELO ausc60ps301.us.dell.com) (143.166.148.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Oct 2010 20:40:56 +0000 X-Loopcount0: from 10.152.240.141 From: Paul Koning Subject: [PATCH] pdp11: fix ICE Date: Fri, 29 Oct 2010 16:40:53 -0400 Message-Id: <6A0E3476-767E-428B-9F53-B62C45EB7343@dell.com> To: gcc-patches Mime-Version: 1.0 (Apple Message framework v1081) 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 This fixes an ICE in divhi3 when the dividend is a constant. Tested by build and make check. Committed. paul ChangeLog: 2010-10-29 Paul Koning * config/pdp11/pdp11.md (divhi3, modhi3, divmodhi3): Fix ICE. Index: config/pdp11/pdp11.md =================================================================== --- config/pdp11/pdp11.md (revision 166073) +++ config/pdp11/pdp11.md (working copy) @@ -1418,9 +1418,9 @@ (define_expand "divhi3" [(set (subreg:HI (match_dup 1) 0) - (div:HI (match_operand:SI 1 "general_operand" "0") + (div:HI (match_operand:SI 1 "register_operand" "0") (match_operand:HI 2 "general_operand" "g"))) - (set (match_operand:HI 0 "general_operand" "=r") + (set (match_operand:HI 0 "register_operand" "=r") (subreg:HI (match_dup 1) 0))] "TARGET_40_PLUS" "") @@ -1435,9 +1435,9 @@ (define_expand "modhi3" [(set (subreg:HI (match_dup 1) 2) - (mod:HI (match_operand:SI 1 "general_operand" "0") + (mod:HI (match_operand:SI 1 "register_operand" "0") (match_operand:HI 2 "general_operand" "g"))) - (set (match_operand:HI 0 "general_operand" "=r") + (set (match_operand:HI 0 "register_operand" "=r") (subreg:HI (match_dup 1) 2))] "TARGET_40_PLUS" "") @@ -1452,14 +1452,14 @@ ;(define_expand "divmodhi4" ; [(parallel [(set (subreg:HI (match_dup 1) 0) -; (div:HI (match_operand:SI 1 "general_operand" "0") +; (div:HI (match_operand:SI 1 "register_operand" "0") ; (match_operand:HI 2 "general_operand" "g"))) ; (set (subreg:HI (match_dup 1) 2) ; (mod:HI (match_dup 1) ; (match_dup 2)))]) -; (set (match_operand:HI 3 "general_operand" "=r") +; (set (match_operand:HI 3 "register_operand" "=r") ; (subreg:HI (match_dup 1) 2)) -; (set (match_operand:HI 0 "general_operand" "=r") +; (set (match_operand:HI 0 "register_operand" "=r") ; (subreg:HI (match_dup 1) 0))] ; "TARGET_40_PLUS" ; "")