mn10300: Add clzsi2.

From-SVN: r168723
This commit is contained in:
Richard Henderson 2011-01-12 09:53:50 -08:00 committed by Richard Henderson
parent d84760c980
commit f3d9d2e060
2 changed files with 27 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2011-01-12 Richard Henderson <rth@redhat.com>
* config/mn10300/mn10300.md (UNSPEC_BSCH): New.
(clzsi2, *bsch): New patterns.
* config/mn10300/mn10300.md (INT): New mode iterator.
(*mov<INT>_clr): New pattern, and peep2 to generate it.

View File

@ -36,6 +36,8 @@
(UNSPEC_GOTOFF 3)
(UNSPEC_PLT 4)
(UNSPEC_GOTSYM_OFF 5)
(UNSPEC_BSCH 7)
])
(include "predicates.md")
@ -2352,6 +2354,28 @@
(const_int 11) (const_int 22)))]
)
;; ----------------------------------------------------------------------
;; MISCELANEOUS
;; ----------------------------------------------------------------------
(define_expand "clzsi2"
[(parallel [(set (match_operand:SI 0 "register_operand" "")
(unspec:SI [(match_operand:SI 1 "register_operand" "")
(const_int 0)] UNSPEC_BSCH))
(clobber (reg:CC CC_REG))])]
"TARGET_AM33"
)
(define_insn "*bsch"
[(set (match_operand:SI 0 "register_operand" "=r")
(unspec:SI [(match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "nonmemory_operand" "0")]
UNSPEC_BSCH))
(clobber (reg:CC CC_REG))]
"TARGET_AM33"
"bsch %1,%0"
)
;; ----------------------------------------------------------------------
;; FP INSTRUCTIONS
;; ----------------------------------------------------------------------