[Top] [All Lists]

Re: question about int-handler.S

Subject: Re: question about int-handler.S
From: Steven Lembark <>
Date: Tue, 13 Apr 1999 06:13:17 -0500
Organization: Workhorse Computing
References: <>
> 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...
> 1:   EXPORT(kn02_io_int)
> 2:kn02_io_int:    lui     t0,0xbff0               # get interrupt status
> and mask
> 3:                lw      t0,(t0)
> 4:                la      t1,asic_mask_tbl
> 5:                move    t3,t0
> 6:                sll     t3,16                   # shift interrupt status
> 7:                b       find_int
> 8:                 and    t0,t3                   # mask out allowed ones
> 9:                EXPORT(kn03_io_int)
> If the question is silly sorry!!

actually, step 8 should be processed in the branch delay 
slot -- thanks to oddities of pipelining on MIPS.  whether
it *does* anything useful is antoher question...  them of
us what use higher level languages don't usually get to
have this much fun in our work :-)

catch is that it takes an extra clock cycle (or whatever)
to perform a branch.  in order to fill the dead time the
compiler -- or crafty programmer -- will fill this timeslot
in the pipeline with something that is [hopefully] useful.
this looks like a CP is filling the slot with the and --
whatever that does in the Scheme Of Things.

 Steven Lembark                                   2930 W. Palmer St.
 Workhorse Computing                             Chicago, IL  60647                                   800-762-1582
  The opinions expressed here are those of this company.
  I am the company.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

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