Re: [Patch] Fix bug for frame instructions in annulled delay slots

2015-12-08 Thread Jeff Law
On 12/07/2015 02:18 PM, Steve Ellcey wrote: On Mon, 2015-12-07 at 12:30 -0700, Jeff Law wrote: On 12/07/2015 12:28 PM, Bernd Schmidt wrote: On 12/07/2015 07:54 PM, Steve Ellcey wrote: if (must_annul) -used_annul = 1; +{ + /* Frame related instructions cannot

Re: [Patch] Fix bug for frame instructions in annulled delay slots

2015-12-07 Thread Steve Ellcey
On Mon, 2015-12-07 at 12:30 -0700, Jeff Law wrote: > On 12/07/2015 12:28 PM, Bernd Schmidt wrote: > > On 12/07/2015 07:54 PM, Steve Ellcey wrote: > >> if (must_annul) > >> -used_annul = 1; > >> +{ > >> + /* Frame related instructions cannot go into annulled delay >

Re: [Patch] Fix bug for frame instructions in annulled delay slots

2015-12-07 Thread Steve Ellcey
On Mon, 2015-12-07 at 20:59 +0100, Bernd Schmidt wrote: > On 12/07/2015 08:43 PM, Steve Ellcey wrote: > > I am not sure about this. There is an earlier if statement in the loop > > that does a 'return' instead of a break (or continue) and there is a > > return in the 'else' part of the if that set

Re: [Patch] Fix bug for frame instructions in annulled delay slots

2015-12-07 Thread Bernd Schmidt
On 12/07/2015 08:43 PM, Steve Ellcey wrote: I am not sure about this. There is an earlier if statement in the loop that does a 'return' instead of a break (or continue) and there is a return in the 'else' part of the if that sets must_annul. Both of these are inside the loop that looks at all t

Re: [Patch] Fix bug for frame instructions in annulled delay slots

2015-12-07 Thread Steve Ellcey
On Mon, 2015-12-07 at 20:28 +0100, Bernd Schmidt wrote: > On 12/07/2015 07:54 PM, Steve Ellcey wrote: > > if (must_annul) > > - used_annul = 1; > > + { > > + /* Frame related instructions cannot go into annulled delay > > +slots, it messes up the dwarf info.

Re: [Patch] Fix bug for frame instructions in annulled delay slots

2015-12-07 Thread Jeff Law
On 12/07/2015 12:28 PM, Bernd Schmidt wrote: On 12/07/2015 07:54 PM, Steve Ellcey wrote: if (must_annul) -used_annul = 1; +{ + /* Frame related instructions cannot go into annulled delay + slots, it messes up the dwarf info. */ + if (RTX_FRAME_

Re: [Patch] Fix bug for frame instructions in annulled delay slots

2015-12-07 Thread Bernd Schmidt
On 12/07/2015 07:54 PM, Steve Ellcey wrote: if (must_annul) - used_annul = 1; + { + /* Frame related instructions cannot go into annulled delay +slots, it messes up the dwarf info. */ + if (RTX_FRAME_RELATED_P (trial)) +

[Patch] Fix bug for frame instructions in annulled delay slots

2015-12-07 Thread Steve Ellcey
While doing more testing of the MIPS frame header optimization I checked in earlier, I found I could not build the elf toolchain when I turned the optimization on by default. This is because GCC was putting a frame related instruction (the save of the return address) into an annulled delay slot. T