[Top] [All Lists]

Re: jump instruction in delay slot

To: Thomas Koeller <>
Subject: Re: jump instruction in delay slot
From: Thiemo Seufer <>
Date: Tue, 19 Oct 2004 16:25:37 +0200
Cc: Linux/MIPS Development <>, Manish Lachwani <>
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/1.5.6i
Thomas Koeller wrote:
> Hi,
> the following code snippet is from
> arch/mips/pmc-sierra/yosemite/irq-handler.S:
> ll_duart_irq:
>               li      a0, 4
>               move    a1, sp
>               jal     do_IRQ
>               j       ret_from_irq
> I wonder if this is correct. AFAIK, a jump instruction
> must not occupy the delay slot of another branch or
> jump instruction. Since the 'jal' returns to the first
> instruction after the delay slot, I would expect the
> effect of the 'j' instruction to be cancelled. Or
> is this some kind of trick I do not understand?

I guess this code has no preceeding ".set noreorder" directive.
By default, your friendly assembler handles delay slots for you. :-)


<Prev in Thread] Current Thread [Next in Thread>