Patent ID: 7484080

Claim:
A method for entering a scout mode when stores that are encountered during an execute-ahead mode exceed the capacity of a store buffer in a processor, comprising: upon encountering an unresolved data dependency during execution of an instruction in a program during a normal execution mode, generating a checkpoint that can subsequently be used to return execution of the program to the point of the instruction, and executing the instruction and subsequent instructions in the execute-ahead mode, wherein instructions that cannot be executed because of an unresolved data dependency are deferred, wherein other non-deferred instructions are executed in program order, wherein the store buffer is gated so that stores that enter the store buffer during execute-ahead mode remain in the store buffer until the processor returns to normal execution mode, and wherein a store-in-DQ indicator is set in response to a store being deferred into a deferred queue; upon encountering a store during the execute-ahead mode, wherein a store is encountered when the store leaves instruction grouping logic during execute-ahead mode, determining if the encountered store will exceed the capacity of the store buffer by incrementing a stores-during-execute-ahead counter and checking if the incremented value of the counter exceeds the store buffer capacity, wherein the stores-during execute-ahead counter keeps a count of only the stores encountered during execute-ahead mode, and wherein the encountered store exceeding the store buffer capacity indicates that the encountered store along with all stores in the deferred queue and store buffer together exceed the store buffer capacity, and if the encountered store will exceed the store buffer capacity, which means that the store buffer will never have additional space to accept additional stores during the execute-ahead mode because the store buffer is gated, prefetching a cache line which includes a target for the store, and entering the scout mode, wherein instructions are speculatively executed to prefetch cache lines for future loads and stores, but wherein results are not committed to the architectural state of the processor; otherwise, if the encountered store will not exceed the store buffer capacity, placing the store in the deferred queue if the store-in-DQ indicator has been previously set in response to another store, and placing the store in the store buffer if the store-in-DQ indicator has not been previously set in response to another store; and upon encountering a non-data dependent stall, entering the scout mode.