Patent ID: 8019944

Claim:
A circuit for tracking memory operations in an out-of-order and speculative processor, wherein the circuit is adapted for use with a trace unit and with an execution unit of the processor, where the trace unit sequences traces for execution thereby forming a trace sequence order, where each of the traces includes a sequence of operations that includes zero or more of the memory operations, where the execution unit executes the operations, and where the circuit comprises: a first memory configured to cache at least some of the data accessed by the memory operations, where the memory operations being executed form a set of active memory operations, wherein the active memory operations have a predefined program order among themselves, where the predefined program order imposes a set of ordering constraints, where at least some of the active memory operations access the memory in an execution order that is different from the predefined program order, and where the first memory is partitioned into cache lines and participates in a cache coherency protocol; a second memory configured to receive and hold a set of checkpoint entries, wherein each checkpoint entry is associated with one of the traces, where each checkpoint entry is of a checkpoint location within the first memory, where each checkpoint entry includes checkpoint data indicating a state of the checkpoint location within the first memory prior to an update of the checkpoint location, and where the update results from executing one of the active memory operations; a first sub-circuit configured to hold a memory operation ordering entry corresponding to each one of the active memory operations, wherein the memory operation ordering entry includes an indication of the trace associated with the corresponding active memory operation, wherein the first sub-circuit is further configured to detect a violation of the ordering constraints, where the violation occurs between at least two of the active memory operations, wherein the first sub-circuit is further configured to generate, in response to the detection, a memory ordering violation signal that includes an indication of at least one of the one or more traces corresponding to the at least two active memory operations involved in the violation, and where at least some occurrences of the memory ordering violation signal are too late to prevent the update of the first memory; and a second sub-circuit configured to receive the memory ordering violation signal and to determine whether a particular occurrence of the memory ordering violation signal was too late to prevent the updating and, if so, to overwrite in the first memory a set of the checkpoint locations based on a selected one of the particular traces, wherein the set of checkpoint locations includes all checkpoint locations of all checkpoint entries associated with the selected trace, and where the set of checkpoint locations further includes all checkpoint locations of all checkpoint entries associated with any traces that are younger than the selected trace.