Patent ID: 8266414

Claim:
A method for executing an instruction loop, the method comprising: in response to detecting, by a branch prediction unit, an instruction loop, wherein a size of the instruction loop exceeds a size of a storage space allocated in a fetch unit for storing fetched instructions: storing, during a first iteration of the instruction loop, first instructions of the instruction loop at a dispatch unit; maintaining storage of the first instructions at the dispatch unit between the first iteration and a subsequent set of iterations of the instruction loop; during the first iteration and the subsequent set of iterations of the instruction loop, requesting from the fetch unit to fetch instructions of the instruction loop that follow the first instructions of the instruction loop; selecting, during the subsequent set of iterations of the instruction loop, whether to provide from a dispatch unit one of the first instructions of the instruction loop stored at the dispatch unit or another instruction of the instruction loop that is fetched by the fetch unit; the another instruction not stored at the dispatch unit between the first iteration and the subsequent set of iterations of the instruction loop.