论文部分内容阅读
早期的x86 CPU识别依靠一些特殊指令,而奔腾CPU可以用新增CPUID指令(机器码0FH,0A2H)来识别。但是,这样也产生了一些问题,由于其它厂家相应的CPU并非都支持该指令而且有各不相同的标识值,从而会导致一些错误。例如Cyrix的6x86被大多数测试软件认为是486。 这里,笔者向大家介绍一种方法,可以区分奔腾级CPU与其他CPU,并且可以从中了解奔腾级CPU的内部结构。 众所周知,奔腾CPU与其前代产品相比,采用了多流水线(实际是两条)的超标量结构和预测执行技术。当一次预测执行发生错误时,会招致流水线被冲刷并重装指令预取缓冲区,以获得正确的指令。这一过程将产生3~6个时钟延迟,对于发挥CPU峰值性能不利,因此一些先进的高级语言编译
The early x86 CPU relies on special instructions, while the Pentium CPU can be identified by adding CPUID instructions (machine code 0FH, 0A2H). However, this creates some problems as some CPUs do not support the instruction in the corresponding CPUs of other manufacturers and have different identification values, which leads to some errors. For example, Cyrix 6x86 is considered 486 by most test software. Here, I introduce a method that can distinguish between Pentium CPU and other CPU, and can understand the internal structure of the Pentium-class CPU. As we all know, compared with its predecessors, Pentium CPU uses multi-pipeline (actually two) superscalar structure and predictive execution technology. When a prediction execution error occurs, will cause the pipeline to be washed and reload the instruction prefetch buffer, in order to obtain the correct instruction. This process will produce 3 to 6 clock delays, CPU performance for the peak performance disadvantage, so some advanced high-level language compiler