[arm] change register type to uint32_t
refactor IRQ handling code