In a processor, a method for using a semaphore with out of order loads in a memory consistency model that constitutes loads reading from memory in order. The method includes implementing a memory resource that can be accessed by a plurality of cores; implementing an access mask that functions by tracking which words of a cache line have pending loads, wherein the cache line includes the memory resource, wherein an out of order load sets a mask bit within the access mask when accessing a word of the cache line, and clears the mask bit when that out of order load retires. The method further includes checking the access mask upon execution of subsequent stores from the plurality of cores to the cache line; and causing a miss prediction when a subsequent store to the portion of the cache line sees a prior mark from a load in the access mask, wherein the subsequent store will signal a load queue entry corresponding to that load by using a tracker register.
展开▼