1. A method for allocating registers in a processor, comprising: commencing a transaction, wherein commencing the transaction involves preserving a pre-transactional state of registers in a first register file; allocating one or more registers for temporary use during the transaction; and upon finishing using each allocated register during the transaction, executing an instruction that restores the allocated register to the pre-transactional state.