This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [mips patch RFA] handle trap_if with DI-mode arguments.


Looks good to me.  Although...

cgd@broadcom.com writes:
> +
> +(define_insn ""
> +  [(trap_if (match_operator 0 "trap_cmp_op"
> +                            [(match_operand:DI 1 "reg_or_0_operand" "d")
> +                             (match_operand:DI 2 "nonmemory_operand" "dI")])
> +	    (const_int 0))]
> +  "TARGET_64BIT && ISA_HAS_COND_TRAP"
> +  "t%C0\\t%z1,%z2")

...the constraint for operand 1 should be "dJ" if you want to accept
zeros.  In theory, it should be better to use arith_operand as the
predicate for operand 2.

Same goes for the SImode pattern of course.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]