1. A method of preserving exceptions in code reordering, the method comprising: receiving a plurality of instructions including a first instruction; determining if the first instruction is an excepting instruction; determining if the first instruction is to be moved to an execution location that is before a check instruction; determining a second instruction in the plurality of instructions that computes a previous value of a target register associated with the first instruction when the first instruction is not an excepting instruction and the first instruction is to be moved to an execution location that is before a check instruction; and inserting a third instruction into the plurality of instructions to save the value of the target register.