ARM 架构与 x86 有何不同? [英] How does the ARM architecture differ from x86?

查看:29
本文介绍了ARM 架构与 x86 有何不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

x86 架构是否专门设计用于与键盘配合使用,而 ARM 则希望可移动?两者之间的主要区别是什么?

Is the x86 Architecture specially designed to work with a keyboard while ARM expects to be mobile? What are the key differences between the two?

推荐答案

ARM 是一个 RISC(精简指令集计算)架构,而 x86 是一个 CISC(复杂指令集计算)一.

ARM is a RISC (Reduced Instruction Set Computing) architecture while x86 is a CISC (Complex Instruction Set Computing) one.

这方面的核心区别在于,ARM 指令仅对寄存器进行操作,少数指令用于从/向内存加载和保存数据,而 x86 也可以直接对内存进行操作.在 v8 之前,ARM 是原生 32 位架构,比其他架构更支持四字节操作.

The core difference between those in this aspect is that ARM instructions operate only on registers with a few instructions for loading and saving data from / to memory while x86 can operate directly on memory as well. Up until v8 ARM was a native 32 bit architecture, favoring four byte operations over others.

因此 ARM 是一种更简单的架构,导致芯片面积小,具有许多节能功能,而 x86 在功耗和生产方面都成为电源野兽.

So ARM is a simpler architecture, leading to small silicon area and lots of power save features while x86 becoming a power beast in terms of both power consumption and production.

关于x86 架构是否专门设计用于与键盘一起使用而 ARM 期望可移动?"的问题.x86 不是专门为与键盘一起使用而设计的,也不是为移动设备设计的 ARM.然而,由于核心架构的选择,实际上 x86 也有直接使用 IO 的指令,而 ARM 没有.然而,对于像 USB 这样的专用 IO 总线,对此类功能的需求也正在消失.

About question on "Is the x86 Architecture specially designed to work with a keyboard while ARM expects to be mobile?". x86 isn't specially designed to work with a keyboard neither ARM for mobile. However again because of the core architectural choices actually x86 also has instructions to work directly with IO while ARM has not. However with specialized IO buses like USBs, need for such features are also disappearing.

如果您需要引用文档,这就是 Cortex-A 系列程序员指南 (4.0) 讲述了 RISC 和 CISC 架构之间的差异:

If you need a document to quote, this is what Cortex-A Series Programmers Guide (4.0) tells about differences between RISC and CISC architectures:

ARM 处理器是精简指令集计算机 (RISC)处理器.

An ARM processor is a Reduced Instruction Set Computer (RISC) processor.

复杂指令集计算机 (CISC) 处理器,例如x86,有丰富的指令集,能够做复杂的事情一条指令.此类处理器通常具有显着的解码机器指令的大量内部逻辑内部操作序列(微码).

Complex Instruction Set Computer (CISC) processors, like the x86, have a rich instruction set capable of doing complex things with a single instruction. Such processors often have significant amounts of internal logic that decode machine instructions to sequences of internal operations (microcode).

RISC 架构,在相比之下,具有较少数量的通用指令,可以用更少的晶体管来执行,使得硅更便宜,更节能.像其他RISC一样架构,ARM 内核有大量的通用寄存器和许多指令在一个周期内执行.它有简单寻址模式,其中所有加载/存储地址都可以由寄存器内容和指令字段决定.

RISC architectures, in contrast, have a smaller number of more general purpose instructions, that might be executed with significantly fewer transistors, making the silicon cheaper and more power efficient. Like other RISC architectures, ARM cores have a large number of general-purpose registers and many instructions execute in a single cycle. It has simple addressing modes, where all load/store addresses can be determined from register contents and instruction fields.

ARM 公司还提供了一篇名为 Architectures, Processors 的论文,以及描述这些术语如何应用于其业务的设备开发文章.

ARM company also provides a paper titled Architectures, Processors, and Devices Development Article describing how those terms apply to their bussiness.

比较指令集架构的示例:

例如,如果您的应用程序中需要某种字节内存比较块(由编译器生成,跳过细节),这可能是 x86

For example if you would need some sort of bytewise memory comparison block in your application (generated by compiler, skipping details), this is how it might look like on x86

repe cmpsb         /* repeat while equal compare string bytewise */

虽然在 ARM 上,最短的形式可能看起来像(没有错误检查等)

while on ARM shortest form might look like (without error checking etc.)

top:
ldrb r2, [r0, #1]! /* load a byte from address in r0 into r2, increment r0 after */
ldrb r3, [r1, #1]! /* load a byte from address in r1 into r3, increment r1 after */
subs r2, r3, r2    /* subtract r2 from r3 and put result into r2      */
beq  top           /* branch(/jump) if result is zero                 */

这应该会提示您 RISC 和 CISC 指令集的复杂性有何不同.

which should give you a hint on how RISC and CISC instruction sets differ in complexity.

这篇关于ARM 架构与 x86 有何不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆