r6040: save and restore MIER correctly in the interrupt routine