target/cortex_m: fix target_to_cm() helper