This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Alan Modra <amodra at gmail dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Thu, 1 Oct 2015 20:14:24 -0500
- Subject: Re: [PATCH] rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)
- Authentication-results: sourceware.org; auth=none
- References: <a9b51088209febfc8bb481884100aa1bb6b5245e dot 1443679075 dot git dot segher at kernel dot crashing dot org> <CAFiYyc3YjVSwCGfQs=iHhRGbgzEf_SXFThVTdOo-W3QLgCywcA at mail dot gmail dot com> <20151001171808 dot GA30971 at gate dot crashing dot org> <20151002005406 dot GI32709 at bubble dot grove dot modra dot org>
On Fri, Oct 02, 2015 at 10:24:07AM +0930, Alan Modra wrote:
> On Thu, Oct 01, 2015 at 12:18:08PM -0500, Segher Boessenkool wrote:
> > On Thu, Oct 01, 2015 at 12:14:44PM +0200, Richard Biener wrote:
> > > So even if not "easy", can you try?
> >
> > I did, and after half a day had a big mess and lots of things failing,
> > no idea where this was headed, and in the meantime bootstrap still fails
> > (on affected targets).
>
> I had a look too, and while you can revise the load_toc_v4_PIC
> patterns to use labels emitted the usual way (eg. as in
> i386.c:ix86_init_large_pic_reg) they tend to wander away from the
> insn.
Yes, and only "bcl 20,31,$+4" avoids the link stack on recent CPUs
(bcl 20,31,$+8, which we also use, doesn't).
> I think that could be solved, but these labels which aren't
> referred to by jump insns get converted to NOTE_INSN_DELETED_LABEL
> somewhere, and that leads to further pain.
Yes. You need to make the bcl a jump_insn to the label. And then
there is yet more pain.
Segher