Dynamically choosing a register