Method and system for supporting speculative modification in a data cache
are provided and described. A data cache comprises a plurality of cache
lines. Each cache line includes a state indicator for indicating anyone
of a plurality of states, wherein the plurality of states includes a
speculative state to enable keeping track of speculative modification to
data in the respective cache line. The speculative state enables a
speculative modification to the data in the respective cache line to be
made permanent in response to a first operation performed upon reaching a
particular instruction boundary during speculative execution of
instructions. Further, the speculative state enables the speculative
modification to the data in the respective cache line to be undone in
response to a second operation performed upon failing to reach the
particular instruction boundary during speculative execution of
instructions.