Re: jump instruction in delay slot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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. :-)


Thiemo


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux