Commit 3681df8f by Nick Clifton Committed by Nick Clifton

re PR target/33132 (m32r: ICE: RTL check: expected elt 0 type 'i' or 'n', have…

re PR target/33132 (m32r: ICE: RTL check: expected elt 0 type 'i' or 'n', have 'w' (rtx const_int) in insn_current_length, at insn-attrtab.c:29)

PR target/33132
* config/m32r/constraints.md: Add W constraint for integer zero.
* config/m32r/m32r.md (get_pc): Use W and i constraints.
  Fix length calculation by using alternatives.

From-SVN: r127992
parent 62442ab9
2007-08-31 Nick Clifton <nickc@redhat.com>
PR target/33132
* config/m32r/constraints.md: Add W constraint for integer zero.
* config/m32r/m32r.md (get_pc): Use W and i constraints.
Fix length calculation by using alternatives.
2007-08-31 Richard Sandiford <richard@codesourcery.com> 2007-08-31 Richard Sandiford <richard@codesourcery.com>
* optabs.c (shift_optab_p, commutative_optab_p): New functions, * optabs.c (shift_optab_p, commutative_optab_p): New functions,
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
;; S is for stores with pre {inc,dec}rement ;; S is for stores with pre {inc,dec}rement
;; T is for indirect of a pointer. ;; T is for indirect of a pointer.
;; U is for loads with post increment. ;; U is for loads with post increment.
;; W is used for an immediate value of 0.
;; ;;
;; Register constraints ;; Register constraints
...@@ -128,3 +129,9 @@ ...@@ -128,3 +129,9 @@
"A load with post increment." "A load with post increment."
(and (match_code "mem") (and (match_code "mem")
(match_test "LOAD_POSTINC_P (GET_MODE (op), XEXP (op, 0))"))) (match_test "LOAD_POSTINC_P (GET_MODE (op), XEXP (op, 0))")))
(define_constraint "W"
"zero immediate."
(and (match_code "const_int")
(match_test "ival == 0")))
...@@ -2637,19 +2637,14 @@ ...@@ -2637,19 +2637,14 @@
(define_insn "get_pc" (define_insn "get_pc"
[(clobber (reg:SI 14)) [(clobber (reg:SI 14))
(set (match_operand 0 "register_operand" "=r") (set (match_operand 0 "register_operand" "=r,r")
(unspec [(match_operand 1 "" "")] UNSPEC_GET_PC)) (unspec [(match_operand 1 "" "")] UNSPEC_GET_PC))
(use (match_operand:SI 2 "immediate_operand" ""))] (use (match_operand:SI 2 "immediate_operand" "W,i"))]
"flag_pic" "flag_pic"
"* "@
{ bl.s .+4\;seth %0,%#shigh(%1)\;add3 %0,%0,%#low(%1+4)\;add %0,lr
if (INTVAL(operands[2])) bl.s .+4\;ld24 %0,%#%1\;add %0,lr"
return \"bl.s .+4\;ld24 %0,%#%1\;add %0,lr\"; [(set_attr "length" "12,8")])
else
return \"bl.s .+4\;seth %0,%#shigh(%1)\;add3 %0,%0,%#low(%1+4)\;add %0,lr\";}"
[(set (attr "length") (if_then_else (ne (match_dup 2) (const_int 0))
(const_int 8)
(const_int 12)))])
(define_expand "builtin_setjmp_receiver" (define_expand "builtin_setjmp_receiver"
[(label_ref (match_operand 0 "" ""))] [(label_ref (match_operand 0 "" ""))]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment