target/arm: Make switch_mode() file-local