----- Original Message -----
From: "Ian Lance Taylor" <iant@xxxxxxxxxx>
To: "Petar Bajic" <petar.bajic@xxxxxxxxxxxxxxx>
Cc: <gcc-help@xxxxxxxxxxx>
Sent: Friday, July 07, 2006 7:39 PM
Subject: Re: adding movz to machine description
"Petar Bajic" <petar.bajic@xxxxxxxxxxxxxxx> writes:
I need to add conditional move instructions without else branch to gcc
dlx port.
Any help is appreciated. Im new here.
Write it as a define_expand which generates, more or less,
(set a c)
(set a (if_then_else (eq b 0) d (match_dup a)))
Ian
If I write define_expand like this :
(define_expand "movsicc_movz"
[(set (match_operand:SI 0 "register_operand" "=d,d")
(if_then_else (eq (match_operand:SI 2 "register_operand" "=d,d")
(const_int 0))
(match_operand:SI 1 "register_operand" "=d,d") (match_dup 0)))]
""
"{dlx_emit_cond_move(operands[0], operands[1], operands[2]); DONE;}" )
it never gets used/generated