A method and an apparatus for restoring logic states using programming
code are disclosed. In one embodiment, the process of a data processing
system identifies a first logic value stored in a first register and
branches to a first location within the programming code based upon the
first logic value. The execution of the programming code occurs in a
processor firmware layer. The first register can be used as a scratch
register for the subsequent instruction.