Re: Fix PR64876, regressions in powerpc64 Go testsuite

2015-02-05 Thread David Edelsohn
On Thu, Feb 5, 2015 at 5:29 AM, Alan Modra wrote: > On Thu, Feb 05, 2015 at 08:12:25AM +0100, Jakub Jelinek wrote: >> On Thu, Feb 05, 2015 at 02:09:54PM +1030, Alan Modra wrote: >> > Jakub, was your suggestion to use get_last_insn_anywhere() based on >> > not wanting to expose details that should

Re: Fix PR64876, regressions in powerpc64 Go testsuite

2015-02-05 Thread Alan Modra
On Thu, Feb 05, 2015 at 11:31:53AM +0100, Jakub Jelinek wrote: > On Thu, Feb 05, 2015 at 08:59:01PM +1030, Alan Modra wrote: > > On Thu, Feb 05, 2015 at 08:12:25AM +0100, Jakub Jelinek wrote: > > > On Thu, Feb 05, 2015 at 02:09:54PM +1030, Alan Modra wrote: > > > > Jakub, was your suggestion to use

Re: Fix PR64876, regressions in powerpc64 Go testsuite

2015-02-05 Thread Jakub Jelinek
On Thu, Feb 05, 2015 at 08:59:01PM +1030, Alan Modra wrote: > On Thu, Feb 05, 2015 at 08:12:25AM +0100, Jakub Jelinek wrote: > > On Thu, Feb 05, 2015 at 02:09:54PM +1030, Alan Modra wrote: > > > Jakub, was your suggestion to use get_last_insn_anywhere() based on > > > not wanting to expose details

Re: Fix PR64876, regressions in powerpc64 Go testsuite

2015-02-05 Thread Alan Modra
On Thu, Feb 05, 2015 at 08:12:25AM +0100, Jakub Jelinek wrote: > On Thu, Feb 05, 2015 at 02:09:54PM +1030, Alan Modra wrote: > > Jakub, was your suggestion to use get_last_insn_anywhere() based on > > not wanting to expose details that should be internal to > > emit-rtl.[ch]? > > Yes. But if it d

Re: Fix PR64876, regressions in powerpc64 Go testsuite

2015-02-04 Thread Jakub Jelinek
On Thu, Feb 05, 2015 at 02:09:54PM +1030, Alan Modra wrote: > Jakub, was your suggestion to use get_last_insn_anywhere() based on > not wanting to expose details that should be internal to > emit-rtl.[ch]? Yes. But if it doesn't work for what you want, either add a new accessor or use it directly

Re: Fix PR64876, regressions in powerpc64 Go testsuite

2015-02-04 Thread Alan Modra
On Wed, Feb 04, 2015 at 09:06:02PM -0500, David Edelsohn wrote: > Testing only crtl->emit.sequence_stack->last > does not seem to be sufficient. It seems like it really needs to test > for more of the CALL sequence. Ugh. You're right, we do need to test more of the call sequence. Shame on me, I

Re: Fix PR64876, regressions in powerpc64 Go testsuite

2015-02-04 Thread David Edelsohn
On Tue, Feb 3, 2015 at 7:16 PM, Alan Modra wrote: > On Tue, Feb 03, 2015 at 11:14:49AM -0500, David Edelsohn wrote: >> On Tue, Feb 3, 2015 at 8:57 AM, Alan Modra wrote: >> > PR target/64876 >> > * config/rs6000/rs6000.c (chain_already_loaded): New function. >> > (rs6000_ca

Re: Fix PR64876, regressions in powerpc64 Go testsuite

2015-02-03 Thread Alan Modra
On Tue, Feb 03, 2015 at 11:14:49AM -0500, David Edelsohn wrote: > On Tue, Feb 3, 2015 at 8:57 AM, Alan Modra wrote: > > PR target/64876 > > * config/rs6000/rs6000.c (chain_already_loaded): New function. > > (rs6000_call_aix): Use it. > > Okay with Jakub's suggested change.

Re: Fix PR64876, regressions in powerpc64 Go testsuite

2015-02-03 Thread Alan Modra
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 > > trampol

Re: Fix PR64876, regressions in powerpc64 Go testsuite

2015-02-03 Thread David Edelsohn
On Tue, Feb 3, 2015 at 8:57 AM, Alan Modra wrote: > This fixes a large number of Go testsuite failures on powerpc64 ELFv1, > caused by loading r11 from a function descriptor and thus trashing the > value set up from CALL_EXPR_STATIC_CHAIN. So don't load r11 if it > already contains a useful value

Re: Fix PR64876, regressions in powerpc64 Go testsuite

2015-02-03 Thread Jakub Jelinek
On Wed, Feb 04, 2015 at 12:27:35AM +1030, Alan Modra wrote: > +static bool > +chain_already_loaded (rtx_insn *last) > +{ > + if (last != NULL) > +{ > + rtx patt = PATTERN (last); > + > + if (GET_CODE (patt) == SET) > + { > + rtx lhs = XEXP (patt, 0); > + > + if (REG_P

Fix PR64876, regressions in powerpc64 Go testsuite

2015-02-03 Thread Alan Modra
This fixes a large number of Go testsuite failures on powerpc64 ELFv1, caused by loading r11 from a function descriptor and thus trashing the value set up from CALL_EXPR_STATIC_CHAIN. So don't load r11 if it already contains a useful value. Whether r11 has been set is found directly by examining