target-arm: Pull "add one cpreg to hashtable" into its own function