In an instruction the register number is physical in general. But some architecture have register window option. The register number is virtual. The actual register number could be known in run-time.
In libcpu arch_put_reg() function:
......
new StoreInst(v, regs[index], bb);
......
Here index is physical number. It could be known in translate-time. How to reference a register in run-time?