MIPS assembly to determine whether hardware I/O interrupt has occurred?
In my MIPS32 exception handler, I want to determine whether the exception was caused by a I/O interrupt. The Cause register bits 2-6 inclusive开发者_如何学编程 has to be checked. What's the MIPS assembly code to determine this?
You have to mask out each bit to check where the interrupt came from. The exception handler procedure is shown here:
This is the scheme i used when coding an exception handler for Nios II, the procedure should be similar for MIPS32.
MIPS assembly language, MIPS: Interrupts and Exceptions page 22
精彩评论