This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Getting variable attribute from rtx
- From: Dobes <bdobry at udel dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 27 Mar 2009 11:07:35 -0700 (PDT)
- Subject: Getting variable attribute from rtx
I need to add support for some custom attributes that I need to know during
operand matching. I have no problem adding the attributes, but I don't know
what to do so that I can access the information later. My function that is
called to handle the attribute looks like this:
static tree
attr_myattr_handler(tree *node, tree name, tree args, int flags,
bool *no_add_attrs) {
/* What should I do here */
}
In the source code:
int __attribute__((__myattr__)) a;
When 'a' is being matched as an operand to, say, 'addsi3', I would like to
be able to check the rtx to see if that attribute was set with a function
like this:
int
myattr_operand (op, mode)
rtx op;
enum machine_mode mode;
{
/* What do I need here */
}
Thanks for the help. Sorry, if this is simple, I'm a bit of a noob in this
area.
--
View this message in context: http://www.nabble.com/Getting-variable-attribute-from-rtx-tp22745207p22745207.html
Sent from the gcc - Dev mailing list archive at Nabble.com.