This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Accessing IP on IA-64 with RTL
- From: James E Wilson <wilson at specifixinc dot com>
- To: Steve Ellcey <sje at cup dot hp dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 31 Jan 2005 18:49:52 -0800
- Subject: Re: Accessing IP on IA-64 with RTL
- References: <200501312220.OAA11642@hpsje.cup.hp.com>
On Mon, 2005-01-31 at 14:20, Steve Ellcey wrote:
> I don't think the existing mcount can be called after the prologue.
I took a look at glibc. You are right. The current assembly stub has
too many assumptions built into it. I think it would work if we called
__mcount directly instead of via the stub, but we can't do that
apparently because it isn't exported in the linker map. I'll have to
see if I can get modified glibc built to try this. If we can do this
with a linker map change, then we keep backwards compatibility with
older compilers. I don't know the hazards of changing the linker map
though. Or maybe __mcount can be renamed to mcount, which is being
exported, and then continue using _mcount for the assembly stub.
> Here is what I have so far, it works with HP-UX based on some minimal
> testing, but is obviously broken for the existing Linux mcount
> interface.
It looks pretty reasonable. It would be nice if we could continue
supporting the current working linux mcount code, which means continuing
to use FUNCTION_PROFILER for linux while using PROFILE_HOOK for HPUX.
This requires making a bunch of changes conditional on the OS. The
glibc issue may not be fixed for a while.
Meanwhile, maybe we can work around the assembly issue by modifying
FUNCTION_PROFILER to emit some unwind directives. You don't need to
worry about that though, as it isn't needed for HPUX.
> + static GTY(()) rtx mcount_func_rtx;
> + static rtx
> + gen_mcount_func_rtx (void)
> + {
You are missing an explanatory comment before this function, though I
see the ones you copied from are also similarly broken.
The ia64_profile_hook function is also missing a comment.
The ia64.md file change has an unnecessary blank line.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com