This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: implement negdi2 on frv
- From: Richard Henderson <rth at redhat dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Nov 2003 12:00:00 -0800
- Subject: Re: implement negdi2 on frv
- References: <ord6bg5719.fsf@livre.redhat.lsd.ic.unicamp.br>
On Tue, Nov 25, 2003 at 10:04:50PM -0200, Alexandre Oliva wrote:
> +(define_expand "negdi2"
> + [(parallel [(set (match_operand:DI 0 "integer_register_operand" "")
> + (neg:DI (match_operand:DI 1 "integer_register_operand" "")))
> + (clobber (match_dup 2))])]
> + ""
> + "
> +{
> + operands[2] = gen_reg_rtx (CCmode);
> +}")
> +
> +(define_insn_and_split "*negdi2_internal"
> + [(set (match_operand:DI 0 "integer_register_operand" "=&e,e")
> + (neg:DI (match_operand:DI 1 "integer_register_operand" "e,0")))
> + (clobber (match_operand:CC 2 "icc_operand" "=t,t"))]
Should use match_scratch. Then you don't need the expander.
r~