[Top] [All Lists]

jump instruction in delay slot

To: "Linux/MIPS Development" <>
Subject: jump instruction in delay slot
From: Thomas Koeller <>
Date: Tue, 19 Oct 2004 16:05:47 +0200
Cc: Manish Lachwani <>
Organization: Basler AG
Original-recipient: rfc822;
User-agent: KMail/1.6.2

the following code snippet is from

                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?



Thomas Koeller, Software Development
Basler Vision Technologies

thomas dot koeller at baslerweb dot com


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