This is the mail archive of the gcc@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]

Accessing IP on IA-64 with RTL


I was looking at PR 12455, profiling broken on IA64, and seeing if I
could fix it by following Richards advice to use PROFILE_HOOK instead of
FUNCTION_PROFILER.  This seems to be working fairly well but I noticed
that in the current scheme _mcount is being called with b0 (the return
pointer), r1 (the global pointer), and a pointer to a counter.  Looking
at what the HP-UX IA64 compilers are generating, they pass b0, ip, and a
counter pointer.  I am not sure why GCC is passing r1 instead of ip but
when I change r1 to ip by hand in the assembly file the HP prof and
gprof commands seem to give better information then they do when given
r1.

My question is:  how do I access ip from GCC using RTL?  Looking through
the ia64.h file it doesn't seem to list the instruction pointer as a
known register with a register number so there is no easy way to create
a gen_rtx_REG for the ip.  Should we make ip a known register to GCC?
Or is there an easier way to access the ip for use as an argument to
_mcount?

Steve Ellcey
sje@cup.hp.com


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