This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Accessing addresses of objects
- From: qubits <qubits at yahoo dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 29 Jul 2002 02:21:02 +0100 (BST)
- Subject: Accessing addresses of objects
Hello everyone,
I know final addresses to objects like arrays,
pointers etc are decided at run-time. But is there a
way I can access these addresses in the tree
representation/RTL? For example(maybe this will make
my question more clear), consider this
code:
int *p;
int a;
p = &a;
Now 'p' will have a tree representation, so will 'a'.
Both will have a DECL_RTL field which specifies the
rtx for obtaining their value. However seems to be no
clear way(to me!) to access their addresses at the RTL
level.
There is a function called 'memory_address' in
explow.c, which takes an RTX(from expand_expr) and
returns the memory address in terms of a
register/register+offset. But this is also in the form
of an RTX which brings me back to my original problem!
How does one go about say converting this RTX to
actual values at run-time?
Any help will be gratefully appreciated.
Thanks!
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com