This is the mail archive of the
mailing list for the GCC project.
Re: [RS6000] Fix PR66020, -mprofile-kernel related
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Alan Modra <amodra at gmail dot com>
- Date: Wed, 6 May 2015 08:51:03 -0400
- Subject: Re: [RS6000] Fix PR66020, -mprofile-kernel related
- Authentication-results: sourceware.org; auth=none
- References: <20150506095057 dot GE6140 at bubble dot grove dot modra dot org>
On Wed, May 6, 2015 at 5:50 AM, Alan Modra <email@example.com> wrote:
> -mprofile-kernel changed recently to not save lr on the stack before
> calling _mcount. This means a change is required in the _mcount
> used by one of the powerpc64 tests to grab function parameter
> registers. While fixing that, I noticed that the asm defined the
> _mcount label, which is a bit rude; A function in ELFv1 is supposed
> to be defined on an OPD entry. Using an alias fixes this problem.
> Also, _mcount used r11, the static chain pointer. That doesn't really
> hurt here, but I thought it was poor form to have such an example
> of _mcount tricks in the testsuite. Finally, I made gparms volatile
> since it does change behind gcc's back.
> Bootstrapped and regression tested powerpc64-linux and
> PR target/66020
> * gcc.target/powerpc/ppc64-abi-2.c (my_mcount): Rewrite.
> (gparms): Make volatile. Remove trailing whitespace.