This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Passing attributes to RTX
- From: Gobaan_Raveendran at amis dot com
- To: gcc at gcc dot gnu dot org
- Date: Mon, 10 Nov 2008 15:40:13 -0500
- Subject: Passing attributes to RTX
Hello all,
While prototyping a port of gcc I think that the RTX is lacking some
information needed to generate machine dependent files. The expression
trees have the correct information and I can likely hack in a quick fix to
pass that information down to the backend. However, I just want to make
sure I am not doing something completely wrong.
Basically given the following code,
void main(T x)
{
T * pt; //pointer to type T
*pt = x
}
now I need the RTX to know about type T (specifically its qualifiers as I
am doing this for the named address space branch), I changed the backend to
encode these into the RTX generated by the VAR_DECL and PARM_DECL nodes,
however, I am not sure if it is suppose to be encoded in the INDIRECT_REF
node as pt is theoretically a pointer to T.
I just quickly hacked this information into expand_expr_real_1 in expr.c,
however this may be the incorrect approach, is there any specific location
where I should be modifying RTX attributes and when expand_expr_real_1 is
done should the RTX returned have all the attributes (that can be deduced
from the expression tree) set?
- Thanks for the help, Gobi