Commit 977eef43 by Jim Wilson

(xtrct_left, xtrct_right): New patterns.

From-SVN: r13904
parent 460f4b9d
...@@ -1296,6 +1296,26 @@ ...@@ -1296,6 +1296,26 @@
(const_string "14"))) (const_string "14")))
(set_attr "type" "arith")]) (set_attr "type" "arith")])
;; These patterns are found in expansions of DImode shifts by 16, and
;; allow the xtrct instruction to be generated from C source.
(define_insn "xtrct_left"
[(set (match_operand:SI 0 "arith_reg_operand" "=r")
(ior:SI (ashift:SI (match_operand:SI 1 "arith_reg_operand" "r")
(const_int 16))
(lshiftrt:SI (match_operand:SI 2 "arith_reg_operand" "0")
(const_int 16))))]
""
"xtrct %1,%0")
(define_insn "xtrct_right"
[(set (match_operand:SI 0 "arith_reg_operand" "=r")
(ior:SI (lshiftrt:SI (match_operand:SI 1 "arith_reg_operand" "0")
(const_int 16))
(ashift:SI (match_operand:SI 2 "arith_reg_operand" "r")
(const_int 16))))]
""
"xtrct %2,%0")
;; ------------------------------------------------------------------------- ;; -------------------------------------------------------------------------
;; Unary arithmetic ;; Unary arithmetic
......
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