The standard method of testing for presence and size of a prefetch queue on older CPUs seems to be to try to execute code that will hopefully allow the queue to fill, then modifying the address of a jump instruction that is thought to be in the queue and seeing where it jumps.
The prefetch queue remains in use by Intel although it is not much discussed. The Intel 80386 early versions had a 16 byte queue that was reduced to 12 bytes in later steppings. Pentiums seem to have prefetch queues -- sometimes one for each pipeline. Where documented, they seem to be 32 bytes. It is claimed that Pentiums and clones thereof will detect self modifying code and void the prefetch queue to prevent using an old value. That precludes software detection of the prefetch queue by traditional methods.
Return To Index Copyright 1994-2002 by Donald Kenney.