A method and apparatus are provided for improving the rate at which
macroinstructions are transformed into corresponding microinstructions.
Encoding is added to a microcode storage device. The encoding indicates
that a microinstruction flow will end in a determined number of cycles.
The number of cycles is determined by the number of canceled instructions
in a processing pipeline that would be introduced if no flow length
prediction was used. For flow lengths less than a determined number of
cycles, a hint bit is used in an entry point structure. For flow lengths
greater than a determined length, a hint bit is encoded at a third line
from an end of the microinstruction flow. Using this method, flows of any
length can be hinted. Furthermore, flows that do not originate from the
entry point structure can also be hinted. The method reduces the number of
hint bits that are needed in the entry point structure and provides for
better prediction.