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: Committed, CRIS predicates.md. Some findings.


> From: Zack Weinberg <zack@codesourcery.com>
> Date: Wed, 20 Apr 2005 21:04:09 -0700

> Hans-Peter Nilsson <hans-peter.nilsson@axis.com> writes:
> > 2. A nice feature would be if "helper" predicates; those only used
> > in other predicates, but not in the .md, could be emitted as
> > static functions.
> 
> People can and do use 'em in the cpu.c file as well, so I don't see
> how to determine which predicates are helpers by your definition.

Hm, right.  I guess some marking would be necessary to make this
work.  Alternatively, you could just define that you have to use
them in patterns in the .md for them to be global and fix the
current nonconforming uses (by actually using them in dummy
patterns in the .md).  If it's deemed worthwhile to implement,
that is.

> > 3. Some feature to refer to the inner part of a predicate would
> > also be nice, something like
> > (match_operand 0 "memory_operand"
> >   (match_operand 1 "special_address_operand"))
> > so you wouldn't have to write the inner test as C or match_test.
> 
> I don't understand this?

An inner expression is now only available through XEXP (op, 0)
and you can't do match_code on it directly; you have to do it
through a match_test.  There tends to be multiple XEXPs for the
same inner object, sometimes also nested.  See also
<URL:http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21133>.

brgds, H-P


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