http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53315
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-10
23:47:57 UTC ---
(define_expand "xbegin"
[(set (match_operand:SI 0 "register_operand")
(unspec_volatile:SI [(match_dup 1)] UNSPECV_XBEGIN))]
"TARGET_RTM"
{
rtx label = gen_label_rtx ();
operands[0] = force_reg (SImode, constm1_rtx);
emit_jump_insn (gen_xbegin_1 (operands[0], label));
emit_label (label);
LABEL_NUSES (label) = 1;
DONE;
})
(define_insn "xbegin_1"
[(set (pc)
(if_then_else (ne (unspec [(const_int 0)] UNSPEC_XBEGIN_ABORT)
(const_int 0))
(label_ref (match_operand 1))
(pc)))
(set (match_operand:SI 0 "register_operand" "+a")
(unspec_volatile:SI [(match_dup 0)]
UNSPECV_XBEGIN))]
"TARGET_RTM"
"xbegin\t%l2"
[(set_attr "type" "other")
(set_attr "length" "6")])
I think this is the one of the few cases where you want to use + in the
constraint and match_dup.