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]

Re: Accessing IP on IA-64 with RTL


On Mon, 2005-01-31 at 09:43, Steve Ellcey wrote:
> This implies that there would be an ABI change to glibc for IA64 Linux.
> I am not sure how difficult this is or what GCC/glibc coordination is
> required.  I have never messed around with glibc before.

If the glibc mcount is well written, we should be able to call it before
or after the prologue.  mcount calls are not visible outside the
compiler/glibc, so this wouldn't be an ABI change.  If the current glibc
mcount doesn't work when called after the prologue, then yes we would
need joint gcc/glibc patches, and I don't expect an HPUX hacker to do
that for me.

> Linux does not seem to need it, the existing assembly language stub does
> not do anything with it and does not even pass it to the C profiling
> routine (__mcount) that does the real work.  HP-UX does seem to need it
> though.

OK.  We could define NO_PROFILE_COUNTERS in ia64/linux.h, to avoid
breaking other targets, as we now know that HPUX at least needs it.

> I am not sure what xdata is.

xdata is an assembly language directive, which takes a section name as
an argument.  This avoids the need for explicit section switches in
code.  Explicit section switches in code interferes with bundling and DV
checking.  It would take a bit of work to use them though.  We would
need a hook in profile_function to emit the data differently, and we'd
have to figure out how to access the data.  It may not be worth the
trouble at the moment.

As long as this data is emitted at the beginning of the function before
any instructions, it is likely to be safe to use a section switch. 
Ideally though, it would be better if the data was emitted before the
function start label, or if xdata was used to emit it, so that we can
avoid having section switches inside the function itself.

This isn't a problem for linux as we can just define
NO_PROFILE_COUNTERS.

By the way, I just accepted from gas patches last week that add some
error checking for unwind directives.  As as result of this, gcc -pg
gives a warning with the current assembler.
tmp.s:18: Warning: Initial .prologue should precede any instructions
This is the problem described in PR 12455.  So this makes a fix a little
more urgent.  I will have to look at this myself when I have chance.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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