This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ppc64 out of line gpr/fpr saving with -mcall-aixdesc
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: David Edelsohn <edelsohn at gnu dot org>, Alan Modra <amodra at bigpond dot net dot au>, Janis Johnson <janis187 at us dot ibm dot com>, Kyle McMartin <kmcmartin at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 18 Sep 2009 08:47:56 -0400
- Subject: Re: [PATCH] Fix ppc64 out of line gpr/fpr saving with -mcall-aixdesc
- References: <20090917200314.GR14664@tyan-ft48-01.lab.bos.redhat.com> <20090917231820.GD20825@bubble.grove.modra.org> <20090918004032.GE20825@bubble.grove.modra.org> <20090918063955.GT14664@tyan-ft48-01.lab.bos.redhat.com>
On Fri, Sep 18, 2009 at 2:39 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Sep 18, 2009 at 10:10:32AM +0930, Alan Modra wrote:
>> On Fri, Sep 18, 2009 at 08:48:20AM +0930, Alan Modra wrote:
>> > On Thu, Sep 17, 2009 at 10:03:14PM +0200, Jakub Jelinek wrote:
>> > > ? ? ? ? bl ._savegpr0_31
>> > > ...
>> > > ? ? ? ? b ._restgpr0_31
>> > > which fails to link, as the dots confuse the linker.
>> > > My question is, should this be considered a linker bug, or should we change
>> > > gcc to not emit any out of line gpr/fpr saving when TARGET_64BIT &&
>> > > DOT_SYMBOLS, or should it emit bl _savegpr0_31 and b _restgpr0_31
>> > > even in the dot sym world?
>> >
>> > I would say it's a linker bug. ?I'll fix it.
>>
>> On looking at the PPC64 ABI again, I see that we have specified a symbol
>> without a dot as far back as revision 1.0. ?So you probably should change
>> gcc to generate dot-less calls even when -mcall-aixdesc. ?Apparently AIX
>> expects them without a dot too.
>
> The following patch should remove the dot addition then. ?On AIX which
> currently uses only the .savef* and .restf* routines it should make no
> difference, as they already contain leading dot and %zN in that case doesn't
> prepend anything even for DOT_SYMBOLS.
>
> I guess the Linux ppc64 module-init-tools might need adjusting too, to also
> create the out of line gpr/fpr saving/restoring routines on the fly as the
> linker does.
>
> 2009-09-18 ?Jakub Jelinek ?<jakub@redhat.com>
>
> ? ? ? ?* config/rs6000/rs6000.md (*save_gpregs_<mode>, *save_fpregs_<mode>,
> ? ? ? ?*restore_gpregs_<mode>, *return_and_restore_gpregs_<mode>,
> ? ? ? ?*return_and_restore_fpregs_<mode>,
> ? ? ? ?*return_and_restore_fpregs_aix_<mode>): Remove 'z' operand modifier.
Okay.
Thanks, David