Commit 3fb9e749 by Jeff Law

h8300.h (OK_FOR_U): (const (plus (symbol_ref) (const_int))) is a valid U operand if...

        * h8300/h8300.h (OK_FOR_U): (const (plus (symbol_ref) (const_int)))
        is a valid U operand if SYMBOL_REF_FLAG is set on the
        SYMBOL_REF.
        * h8300/h8300.md (memory btst patterns): New patterns.

From-SVN: r11954
parent fabdc32d
......@@ -791,7 +791,12 @@ struct rtx_def *function_arg();
|| (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == REG \
&& REG_OK_FOR_BASE_P (XEXP (OP, 0))) \
|| (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == SYMBOL_REF \
&& SYMBOL_REF_FLAG (XEXP (OP, 0))))
&& SYMBOL_REF_FLAG (XEXP (OP, 0))) \
|| (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == CONST \
&& GET_CODE (XEXP (XEXP (OP, 0), 0)) == PLUS \
&& GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 0)) == SYMBOL_REF \
&& SYMBOL_REF_FLAG (XEXP (XEXP (XEXP (OP, 0), 0), 0)) \
&& GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 1)) == CONST_INT))
#define EXTRA_CONSTRAINT(OP, C) \
((C) == 'U' ? OK_FOR_U (OP) : 0)
......
......@@ -453,6 +453,33 @@
;; ----------------------------------------------------------------------
(define_insn ""
[(set (cc0) (zero_extract:QI (match_operand:QI 0 "memory_operand" "U")
(const_int 1)
(match_operand:QI 1 "const_int_operand" "n")))]
""
"btst %Z1,%R0"
[(set_attr "length" "2")
(set_attr "cc" "set_zn_c0")])
(define_insn ""
[(set (cc0) (zero_extract:HI (match_operand:QI 0 "memory_operand" "U")
(const_int 1)
(match_operand:QI 1 "const_int_operand" "n")))]
""
"btst %Z1,%Y0"
[(set_attr "length" "2")
(set_attr "cc" "set_zn_c0")])
(define_insn ""
[(set (cc0) (zero_extract:SI (match_operand:QI 0 "memory_operand" "U")
(const_int 1)
(match_operand:QI 1 "const_int_operand" "n")))]
""
"btst %Z1,%Y0"
[(set_attr "length" "2")
(set_attr "cc" "set_zn_c0")])
(define_insn ""
[(set (cc0) (zero_extract:QI (match_operand:HI 0 "register_operand" "r")
(const_int 1)
(match_operand:HI 1 "const_int_operand" "n")))]
......
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