linux-mips-fnet
[Top] [All Lists]

Re: question about int-handler.S

To: linux-mips@fnet.fr
Subject: Re: question about int-handler.S
From: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
Date: Tue, 13 Apr 1999 23:40:14 +0200 (MEST)
In-reply-to: <19990413052555.11391@execpc.com>
Organization: none
Reply-to: "Harald Koerfgen" <Harald.Koerfgen@home.ivm.de>
Sender: harry@franz.no.dom
On 13-Apr-99 Mitchell Blank Jr wrote:
> Dave Airlie wrote:
>> The piece of code below is from int-handler.S,
>> on line 7 below (b find_int) does this jump unconditionally to
>> find_int?
>> because if it does what is the and for afterwards as surely it will
>> never
>> get processed... 
> 
> MIPS has something called a "branch delay slot".  The instruction
> immediately following the branch always gets executed EVEN IF THE
> BRANCH HAPPENS.  Basically, this improves pipeline efficiency
> since you can set up for the branch while you are still doing useful
> stuff.  Sometimes you have to put a NOP there because after producing
> enough information for the branch to be decided theres no work left
> to do.
> 
> Most modern processors do something like this behind your back.  On the
> MIPS, it is explicit and you (or your compiler) has to manually decide
> what to put there.

To make things even more interesting, the pipelines on R2000/R3000
processors are non interlocking, in contrast to the R4000 and higher. That
means that even load delay slots are visible.

---
Regards,
Harald

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