This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Modify the mips gas behavior for -g -O
- From: Don Bowman <don at sandvine dot com>
- To: "'binutils at sources dot redhat dot com'" <binutils at sources dot redhat dot com>
- Cc: "'hjl at lucon dot org'" <hjl at lucon dot org>
- Date: Sun, 10 Feb 2002 16:26:31 -0500
- Subject: Re: PATCH: Modify the mips gas behavior for -g -O
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.