PATCH: Modify the mips gas behavior for -g -O
Don Bowman
don@sandvine.com
Sun Feb 10 13:29:00 GMT 2002
On Wed, Feb 06, 2002 at 12:45:38PM -0800, H . J . Lu wrote:
> On Wed, Feb 06, 2002 at 11:32:59AM +0100, Ralf Baechle wrote:
> > >
> > > There is an extra "nop" in the delay slot. I don't think gas is smart
> > > enough to fill the delay slot. I will put back those ".set noredor".
> >
> > The solution is to move the move instruction in front of the branch
> > instruction. The assembler will then move it into the delay slot:
> >
>
> I found out why it didn't work for me. The problem is -g turns off
> filling the delay slot. The mips as has
Its kind of important to disable the delay-slot filling when debugging.
You can't put a break-point in a delay slot [well, its technically
feasibly to do so, but OS's don't support it since they'd need
to interpret the instruction in the previous slot]. With the delay slot
filled, this might be the first instruction from the next line of
C code, and then gdb will be unable to put a break there.
I don't recommend installing the patch.
More information about the Binutils
mailing list