本文介绍了为什么英特尔在其处理器中隐藏内部 RISC 内核?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从 Pentium Pro(P6 微体系结构)开始,英特尔重新设计了它的微处理器,并在旧的 CISC 指令下使用了内部 RISC 内核.由于 Pentium Pro,所有 CISC 指令都被分成更小的部分 (uops),然后由 RISC 内核执行.

Starting with Pentium Pro (P6 microarchitecture), Intel redesigned it's microprocessors and used internal RISC core under the old CISC instructions. Since Pentium Pro all CISC instructions are divided into smaller parts (uops) and then executed by the RISC core.

一开始我很清楚英特尔决定隐藏新的内部架构并强制程序员使用CISC shell".由于这个决定,英特尔可以在不破坏兼容性的情况下全面重新设计微处理器架构,这是合理的.

At the beginning it was clear for me that Intel decided to hide new internal architecture and force programmers to use "CISC shell". Thanks to this decision Intel could fully redesign microprocessors architecture without breaking compatibility, it's reasonable.

但是我不明白一件事,为什么Intel仍然隐藏了这么多年的内部RISC指令集?为什么他们不让程序员像使用旧的 x86 CISC 指令集那样使用 RISC 指令?

However I don't understand one thing, why Intel still keeps an internal RISC instructions set hidden for so many years? Why wouldn't they let programmers use RISC instructions like the use old x86 CISC instructions set?

如果Intel保持向后兼容性这么久(我们在64位模式旁边还有虚拟8086模式),为什么他们不让我们编译程序,这样他们就可以绕过CISC指令直接使用RISC内核?这将开启自然的方式,慢慢地放弃现在已被弃用的 x86 指令集(这是英特尔决定在内部使用 RISC 内核的主要原因,对吗?).

If Intel keeps backward compatibility for so long (we still have virtual 8086 mode next to 64 bit mode), Why don't they allow us compile programs so they will bypass CISC instructions and use RISC core directly? This will open natural way to slowly abandon x86 instructions set, which is deprecated nowadays (this is the main reason why Intel decided to use RISC core inside, right?).

看看新的英特尔Core i"系列,我发现它们只扩展了 CISC 指令集,添加了 AVX、SSE4 等.

Looking at new Intel 'Core i' series I see, that they only extends CISC instructions set adding AVX, SSE4 and others.

推荐答案

不,x86 指令集当然不会被弃用.它一如既往地受欢迎.Intel 在内部使用一组类似 RISC 的微指令是因为它们可以更有效地处理.

No, the x86 instruction set is certainly not deprecated. It is as popular as ever. The reason Intel uses a set of RISC-like micro-instructions internally is because they can be processed more efficiently.

因此,x86 CPU 的工作原理是在前端有一个非常强大的解码器,它接受 x86 指令,并将它们转换为优化的内部格式,以便后端可以处理.

So a x86 CPU works by having a pretty heavy-duty decoder in the frontend, which accepts x86 instructions, and converts them to an optimized internal format, which the backend can process.

至于将这种格式暴露给外部"程序,有两点:

As for exposing this format to "external" programs, there are two points:

  • 它不是一种稳定的格式.英特尔可以在 CPU 型号之间更改它以最适合特定架构.这使他们能够最大限度地提高效率,如果他们不得不采用固定、稳定的指令格式供内部使用和外部使用,那么这种优势就会丧失.
  • 这样做并没有什么好处.对于当今庞大而复杂的 CPU,解码器只是 CPU 中相对较小的一部分.必须解码 x86 指令使这变得更加复杂,但 CPU 的其余部分不受影响,所以总的来说,获得的收益很少,特别是因为 x86 前端仍然必须在那里,以便执行遗留"代码.因此,您甚至不会保存当前用于 x86 前端的晶体管.

这不是一个完美的安排,但成本相当低,而且比设计 CPU 以支持两个完全不同的指令集是一个更好的选择.(在那种情况下,他们可能最终会发明第三组微操作供内部使用,因为它们可以自由调整以最适合 CPU 的内部架构)

This isn't quite a perfect arrangement, but the cost is fairly small, and it's a much better choice than designing the CPU to support two completely different instruction sets. (In that case, they'd probably end up inventing a third set of micro-ops for internal use, just because those can be tweaked freely to best fit the CPU's internal architecture)

这篇关于为什么英特尔在其处理器中隐藏内部 RISC 内核?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-16 00:15