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 by switching to a second register file as the transaction commences and subsequently using the second register file during the transaction; asserting a modified bit for each register in the second register file which is written to during the transaction; allocating a single register in the first register file for temporary use during the transaction; and upon finishing using the allocated register during the transaction, executing an instruction that restores the allocated register to the pre-transactional state by clearing the modified bit for the register.