Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. Most modern
processors load their instructions some clock cycles before they execute
them. This is achieved by pre-loading machine code from memory into a
prefetch input queue (PIQ). This behavior only applies to von Neumann
computers (that is, not Harvard architecture computers) that can run
self-modifying code and have some sort of instruction pipelining. Nearly
all computers fulfill these three requirements. Usually, the prefetching
behavior of the PIQ is invisible to the programming model of the CPU.
However, there are some circumstances where the behavior of PIQ is
visible, and needs to be taken into account by the programmer. When the
x86-processor changes mode from realmode to protected mode and vice
versa, the PIQ has to be flushed, or else the CPU will continue to
translate the machine code as if it were written in its last mode. If
the PIQ is not flushed, the processor might translate its codes wrong
and generate an invalid instruction exception.