Subject: Re: gas warning on mipsX_subr.S
To: Paul Koning <pkoning@equallogic.com>
From: Eric Christopher <echristo@redhat.com>
List: port-mips
Date: 02/25/2005 12:46:43
On Fri, 2005-02-25 at 15:42 -0500, Paul Koning wrote:
> >>>>> "Martin" == Martin Husemann <martin@duskware.de> writes:
> 
>  Martin> On Fri, Feb 25, 2005 at 10:59:19AM -0800, Eric Christopher
>  Martin> wrote:
>  >> Most assuredly not.
> 
>  Martin> In this cases it looks harmless - the branch (if taken) will
>  Martin> ignore the incomplete work of the pseudo instruction anyway
>  Martin> (but I'm not realy good at mips assembly)
> 
> I remember some cases like that -- where the NOP for the delay slot
> was missing, so the warning was on an instruction needed for the "no
> branch" case.  If so, the NOP should be added to clean up the code.
> 
> If the instruction that's written for the delay slot really did belong
> in the delay slot, then it is post definitely broken if it expands to
> multiple instructions.

Exactly.

Basically what's happening now is that you're corrupting some register
with the execution of the branch delay slot if the branch is taken
(likely $at, but I've not tried to assemble it and verify), and if the
branch isn't taken you've just modified another register (probably k0)
with the other half of the macro instruction.

-eric