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.


At Wed, 13 Aug 2003 21:34:27 +0000 (UTC), "Richard Sandiford" wrote:
> 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.

My clue about this stuff doesn't run deep enough to do that w/o being
prompted...

Does 'J' do the right thing and use "$0" if the value is zero?... Ahh,
yes, that's what the % -> z <- 1 is about...
                      


> In theory, it should be better to use arith_operand as the
> predicate for operand 2.

"In theory?"


So, the 'dJ' thing is actually an goodness-generated-code thing?
(i.e., otherwise, the compiler won't generate $0 for constant integer
0, because it doesn't know to convert the constant integer 0 to $0
*before* checking the constraint?)

And the nonmemory_operand -> arith_operand change should (possibly
ever so slightly) help the performance of the compiler, one would
hope?



cgd


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