Commit cd6bd5fc by Richard Kenner

(fancy_btst,fancy_btst1): Branch target must be operand 0 for length

attribute to work.

From-SVN: r10249
parent 3511415d
......@@ -2167,42 +2167,42 @@
(define_insn "fancy_btst"
[(set (pc)
(if_then_else (eq (zero_extract:HI (zero_extend:HI (match_operand:QI 0 "general_operand" "Ur"))
(if_then_else (eq (zero_extract:HI (zero_extend:HI (match_operand:QI 1 "general_operand" "Ur"))
(const_int 1)
(match_operand:HI 1 "nonmemory_operand" "rn"))
(match_operand:HI 2 "nonmemory_operand" "rn"))
(const_int 0))
(label_ref (match_operand 2 "" ""))
(label_ref (match_operand 0 "" ""))
(pc)))]
""
"*
{
if (get_attr_length (insn) == 2)
return \"btst %X1,%X0\;beq %l2\";
return \"btst %X2,%X1\;beq %l0\";
else if (get_attr_length (insn) == 4)
return \"btst %X1,%X0\;beq %l2:16\";
return \"btst %X2,%X1\;beq %l0:16\";
else
return \"btst %X1,%X0\;bne %L0\;jmp @%l2\;%L0:\";
return \"btst %X2,%X1\;bne %L1\;jmp @%l0\;%L1:\";
}"
[(set_attr "type" "branch")
(set_attr "cc" "clobber")])
(define_insn "fancy_btst1"
[(set (pc)
(if_then_else (ne (zero_extract:HI (zero_extend:HI (match_operand:QI 0 "general_operand" "Ur"))
(if_then_else (ne (zero_extract:HI (zero_extend:HI (match_operand:QI 1 "general_operand" "Ur"))
(const_int 1)
(match_operand:HI 1 "nonmemory_operand" "rn"))
(match_operand:HI 2 "nonmemory_operand" "rn"))
(const_int 0))
(label_ref (match_operand 2 "" ""))
(label_ref (match_operand 0 "" ""))
(pc)))]
""
"*
{
if (get_attr_length (insn) == 2)
return \"btst %X1,%X0\;bne %l2\";
return \"btst %X2,%X1\;bne %l0\";
else if (get_attr_length (insn) == 4)
return \"btst %X1,%X0\;bne %l2:16\";
return \"btst %X2,%X1\;bne %l0:16\";
else
return \"btst %X1,%X0\;beq %L0\;jmp @%l2\;%L0:\";
return \"btst %X2,%X1\;beq %L1\;jmp @%l0\;%L1:\";
}"
[(set_attr "type" "branch")
(set_attr "cc" "clobber")])
......
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