A method and apparatus for retrieving instructions to be processed by a
microprocessor is provided. By pre-fetching instructions in anticipation
of being requested, instead of waiting for the instructions to be
requested, the latency involved in requesting instructions from higher
levels of memory may be avoided. A pre-fetched line of instruction may be
stored into a pre-fetch buffer residing on a microprocessor. The
pre-fetch buffer may be used by the microprocessor as an alternate source
from which to retrieve a requested instruction when the requested
instruction is not stored within the first level cache. The particular
line of instruction being pre-fetched may be identified based on a
configurable stride value. The configurable stride value may be adjusted
to maximize the likelihood that a requested instruction, not present in
the first level cache, is present in the pre-fetch buffer. The
configurable stride value may be updated manually or automatically.