target/cortex_m: minor refactoring in cortex_m_store_core_reg_u32()