摘要 |
An apparatus and method for sharing cache lines within a split data/code cache is provided. The invention utilizes cache snoop and state control, coupled to both a data cache and a code cache, which allows the data cache to snoop fetches to the code cache, and allows the code cache to snoop reads and writes to the data cache. In addition, cache snoop and state control modifies the state of a particular cache line within both of the caches according to the MESI cache coherency protocol to allow a single cache line to reside in both the data cache, and the code cache, in a Shared state. The invention allows the shared cache line to be fetched from the code cache, and retrieved from the data cache, until it is overwritten or modified in the data cache. In one embodiment, an instance of a cache line within either the code or data cache can be snarfed into the other cache, and marked as shared.
|