ARM: make isa_mode macro more robust and fix for v7-M