From patchwork Fri Oct 29 20:40:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: pdp11: fix ICE Date: Fri, 29 Oct 2010 10:40:53 -0000 From: Paul Koning X-Patchwork-Id: 69629 Message-Id: <6A0E3476-767E-428B-9F53-B62C45EB7343@dell.com> To: gcc-patches 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" ; "")