Generate tree/rtx for address-of exp?
MajorZ
cy_rebate10@yahoo.com
Thu May 27 03:54:00 GMT 2004
tree exp;
rtx exp_rtx;
?
Assume exp is?the tree for some varaible?and exp_rtx
is rtx for exp. The goal is to generate rtx for
address-of exp. (&i, for example).
?
If exp is var_decl, like for
int i,
the address-of?exp
&i
locates at exp_rtx->fld[0].rtx.
?
However, for complex situation, like:
---
typedef struct {
? int i;
? float j;
} x;
?
x *a;
?
a->j;
---
we need the offset of j in?a to get &(a->j).
?
The questions are:
1. Is there a universal field in tree/rtx for
address-of exp? No matter what exp could be.
2. Is there?some function A that could help to
calculate the offset no matter it is structure, array
or mix?
3. Can some nice guy could should me the simple
pseudocode?for the function A if I have to write it
myself? Or what are the situations I need to think of,
like?for array, for strcuture, for arrays of strutures
etc.
?
Thanks,
Z
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
More information about the Gcc
mailing list