Hi,
On 13-Apr-99 Dave Airlie wrote:
>
> Hi,
> I know nothing about mips assembly, I'm just try to find a bug by
> asking silly questions :-)
>
> 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
As already pointed out the "and" will be executed in the branch delay
slot and, yes, it will do something useful. This snippet loads the content
of the System Control and Status Register (CSR) and masks out the allowed
interrupt status bits. The alternative would be:
kn02_io_int: lui t0,0xbff0
lw t0,(t0)
nop # load delay
move t3,t0
sll t3,16
and t0,t3
la t1,asic_mask_tbl
b find_int
nop # branch delay
> If the question is silly sorry!!
There are no silly questions, only silly answers :-).
---
Regards,
Harald
|