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

[committed] Improve profile support on hppa


The attached patch implements a suggestion from Helge Deller to optimize profile support.
When _mcount is reachable using a pc-relative branch, we can use the delay slot of the branch
to compute the selfpc argument of _mcount.

In working on this change, I noticed a couple of problems with the current implementation of
hppa_profile_hook.  Firstly, the argument point setup on TARGET_64BIT was being done twice -
once in hppa_profile_hook and again in the call expander.  Secondly, the call frame and 64-bit
argument were setup incorrectly in leaf functions.  Because of the call to _mcount, we need to
reserve stack space for the fixed arguments.  Guess there's a reason why most targets do a libcall.

The attached change has been tested on hppa-unknown-linux-gnu, hppa64-hp-hpux11.11 and
hppa2.0w-hp-hpux11.11.

Committed to trunk.

Dave
--
John David Anglin	dave.anglin@bell.net




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