target-mips: move the test for enabled interrupts to a separate function Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>