Commit eb5ce910 by Richard Kenner

(define_insns for ffs[qhs]i2): Deleted.

(define_insns for ffs[qhs]i2): Deleted. These patterns only worked
when the input operand was not the same as the output operand.
(define_expand for ffssi2): New pattern. This uses an anonymous
pattern that describes what the ns32k's ffsd instruction (really)
does.

From-SVN: r12244
parent 0e09cc26
...@@ -2607,32 +2607,33 @@ ...@@ -2607,32 +2607,33 @@
;; ffs instructions ;; ffs instructions
(define_insn "ffsqi2" (define_insn ""
[(set (match_operand:QI 0 "general_operand" "=g") [(set (match_operand:SI 0 "general_operand" "ro")
(ffs:QI (match_operand:SI 1 "general_operand" "g")))] (minus:SI
"" (plus:SI (ffs:SI (zero_extract:SI
"* (match_operand:SI 1 "general_operand" "g")
{ (minus:SI (const_int 32) (match_dup 0))
return \"movqb 0,%0; ffsd %1,%0; bfs 1f; addqb 1,%0; 1:\"; (match_dup 0)))
}") (match_dup 0))
(const_int 1)))]
(define_insn "ffshi2" ""
[(set (match_operand:HI 0 "general_operand" "=g") "ffsd %1,%0; bfc 1f; addqd %$-1,%0; 1:")
(ffs:HI (match_operand:SI 1 "general_operand" "g")))]
"" (define_expand "ffssi2"
"* [(set (match_operand:SI 0 "general_operand" "=g") (const_int 0))
{ (set (match_dup 0)
return \"movqw 0,%0; ffsd %1,%0; bfs 1f; addqw 1,%0; 1:\"; (minus:SI
}") (plus:SI (ffs:SI (zero_extract:SI
(match_operand:SI 1 "general_operand" "g")
(define_insn "ffssi2" (minus:SI (const_int 32) (match_dup 0))
[(set (match_operand:SI 0 "general_operand" "=g") (match_dup 0)))
(ffs:SI (match_operand:SI 1 "general_operand" "g")))] (match_dup 0))
"" (const_int 1)))
"* (set (match_dup 0)
{ (plus:SI (match_dup 0)
return \"movqd 0,%0; ffsd %1,%0; bfs 1f; addqd 1,%0; 1:\"; (const_int 1)))]
}") ""
"operands[1] = make_safe_from(operands[1], operands[0]);")
;; Speed up stack adjust followed by a HI fixedpoint push. ;; Speed up stack adjust followed by a HI fixedpoint push.
......
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