On Tue, Feb 03, 2015 at 03:08:01PM +0100, Jakub Jelinek wrote:
> On Wed, Feb 04, 2015 at 12:27:35AM +1030, Alan Modra wrote:
> > @@ -33002,7 +33092,9 @@ rs6000_call_aix (rtx value, rtx func_desc, rtx fla
> >          originally direct, the 3rd word has not been written since no
> >          trampoline has been built, so we ought not to load it, lest we
> >          override a static chain value.  */
> > -     if (!direct_call_p && TARGET_POINTERS_TO_NESTED_FUNCTIONS)
> > +     if (!direct_call_p
> > +         && TARGET_POINTERS_TO_NESTED_FUNCTIONS
> > +         && !chain_already_loaded (crtl->emit.sequence_stack->last))
> 
> Shouldn't that be !chain_already_loaded (get_last_insn_anywhere ()) ?

I considered that interface but it's not best option.  We may have
already emitted insns for the topmost sequence, ie. the GEN_CALL.  So
you'd need to loop over insns in chain_already_loaded.  But not too
far, as that might run into a previous call.

-- 
Alan Modra
Australia Development Lab, IBM

Reply via email to