branch mw4: change ISR entry and exit functions from macros to functions